mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Updated Summary API to reflect change from Lattice width to pitch
This commit is contained in:
parent
27cea6773c
commit
bdcc4eb254
2 changed files with 4 additions and 4 deletions
|
|
@ -681,7 +681,7 @@ def get_opencg_lattice(openmc_lattice):
|
|||
# Create an OpenCG Lattice to represent this OpenMC Lattice
|
||||
name = openmc_lattice._name
|
||||
dimension = openmc_lattice._dimension
|
||||
width = openmc_lattice._width
|
||||
pitch = openmc_lattice._pitch
|
||||
lower_left = openmc_lattice._lower_left
|
||||
universes = openmc_lattice._universes
|
||||
|
||||
|
|
@ -704,11 +704,11 @@ def get_opencg_lattice(openmc_lattice):
|
|||
|
||||
opencg_lattice = opencg.Lattice(lattice_id, name)
|
||||
opencg_lattice.setDimension(dimension)
|
||||
opencg_lattice.setWidth(width)
|
||||
opencg_lattice.setWidth(pitch)
|
||||
opencg_lattice.setUniverses(universe_array)
|
||||
|
||||
offset = np.array(lower_left, dtype=np.float64) - \
|
||||
((np.array(width, dtype=np.float64) * \
|
||||
((np.array(pitch, dtype=np.float64) * \
|
||||
np.array(dimension, dtype=np.float64))) / -2.0
|
||||
opencg_lattice.setOffset(offset)
|
||||
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ class Summary(object):
|
|||
lattice_type = self._f['geometry/lattices'][key]['type'][...][0]
|
||||
|
||||
if lattice_type == 'rectangular':
|
||||
dimension = self._f['geometry/lattices'][key]['dimension'][...]
|
||||
dimension = self._f['geometry/lattices'][key]['n_cells'][...]
|
||||
lower_left = \
|
||||
self._f['geometry/lattices'][key]['lower_left'][...]
|
||||
pitch = self._f['geometry/lattices'][key]['pitch'][...]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue