mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Some (temporary) changes to make unstructured mesh copacetic with the other mesh bin structures.
This commit is contained in:
parent
8cdbedf674
commit
44083412f0
2 changed files with 3 additions and 2 deletions
|
|
@ -750,7 +750,7 @@ class MeshFilter(Filter):
|
|||
cv.check_type('filter mesh', mesh, openmc.MeshBase)
|
||||
self._mesh = mesh
|
||||
if isinstance(mesh, openmc.UnstructuredMesh):
|
||||
self.bins = []
|
||||
self.bins = [ (n, 1, 1) for n in range(1, mesh.volumes.size + 1) ]
|
||||
else:
|
||||
self.bins = list(mesh.indices)
|
||||
|
||||
|
|
|
|||
|
|
@ -654,7 +654,8 @@ class UnstructuredMesh(MeshBase):
|
|||
|
||||
mesh = cls(mesh_id)
|
||||
mesh.filename = group['filename'][()].decode()
|
||||
mesh.volumes = group['volumes'][()]
|
||||
vol_data = group['volumes'][()]
|
||||
mesh.volumes = np.reshape(vol_data, (vol_data.shape[0], 1))
|
||||
|
||||
return mesh
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue