Skip to content

v1.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 27 Nov 17:05

Added

  • pymcnp check --fix -o <file> (--output=<file>) writes the fixed file to <file> and leaves the input as it is; Check.fix(output) in Python. Lines --fix cannot shorten are reported with the output's line numbers. --output without --fix is a usage error (exit 2).
  • The mplot data card (inp.card.data.Mplot), e.g., mplot tal 4 freq 1000; its plot commands are kept as words, without expanding shorthands.
  • pymcnp convert names the fatal errors that stopped MCNP when an OUTP file has no tallies to convert, e.g., "nothing to convert; no file written. MCNP stopped with a fatal error: illegal entry: xdmf", instead of only "nothing to convert".
  • Usage errors of every command say what is wrong, e.g., "Unknown option --partquet; did you mean --parquet?", "Give --csv or --parquet." or "pymcnp check needs .", before the usage, instead of docopt's "found unmatched (duplicate?) arguments" with its internal patterns, or nothing. They still exit with 2.

Fixed

  • A card whose name starts in columns 2-5, e.g., 100 0 1, failed to parse ("Expected Cell"). One to four blanks before a card name start a card, as in MCNP, and five or more mark a continuation line. Lines indented by one to four blanks that PyMCNP read as continuation lines, which MCNP reads as new cards, now start a card too.
  • An sp or sb card with a built-in function and fewer than two parameters, e.g., sp1 -21 1 or sp1 -5, failed to parse; its parameters are optional, as in MCNP. Probabilities may exceed 1, as MCNP normalizes them: sp1 0 2 3 was read as function 0 with parameters 2 and 3. A function number must be negative.
  • pymcnp visualize, and Visualize, failed with "Invalid value." for a cell that complements a cell after it, e.g., #415 in cell 200 before cell 415; a cell may complement any cell of the file, as in MCNP. Cells that complement each other in a loop raise abc.Error "Cells complement each other in a loop.".
  • pymcnp visualize, and Visualize, reported a cell or surface that is not in the file as "Invalid value." with its number, or ended in a Python traceback for a surface with a sign, e.g., -7; the error now names both, e.g., "Cell 1 refers to surface 7, which is not in the file.", followed by the cell card. Geometry.to_show raises inp.literal.Geometry.Missing.