mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Added test of volume calc from MG mode, then corrected 2 issues: the first led to #1698, the second led to the test failing as volume calcs need atom densities but they existed in a different location in MG mode. To fix the former, if blocks were placed to point to the MG nuclide data as necessary, and the latter by calling Material.finalize() at the appropriate spot in the MG code
This commit is contained in:
parent
adc935b99d
commit
75fd0a7f78
4 changed files with 29 additions and 18 deletions
|
|
@ -123,10 +123,14 @@ void MgxsInterface::create_macro_xs()
|
|||
// Therefore type(nuclides[mat->nuclide_[0]]) dictates type(macroxs).
|
||||
// At the same time, we will find the scattering type, as that will dictate
|
||||
// how we allocate the scatter object within macroxs.
|
||||
|
||||
for (int i = 0; i < model::materials.size(); ++i) {
|
||||
// First we have to normalize the densities as it has not been called yet
|
||||
// for MG mode
|
||||
auto& mat {model::materials[i]};
|
||||
mat->finalize();
|
||||
if (kTs[i].size() > 0) {
|
||||
// Convert atom_densities to a vector
|
||||
auto& mat {model::materials[i]};
|
||||
vector<double> atom_densities(
|
||||
mat->atom_density_.begin(), mat->atom_density_.end());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue