Skip to content

Commit d8a404e

Browse files
committed
inp: updated mesh.Geom restrictions
1 parent 223c8e0 commit d8a404e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

scripts/inp_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9167,7 +9167,7 @@ def from_formula(number: int, formulas: dict[str, float], is_weight: bool = True
91679167
name='geometry',
91689168
type='types.String',
91699169
description='Controls mesh geometry type',
9170-
restriction='geometry in {"xyz", "rzt", "rpt"}',
9170+
restriction='geometry in {"xyz", "rzt", "rpt", "cyl", "rec", "sph"}',
91719171
),
91729172
],
91739173
),

src/pymcnp/inp/data/mesh/Geom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(self, geometry: types.String):
3636
InpError: SEMANTICS_OPTION.
3737
"""
3838

39-
if geometry is None or geometry not in {'xyz', 'rzt', 'rpt'}:
39+
if geometry is None or geometry not in {'xyz', 'rzt', 'rpt', 'cyl', 'rec', 'sph'}:
4040
raise errors.InpError(errors.InpCode.SEMANTICS_OPTION, geometry)
4141

4242
self.value: typing.Final[types.Tuple] = types.Tuple(

tests/inp/test_card.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,17 +451,17 @@ class Test_FromMcnp(_utils._Test_FromMcnp):
451451
'KOPTS BLOCKSIZE = 5 KSENTAL = TSUNAMI-B',
452452
'FMESH4:n GEOM=xyz ORIGIN= -5 -5 -5\n IMESH= 5 IINTS=100\n JMESH= 5 JINTS= 1\n KMESH= 5 KINTS=100',
453453
'FM4 -1 0 -5',
454-
#'FMESH4:n GEOM=CYL ORIGIN= -100 0 0\n IMESH= 5 10 IINTS= 5 2\n JMESH= 100 200 JINTS 10 5\n KMESH 0.5 1 KINTS= 1 2\n AXS= 1 0 0 VEC=0 1 0 OUT=IJ',
454+
'FMESH4:n GEOM=CYL ORIGIN= -100 0 0\n IMESH= 5 10 IINTS= 5 2\n JMESH= 100 200 JINTS 10 5\n KMESH 0.5 1 KINTS= 1 2\n AXS= 1 0 0 VEC=0 1 0 OUT=IJ',
455455
'IMP:N 1 2 2M 0 1 20R',
456456
'WWG 111 45 0.25',
457457
'WWGE:p 1 100',
458458
'WWGT:p 1 100 1.e20',
459459
'WWP:p 5 3 5',
460460
'WWE:p 1 100',
461461
'WWT:p 1 100 1.e20',
462-
#'MESH GEOM=CYL REF=1e-6 1e-7 0 ORIGIN=1 2 3\n IMESH 2.55 66.34\n IINTS 2 15 $ 2 fine bins from 0 to 2.55, 15 from 2.55 to 66.34\n JMESH 33.1 42.1 53.4 139.7\n JINTS 6 3 4 13\n KMESH 0.5 1\n KINTS 5 5',
463-
#'MESH GEOM=REC REF=1e-6 1e-7 0 ORIGIN=-66.34 -38.11 -60\n IMESH -16.5 3.8 53.66\n IINTS 10 3 8 $ 10 fine bins from -66.34 to -16.5, etc.',
464-
#'MESH GEOM sph ORIGIN 7 -9 -12 REF -23 39 -10 AXS 0.4 -0.5 0.2\n VEC 0.1 -0.2 -0.7\n IMESH 60. IINTS 3\n JMESH 0.1 0.35 0.5 JINTS 1 1 1\n KMESH 0.2 0.85 1 KINTS 1 1 1',
462+
'MESH GEOM=CYL REF=1e-6 1e-7 0 ORIGIN=1 2 3\n IMESH 2.55 66.34\n IINTS 2 15 $ 2 fine bins from 0 to 2.55, 15 from 2.55 to 66.34\n JMESH 33.1 42.1 53.4 139.7\n JINTS 6 3 4 13\n KMESH 0.5 1\n KINTS 5 5',
463+
'MESH GEOM=REC REF=1e-6 1e-7 0 ORIGIN=-66.34 -38.11 -60\n IMESH -16.5 3.8 53.66\n IINTS 10 3 8 $ 10 fine bins from -66.34 to -16.5, etc.',
464+
'MESH GEOM sph ORIGIN 7 -9 -12 REF -23 39 -10 AXS 0.4 -0.5 0.2\n VEC 0.1 -0.2 -0.7\n IMESH 60. IINTS 3\n JMESH 0.1 0.35 0.5 JINTS 1 1 1\n KMESH 0.2 0.85 1 KINTS 1 1 1',
465465
'ESPLT:N 2 0.1 2 0.01 0.25 0.001',
466466
'ESPLT:N 2 0.1 2 0.01 0.25 0.001',
467467
'WWP:N 5 3 5 0 0 0 J J',

0 commit comments

Comments
 (0)