mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Add switch to disable uwuw in DAGUniverse with external DAG
This commit is contained in:
parent
cc6c3ac9e6
commit
fb9c12bd14
2 changed files with 6 additions and 1 deletions
|
|
@ -161,6 +161,7 @@ private:
|
|||
std::shared_ptr<UWUW>
|
||||
uwuw_; //!< Pointer to the UWUW instance for this universe
|
||||
std::unique_ptr<dagmcMetaData> dmd_ptr; //! Pointer to DAGMC metadata object
|
||||
bool uwuw_disabled; //!< Switch to disable UWUW materials
|
||||
bool adjust_geometry_ids_; //!< Indicates whether or not to automatically
|
||||
//!< generate new cell and surface IDs for the
|
||||
//!< universe
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ DAGUniverse::DAGUniverse(std::shared_ptr<moab::DagMC> external_dagmc_ptr,
|
|||
adjust_geometry_ids_(auto_geom_ids), adjust_material_ids_(auto_mat_ids)
|
||||
{
|
||||
set_id();
|
||||
uwuw_disabled = (filename=="");
|
||||
}
|
||||
|
||||
void DAGUniverse::set_id()
|
||||
|
|
@ -102,6 +103,7 @@ void DAGUniverse::set_id()
|
|||
void DAGUniverse::initialize()
|
||||
{
|
||||
geom_type() = GeometryType::DAG;
|
||||
uwuw_disabled = false;
|
||||
|
||||
init_dagmc();
|
||||
|
||||
|
|
@ -424,7 +426,8 @@ void DAGUniverse::to_hdf5(hid_t universes_group) const
|
|||
|
||||
bool DAGUniverse::uses_uwuw() const
|
||||
{
|
||||
return !uwuw_->material_library.empty();
|
||||
if (uwuw_disabled) return false;
|
||||
else return !uwuw_->material_library.empty();
|
||||
}
|
||||
|
||||
std::string DAGUniverse::get_uwuw_materials_xml() const
|
||||
|
|
@ -513,6 +516,7 @@ void DAGUniverse::legacy_assign_material(
|
|||
|
||||
void DAGUniverse::init_uwuw()
|
||||
{
|
||||
if (uwuw_disabled) return;
|
||||
uwuw_ = std::make_shared<UWUW>(filename_.c_str());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue