mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Updated mgxs and tests
Doc string updates to exclusively list openmc.RegularMesh as a domain type. I removed an if-statement related to domain == mesh, since mesh is the only allowable domain. Other minor edits.
This commit is contained in:
parent
eaa266e6d7
commit
8f3dc3b8c2
2 changed files with 9 additions and 12 deletions
|
|
@ -6237,10 +6237,7 @@ class MeshSurfaceMGXS(MGXS):
|
|||
df = self.xs_tally.get_pandas_dataframe(paths=paths)
|
||||
|
||||
# Remove the score column since it is homogeneous and redundant
|
||||
if self.domain_type == 'mesh':
|
||||
df = df.drop('score', axis=1, level=0)
|
||||
else:
|
||||
df = df.drop('score', axis=1)
|
||||
df = df.drop('score', axis=1, level=0)
|
||||
|
||||
# Convert azimuthal, polar, energy in and energy out bin values in to
|
||||
# bin indices
|
||||
|
|
@ -6254,9 +6251,9 @@ class MeshSurfaceMGXS(MGXS):
|
|||
df = df[df['group out'].isin(groups)]
|
||||
|
||||
mesh_str = 'mesh {0}'.format(self.domain.id)
|
||||
surfaces = df[(mesh_str, 'surf')]
|
||||
df.drop(columns=[(mesh_str,'surf')],inplace=True)
|
||||
df.insert(len(self.domain.dimension),(mesh_str,'surf'),surfaces)
|
||||
col_key = (mesh_str, 'surf')
|
||||
surfaces = df.pop(col_key)
|
||||
df.insert(len(self.domain.dimension), col_key, surfaces)
|
||||
if len(self.domain.dimension) == 1:
|
||||
df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'surf')]
|
||||
+ columns, inplace=True)
|
||||
|
|
@ -6295,9 +6292,9 @@ class Current(MeshSurfaceMGXS):
|
|||
|
||||
Parameters
|
||||
----------
|
||||
domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.RegularMesh
|
||||
domain : openmc.RegularMesh
|
||||
The domain for spatial homogenization
|
||||
domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'}
|
||||
domain_type : ('mesh'}
|
||||
The domain type for spatial homogenization
|
||||
groups : openmc.mgxs.EnergyGroups
|
||||
The energy group structure for energy condensation
|
||||
|
|
@ -6315,7 +6312,7 @@ class Current(MeshSurfaceMGXS):
|
|||
Reaction type (e.g., 'total', 'nu-fission', etc.)
|
||||
by_nuclide : bool
|
||||
Unused in MeshSurfaceMGXS
|
||||
domain : Mesh
|
||||
domain : openmc.RegularMesh
|
||||
Domain for spatial homogenization
|
||||
domain_type : {'mesh'}
|
||||
Domain type for spatial homogenization
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ class MGXSTestHarness(PyAPITestHarness):
|
|||
for domain in self.mgxs_lib.domains:
|
||||
for mgxs_type in self.mgxs_lib.mgxs_types:
|
||||
outstr += 'domain={0} type={1}\n'.format(domain.id, mgxs_type)
|
||||
avg_key = 'mesh/{0}/{1}/average'.format(domain.id, mgxs_type)
|
||||
std_key = 'mesh/{0}/{1}/std. dev.'.format(domain.id, mgxs_type)
|
||||
avg_key = 'mesh/{}/{}/average'.format(domain.id, mgxs_type)
|
||||
std_key = 'mesh/{}/{}/std. dev.'.format(domain.id, mgxs_type)
|
||||
outstr += '{}\n{}\n'.format(f[avg_key][...], f[std_key][...])
|
||||
|
||||
# Hash the results if necessary
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue