mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Adding function for root universe comparison
This commit is contained in:
parent
6b98142a12
commit
9da13a9087
2 changed files with 13 additions and 0 deletions
|
|
@ -126,6 +126,14 @@ std::string distribcell_path(
|
|||
|
||||
int maximum_levels(int32_t univ);
|
||||
|
||||
//==============================================================================
|
||||
//! Check whether or not a universe is the root universe using its ID.
|
||||
//! \param univ_id The ID of the universe to check.
|
||||
//! \return Whether or not it is the root universe.
|
||||
//==============================================================================
|
||||
|
||||
bool is_root_universe(int32_t univ_id);
|
||||
|
||||
//==============================================================================
|
||||
//! Deallocates global vectors and maps for cells, universes, and lattices.
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -610,6 +610,11 @@ int maximum_levels(int32_t univ)
|
|||
return levels_below;
|
||||
}
|
||||
|
||||
bool is_root_universe(int32_t univ_id)
|
||||
{
|
||||
return model::universe_map[univ_id] == model::root_universe;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
||||
void free_memory_geometry()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue