Bank holding the materials defined in the input file. More...
#include <material_bank.h>
Public Member Functions | |
| MaterialBank (const json &json_input) | |
| Construct a new Material Bank object. Material structs are built using the json input. | |
| Public Member Functions inherited from hummingbird::BankBase< Material > | |
| const Material & | GetByID (const int id) const |
| Get the object by its ID. | |
| const Material & | GetByName (const std::string &name) const |
| Get the object by its name in the JSON input file. | |
| int | GetIDByName (const std::string &name) const |
| Get the ID of an object by its name in the JSON input file. | |
Private Member Functions | |
| void | Build (const json &json_input) |
| Builds the material structs and assigns them to the id_material_map_ and name_id_map_ members. | |
| void | CheckMaterials () |
| Check that all materials in id_object_map_ have physically valid cross sections. | |
Additional Inherited Members | |
| Protected Attributes inherited from hummingbird::BankBase< Material > | |
| std::unordered_map< int, Material > | id_object_map_ |
| ID to object map. | |
| std::unordered_map< std::string, int > | name_id_map_ |
| name to object ID map | |
Bank holding the materials defined in the input file.
Definition at line 30 of file material_bank.h.
| hummingbird::MaterialBank::MaterialBank | ( | const json & | json_input | ) |
Construct a new Material Bank object. Material structs are built using the json input.
| json_input | JSON object containing input file information |
Definition at line 11 of file material_bank.cc.
|
privatevirtual |
Builds the material structs and assigns them to the id_material_map_ and name_id_map_ members.
| json_input | JSON object containing input file information |
Implements hummingbird::BankBase< Material >.
Definition at line 16 of file material_bank.cc.
|
private |
Check that all materials in id_object_map_ have physically valid cross sections.
| std::runtime_error | if a material's total cross section is negative, less than the sum of its scattering and fission cross sections, or if its scattering, fission, or nu is negative |
Definition at line 28 of file material_bank.cc.