mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 05:05:30 -04:00
Skipping geometry write, but indicating a DAGMC geometry was used for now.
This commit is contained in:
parent
9a8184513f
commit
ea0b6f2948
2 changed files with 19 additions and 11 deletions
|
|
@ -97,13 +97,17 @@ class Summary(object):
|
|||
self._macroscopics = name.decode()
|
||||
|
||||
def _read_geometry(self):
|
||||
# Read in and initialize the Materials and Geometry
|
||||
self._read_materials()
|
||||
self._read_surfaces()
|
||||
cell_fills = self._read_cells()
|
||||
self._read_universes()
|
||||
self._read_lattices()
|
||||
self._finalize_geometry(cell_fills)
|
||||
try:
|
||||
self._f['geometry'].attrs.get("cad")
|
||||
return
|
||||
except:
|
||||
# Read in and initialize the Materials and Geometry
|
||||
self._read_materials()
|
||||
self._read_surfaces()
|
||||
cell_fills = self._read_cells()
|
||||
self._read_universes()
|
||||
self._read_lattices()
|
||||
self._finalize_geometry(cell_fills)
|
||||
|
||||
def _read_materials(self):
|
||||
for group in self._f['materials'].values():
|
||||
|
|
|
|||
|
|
@ -9,11 +9,15 @@ namespace openmc {
|
|||
extern "C" void
|
||||
write_geometry(hid_t file_id) {
|
||||
|
||||
#ifdef DAGMC
|
||||
if (settings::dagmc) return;
|
||||
#endif
|
||||
|
||||
auto geom_group = create_group(file_id, "geometry");
|
||||
|
||||
#ifdef DAGMC
|
||||
if (settings::dagmc) {
|
||||
write_attribute(geom_group, "cad", 1);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
write_attribute(geom_group, "n_cells", cells.size());
|
||||
write_attribute(geom_group, "n_surfaces", surfaces.size());
|
||||
write_attribute(geom_group, "n_universes", universes.size());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue