mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
added cell name to vol calc print out (#2656)
This commit is contained in:
parent
8e77a1ffb6
commit
d687ce419f
1 changed files with 9 additions and 5 deletions
|
|
@ -534,16 +534,20 @@ int openmc_calculate_volumes()
|
|||
|
||||
// Display domain volumes
|
||||
for (int j = 0; j < vol_calc.domain_ids_.size(); j++) {
|
||||
std::string cell_name {""};
|
||||
std::string region_name {""};
|
||||
if (vol_calc.domain_type_ == VolumeCalculation::TallyDomain::CELL) {
|
||||
int cell_idx = model::cell_map[vol_calc.domain_ids_[j]];
|
||||
cell_name = model::cells[cell_idx]->name();
|
||||
if (cell_name.size())
|
||||
cell_name.insert(0, " "); // prepend space for formatting
|
||||
region_name = model::cells[cell_idx]->name();
|
||||
} else if (vol_calc.domain_type_ ==
|
||||
VolumeCalculation::TallyDomain::MATERIAL) {
|
||||
int mat_idx = model::material_map[vol_calc.domain_ids_[j]];
|
||||
region_name = model::materials[mat_idx]->name();
|
||||
}
|
||||
if (region_name.size())
|
||||
region_name.insert(0, " "); // prepend space for formatting
|
||||
|
||||
write_message(4, "{}{}{}: {} +/- {} cm^3", domain_type,
|
||||
vol_calc.domain_ids_[j], cell_name, results[j].volume[0],
|
||||
vol_calc.domain_ids_[j], region_name, results[j].volume[0],
|
||||
results[j].volume[1]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue