@@ -94,6 +94,10 @@ class DAGCell : public Cell {
9494class DAGUniverse : public Universe {
9595
9696public:
97+ using MaterialOverrides = std::unordered_map<int32_t , vector<int32_t >>;
98+ using TemperatureOverrides = std::unordered_map<int32_t , vector<double >>;
99+ using DensityOverrides = std::unordered_map<int32_t , vector<double >>;
100+
97101 explicit DAGUniverse (pugi::xml_node node);
98102
99103 // ! Create a new DAGMC universe
@@ -112,6 +116,9 @@ class DAGUniverse : public Universe {
112116 // ! Initialize the DAGMC accel. data structures, indices, material
113117 // ! assignments, etc.
114118 void initialize ();
119+ void initialize (const MaterialOverrides& material_overrides,
120+ const TemperatureOverrides& temperature_overrides,
121+ const DensityOverrides& density_overrides = {});
115122
116123 // ! Reads UWUW materials and returns an ID map
117124 void read_uwuw_materials ();
@@ -146,7 +153,8 @@ class DAGUniverse : public Universe {
146153
147154 // ! Assign a material overriding normal assignement to a cell
148155 // ! \param[in] c The OpenMC cell to which the material is assigned
149- void override_assign_material (std::unique_ptr<DAGCell>& c) const ;
156+ void override_assign_material (std::unique_ptr<DAGCell>& c,
157+ const MaterialOverrides& material_overrides) const ;
150158
151159 // ! Return the index into the model cells vector for a given DAGMC volume
152160 // ! handle in the universe
@@ -187,7 +195,9 @@ class DAGUniverse : public Universe {
187195 void set_id (); // !< Deduce the universe id from model::universes
188196 void init_dagmc (); // !< Create and initialise DAGMC pointer
189197 void init_metadata (); // !< Create and initialise dagmcMetaData pointer
190- void init_geometry (); // !< Create cells and surfaces from DAGMC entities
198+ void init_geometry (const MaterialOverrides& material_overrides,
199+ const TemperatureOverrides& temperature_overrides,
200+ const DensityOverrides& density_overrides);
191201
192202 std::string
193203 filename_; // !< Name of the DAGMC file used to create this universe
@@ -201,11 +211,6 @@ class DAGUniverse : public Universe {
201211 // !< generate new material IDs for the universe
202212 bool has_graveyard_; // !< Indicates if the DAGMC geometry has a "graveyard"
203213 // !< volume
204- std::unordered_map<int32_t , vector<int32_t >>
205- material_overrides_; // !< Map of material overrides
206- // !< keys correspond to the DAGMCCell id
207- // !< values are a list of material ids used
208- // !< for the override
209214};
210215
211216// ==============================================================================
0 commit comments