Where is nuclide_map loaded actucally

Hello developers!

I am looking into the source code of OpenMC, and there is something that confuses me a little.

In material. cpp, line 1330:

model::materials.push_back(make_unique(material_node));

In the lldb environment, when this line is run, the unordered_map nuclide_map of nuclide. cpp is automatically loaded with nuclides of corresponding materials.

So I stepped into the functions used here but didn’t find any line related to nuclide_map.

So I am wondering where and how nuclide_map is loaded, can anyone help me with that?

Thanks a lot!

Oh sorry. I guess I know that now. The map is loaded implicitly when the construction of the Material class is triggered. I guess the question should be closed now.

1 Like