mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Fixed issue in Pandas DataFrame compatibility with OpenCG lattice indexing
This commit is contained in:
parent
cc571091a3
commit
ec05e52089
2 changed files with 3 additions and 4 deletions
|
|
@ -673,9 +673,11 @@ class Filter(object):
|
|||
|
||||
# Assign entry to Lattice Multi-index column
|
||||
else:
|
||||
# Reverse y index per lattice ordering in OpenCG
|
||||
level_dict[lat_id_key][offset] = coords._lattice._id
|
||||
level_dict[lat_x_key][offset] = coords._lat_x
|
||||
level_dict[lat_y_key][offset] = coords._lat_y
|
||||
level_dict[lat_y_key][offset] = \
|
||||
coords._lattice.dimension[1] - coords._lat_y - 1
|
||||
level_dict[lat_z_key][offset] = coords._lat_z
|
||||
|
||||
# Move to next node in LocalCoords linked list
|
||||
|
|
|
|||
|
|
@ -922,9 +922,6 @@ def get_opencg_lattice(openmc_lattice):
|
|||
universe_id = universes[z][y][x].id
|
||||
universe_array[z][y][x] = unique_universes[universe_id]
|
||||
|
||||
# Reverse y-dimension in array to match ordering in OpenCG
|
||||
universe_array = universe_array[:, ::-1, :]
|
||||
|
||||
opencg_lattice = opencg.Lattice(lattice_id, name)
|
||||
opencg_lattice.dimension = dimension
|
||||
opencg_lattice.width = pitch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue