Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importance not recompressing Shortcuts on export #397

Open
MicahGale opened this issue Apr 11, 2024 · 1 comment
Open

Importance not recompressing Shortcuts on export #397

MicahGale opened this issue Apr 11, 2024 · 1 comment
Labels
bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". low priority

Comments

@MicahGale
Copy link
Collaborator

Describe the bug

An imp input for a large model would not recompress on export and created lines and lines of 1 1 1 1 1...

To Reproduce

>>> problem = montepy.read_input("foo.imcnp")
>>>  print(problem.cells._importance._tree)
(Node: data: {'start_pad': (Padding, [COMMENT:
C data, '\n']), 'classifier': (Classifier: mod: None, prefix: (Value, imp, padding: None), number: None, particles: :n), 'keyword': (Value, None, padding: None), 'data': (list: number sequence, [(shortcut:Shortcuts.REPEAT: deque([(Value, 1.0, padding: (Padding, [' '])), (Value, 1.0, padding: (Padding, [' '])), (Value, 1.0, padding: (Padding, [' ']))])), (Value, 0.0, padding: None)])})

>>> print(problem.cells._importance._tree.format())
C data
imp:n 1 2r 0

>>> print(problem.cells._importance.format_for_mcnp_input((6,2,0)))
['C data', 'imp:n 1 1 1 0']

Error Message (if any)
None

MCNP input file snippet

test
C cells
1 0 -1
2 0 -1
3 0 -1
4 0 -1

C surfaces
1 so 5

C data
imp:n 1 2r 0

Version

  • Version 0.2.5
@MicahGale MicahGale added the bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". label Apr 11, 2024
@MicahGale
Copy link
Collaborator Author

Is this resolved by #520?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". low priority
Projects
None yet
Development

No branches or pull requests

1 participant