mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Remove redundant uwuw_disabled boolean member in DAGUniverse
This commit is contained in:
parent
8bf7de39ca
commit
4d52218178
2 changed files with 4 additions and 9 deletions
|
|
@ -155,7 +155,6 @@ 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
|
||||
|
|
|
|||
|
|
@ -416,10 +416,7 @@ void DAGUniverse::to_hdf5(hid_t universes_group) const
|
|||
|
||||
bool DAGUniverse::uses_uwuw() const
|
||||
{
|
||||
if (uwuw_disabled)
|
||||
return false;
|
||||
else
|
||||
return !uwuw_->material_library.empty();
|
||||
return uwuw_ && !uwuw_->material_library.empty();
|
||||
}
|
||||
|
||||
std::string DAGUniverse::get_uwuw_materials_xml() const
|
||||
|
|
@ -508,11 +505,10 @@ void DAGUniverse::legacy_assign_material(
|
|||
|
||||
void DAGUniverse::read_uwuw_materials()
|
||||
{
|
||||
// If no filename was provided, disable read UWUW materials
|
||||
uwuw_disabled = (filename_ == "");
|
||||
|
||||
if (uwuw_disabled)
|
||||
// If no filename was provided, don't read UWUW materials
|
||||
if (filename_ == "")
|
||||
return;
|
||||
|
||||
uwuw_ = std::make_shared<UWUW>(filename_.c_str());
|
||||
|
||||
if (!uses_uwuw())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue