mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 05:05:30 -04:00
Report plot ID instead of index for unsupported plot types in random ray mode (#3361)
This commit is contained in:
parent
3f3649da08
commit
24655dfd5d
1 changed files with 4 additions and 3 deletions
|
|
@ -303,20 +303,21 @@ void validate_random_ray_inputs()
|
|||
for (int p = 0; p < model::plots.size(); p++) {
|
||||
|
||||
// Get handle to OpenMC plot object
|
||||
Plot* openmc_plot = dynamic_cast<Plot*>(model::plots[p].get());
|
||||
const auto& openmc_plottable = model::plots[p];
|
||||
Plot* openmc_plot = dynamic_cast<Plot*>(openmc_plottable.get());
|
||||
|
||||
// Random ray plots only support voxel plots
|
||||
if (!openmc_plot) {
|
||||
warning(fmt::format(
|
||||
"Plot {} will not be used for end of simulation data plotting -- only "
|
||||
"voxel plotting is allowed in random ray mode.",
|
||||
p));
|
||||
openmc_plottable->id()));
|
||||
continue;
|
||||
} else if (openmc_plot->type_ != Plot::PlotType::voxel) {
|
||||
warning(fmt::format(
|
||||
"Plot {} will not be used for end of simulation data plotting -- only "
|
||||
"voxel plotting is allowed in random ray mode.",
|
||||
p));
|
||||
openmc_plottable->id()));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue