Adding function for root universe comparison

This commit is contained in:
Patrick Shriwise 2023-03-21 16:44:12 -05:00
parent 6b98142a12
commit 9da13a9087
2 changed files with 13 additions and 0 deletions

View file

@ -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.
//==============================================================================

View file

@ -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()