Deck Formatter

mcnpy.deck_formatter.deck_cleanup(inp)[source]
mcnpy.deck_formatter.formatter(deck, title=None)[source]

Used to serialize the deck as a string. There are currently some spacing issues when making new deck objects. Some ad-hoc corrections are made. Will address this later.

mcnpy.deck_formatter.line_wrap(before_comment, comment, line_limit)[source]
mcnpy.deck_formatter.preprocessor(filename)[source]

Removes specific syntax features which parse correctly, but later serialize problematicly.

mcnpy.deck_formatter.print_lattice(line, p, line_limit, comment)[source]
mcnpy.deck_formatter.print_material(line, p, line_limit, comment)[source]