mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
changed auto_geom_ids approach
This commit is contained in:
parent
c8fb5eb2bd
commit
ada2493a6b
2 changed files with 4 additions and 10 deletions
|
|
@ -767,26 +767,18 @@ class DAGMCUniverse(UniverseBase):
|
|||
|
||||
return +lower_x & -upper_x & +lower_y & -upper_y & +lower_z & -upper_z
|
||||
|
||||
def bounded_universe(self, auto_geom_ids=True, **kwargs):
|
||||
def bounded_universe(self, **kwargs):
|
||||
"""Returns an openmc.Universe filled with this DAGMCUniverse and bounded
|
||||
with a cell. Defaults to a box cell with a vacuum surface however this
|
||||
can be changed using the kwargs which are passed directly to
|
||||
DAGMCUniverse.bounding_region().
|
||||
|
||||
Parameters
|
||||
----------
|
||||
auto_geom_ids : bool
|
||||
Set IDs automatically on initialization (True) or report overlaps
|
||||
in ID space between CSG and DAGMC (False). Defaults to True to avoid
|
||||
overlapping ID numbers between the CSG and DAGMC geometry ID numbers
|
||||
|
||||
Returns
|
||||
-------
|
||||
openmc.Universe
|
||||
Universe instance
|
||||
"""
|
||||
|
||||
self.auto_geom_ids = auto_geom_ids
|
||||
bounding_cell = openmc.Cell(fill=self, region=self.bounding_region(**kwargs))
|
||||
return openmc.Universe(cells=[bounding_cell])
|
||||
|
||||
|
|
|
|||
|
|
@ -183,7 +183,9 @@ void DAGUniverse::init_geometry()
|
|||
} else {
|
||||
warning(fmt::format("DAGMC Cell IDs: {}", dagmc_ids_for_dim(3)));
|
||||
fatal_error(fmt::format("Cell ID {} exists in both DAGMC Universe {} "
|
||||
"and the CSG geometry.",
|
||||
"and the CSG geometry. Setting auto_geom_ids
|
||||
to True when initiating the DAGMC Universe may
|
||||
resolve this issue",
|
||||
c->id_, this->id_));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue