Conversation
…rating-over-values-in-the-correct-order Handled issue with fill matrices iterating in the wrong order.
Rename Cell.lattice -> Cell.lattice_type and deprecate Cell.lattice
Made lazy mcnp format string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
This release primarily focuses on redesigning the material interface. For details see the migration guide. Also the updated getting started guide shows how to use a lot of these new features.
Materials
The biggest change is that
Materialis no longer a wrapper of dictionary; it now behaves like a list.This will make it a lot easier to do the following with materials:
nlib=80cfor a specific materialmontepy.Nuclide("U-235m1.80c")General
This will also make it a lot easier to work with MontePy objects in general by:
cell.nuber = 5from having no effect.montepy.Cell("1 0 -2 imp:n=1"). In a lot of cases it's a better idea to do:problem.parse("1 0 -2 imp:n=1").Features Added
Material Interface Changes
montepy.Nuclide("H-1.80c")Improve Isotope Instantiation #505nlib, from a material (Add support for particle specific libraries and default libraries. #369)montepy.Cell.Material.is_atom_fractionsettable (MakeMaterial.is_atom_fractionsettable #511)Material.clearto delete all components from aMaterial(Make Particle Type errors into warnings #655).General Updates
MCNP_Problem.parseto parse arbitrary MCNP object (Improve ab initio DataCard __init__ #88).modea warning is raised, not an exception now (Treat missing particle types a Warning, not an error at least for parsing #381).numbers.Realornumbers.Integralfor when type is enforced (Relax 'float' type enforcement to any real number and 'int' type enforcement to any integral #679).LineExpansionWarningscoming from the same object on export (Combine lineExpansionWarnings for a single input #198).Bugs Fixed
surf.is_reflectingwould put an extra space in the output e.g.,* 1 PZ...(Setting a surface as reflecting creates invalid syntax #697).LAT=None. Also switchedCellModifierto print in the cell block by default (Cell lattice, fill, and universe aren't where I expect them to be. #699).surf.is_reflectingtoFalsedid not always get exported properly (Surfaces can't be unset from is_reflecting #709).i("x") andk("z") dimensions of multiple universe matrixfillswere switched (Fill multi-array is not iterating over values in the correct order #726).Breaking Changes
Material.material_components(Mat redesign #507)Isotopeand changed them toNuclideMCNP_Problem.add_cell_children_to_problemas it is no longer needed.📚 Documentation preview 📚: https://montepy--720.org.readthedocs.build/en/720/