Skip to content

Commit

Permalink
tests/test_cell: added cell option tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BitterB0NG0 committed Nov 27, 2024
1 parent 656a7c6 commit 7e2ea28
Show file tree
Hide file tree
Showing 9 changed files with 635 additions and 142 deletions.
62 changes: 31 additions & 31 deletions scripts/_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def __init__(self, *, mnemonic: str = None, attributes: tuple[AttributeScheme] =
name='setting',
type='types.McnpInteger',
description='Cell fission setting.',
restriction='setting in {0, 1, 2}',
restriction='setting.value in {0, 1, 2}',
error='INVALID_CELL_OPTION_VALUE',
),
),
Expand Down Expand Up @@ -286,7 +286,7 @@ def __init__(self, *, mnemonic: str = None, attributes: tuple[AttributeScheme] =
name='shape',
type='types.McnpInteger',
description='Cell lattice shape.',
restriction='shape in {1, 2}',
restriction='shape.value in {1, 2}',
error='INVALID_CELL_OPTION_VALUE',
),
),
Expand All @@ -295,10 +295,10 @@ def __init__(self, *, mnemonic: str = None, attributes: tuple[AttributeScheme] =
mnemonic='fill',
attributes=(
AttributeScheme(
name='numbers',
type='tuple[types.McnpInteger]',
name='number',
type='types.McnpInteger',
description='Fill cell option value or value(s) tuple.',
restriction='0 <= entry <= 99_999_999',
restriction='0 <= number <= 99_999_999',
error='INVALID_CELL_OPTION_VALUE',
),
),
Expand Down Expand Up @@ -329,7 +329,7 @@ def __init__(self, *, mnemonic: str = None, attributes: tuple[AttributeScheme] =
name='number',
type='types.McnpInteger',
description='Cell cosy map number.',
restriction='number in {1, 2, 3, 4, 5, 6}',
restriction='number.value in {1, 2, 3, 4, 5, 6}',
error='INVALID_CELL_OPTION_VALUE',
),
),
Expand All @@ -353,7 +353,7 @@ def __init__(self, *, mnemonic: str = None, attributes: tuple[AttributeScheme] =
name='setting',
type='types.McnpInteger',
description='Cell uncollided secondaries setting.',
restriction='setting in {0, 1}',
restriction='setting.value in {0, 1}',
error='INVALID_CELL_OPTION_VALUE',
),
AttributeScheme(
Expand Down Expand Up @@ -2532,7 +2532,7 @@ def __init__(
name='form',
type='str',
description='Format specification of the embedded mesh input file',
restriction='form in {"lnk3dnt", "abaqu", "mcnpum"}',
restriction='form.value in {"lnk3dnt", "abaqu", "mcnpum"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand Down Expand Up @@ -2572,7 +2572,7 @@ def __init__(
name='setting',
type='str',
description='Yes/no calculate the inferred geometry cell information',
restriction='setting in {"yes", "no"}',
restriction='setting.value in {"yes", "no"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand All @@ -2582,7 +2582,7 @@ def __init__(
name='parameter',
type='str',
description='Debug parameter',
restriction='parameter in {"echomesh"}',
restriction='parameter.value in {"echomesh"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand All @@ -2592,7 +2592,7 @@ def __init__(
name='kind',
type='str',
description='File type for the elemental edit output file',
restriction='type in {"ascii", "binary"}',
restriction='type.value in {"ascii", "binary"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand Down Expand Up @@ -2684,7 +2684,7 @@ def __init__(
name='setting',
type='str',
description='Flag to multiply by atom density',
restriction='setting in {"yes", "no"}',
restriction='setting.value in {"yes", "no"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand Down Expand Up @@ -2714,7 +2714,7 @@ def __init__(
name='kind',
type='str',
description='Multiplier type',
restriction='type in {"flux", "isotropic", "population", "reaction", "source", "track"}',
restriction='type.value in {"flux", "isotropic", "population", "reaction", "source", "track"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand Down Expand Up @@ -2899,7 +2899,7 @@ def __init__(
name='setting',
type='str',
description='Flag for density-effect correction to electron stopping power',
restriction='setting in {"yes", "no"}',
restriction='setting.value in {"yes", "no"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand Down Expand Up @@ -3200,7 +3200,7 @@ def __init__(
name='mcal',
type='str',
description='Problem type setting',
restriction='mcal in {"f", "a"}',
restriction='mcal.value in {"f", "a"}',
error='INVALID_DATA_PARAMETER',
),
AttributeScheme(
Expand Down Expand Up @@ -3296,7 +3296,7 @@ def __init__(
name='kind',
type='str',
description='Type of delayed particle(s) to be produced from residuals created by fission',
restriction='type in {"none", "n,p,e,f,a", "all"}',
restriction='type.value in {"none", "n,p,e,f,a", "all"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand All @@ -3306,7 +3306,7 @@ def __init__(
name='kind',
type='str',
description='Type of delayed particle(s) to be produced by simple multi-particle reaction',
restriction='type in {"none", "n,p,e,f,a", "all"}',
restriction='type.value in {"none", "n,p,e,f,a", "all"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand All @@ -3316,7 +3316,7 @@ def __init__(
name='source',
type='str',
description='Delayed neutron data source',
restriction='source in {"model", "library", "both", "prompt"}',
restriction='source.value in {"model", "library", "both", "prompt"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand All @@ -3326,7 +3326,7 @@ def __init__(
name='source',
type='str',
description='Delayed gamma data source',
restriction='source in {"line", "mg", "none"}',
restriction='source.value in {"line", "mg", "none"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand Down Expand Up @@ -3386,7 +3386,7 @@ def __init__(
name='setting',
type='str',
description='Flag for correlated or uncorrelated',
restriction='setting in {"correlate", "nonfiss_cor"}',
restriction='setting.value in {"correlate", "nonfiss_cor"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand Down Expand Up @@ -3861,7 +3861,7 @@ def __init__(
name='setting',
type='str',
description='Multiple coulomb scattering setting',
restriction='setting in {"off", "fnal1", "gaussian", "fnal2"}',
restriction='setting.value in {"off", "fnal1", "gaussian", "fnal2"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand All @@ -3871,7 +3871,7 @@ def __init__(
name='setting',
type='str',
description='Slowing down energy losses setting',
restriction='setting in {"off", "strag1", "csda"}',
restriction='setting.value in {"off", "strag1", "csda"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand All @@ -3881,7 +3881,7 @@ def __init__(
name='setting',
type='str',
description='Nuclear reactions setting',
restriction='setting in {"off", "on", "atten", "remove"}',
restriction='setting.value in {"off", "on", "atten", "remove"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand All @@ -3891,7 +3891,7 @@ def __init__(
name='setting',
type='str',
description='Nuclear elastic scattering setting',
restriction='setting in {"off", "on"}',
restriction='setting.value in {"off", "on"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand Down Expand Up @@ -3967,7 +3967,7 @@ def __init__(
name='kind',
type='str',
description='Magnetic field type',
restriction='type in {"const", "quad", "quadff"}',
restriction='type.value in {"const", "quad", "quadff"}',
error='INVALID_DATA_PARAMETER',
),
AttributeScheme(
Expand Down Expand Up @@ -4537,7 +4537,7 @@ def __init__(
name='setting',
type='str',
description='Yes/No calculate point-kinetics parameters',
restriction='setting in {"yes", "no"}',
restriction='setting.value in {"yes", "no"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand All @@ -4547,7 +4547,7 @@ def __init__(
name='setting',
type='str',
description='Yes/No detailed precursor information',
restriction='setting in {"yes", "no"}',
restriction='setting.value in {"yes", "no"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand All @@ -4557,7 +4557,7 @@ def __init__(
name='fileopt',
type='str',
description='Format of sensity profiles output file',
restriction='fileopt in {",mctal"}',
restriction='fileopt.value in {",mctal"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand All @@ -4567,7 +4567,7 @@ def __init__(
name='setting',
type='str',
description='Yes/No FMAT',
restriction='setting in {"yes", "no"}',
restriction='setting.value in {"yes", "no"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand Down Expand Up @@ -4607,7 +4607,7 @@ def __init__(
name='setting',
type='str',
description='fmataccel',
restriction='setting in {"yes", "no"}',
restriction='setting.value in {"yes", "no"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand All @@ -4617,7 +4617,7 @@ def __init__(
name='setting',
type='str',
description='fmatreduce',
restriction='setting in {"yes", "no"}',
restriction='setting.value in {"yes", "no"}',
error='INVALID_DATA_OPTION_VALUE',
),
),
Expand Down
Loading

0 comments on commit 7e2ea28

Please sign in to comment.