Releases: idaholab/MontePy
Releases · idaholab/MontePy
Release 1.1.0
Features Added
- Added
Universe.filled_cells
, a generator that yields the cells filled with that universe instance (#361). - Added
__eq__
dunder method toUniverse
to support equality comparisons (#361). - Changed general plane constants checker to support more than 9 constants (#761).
Bugs Fixed
- Fixed bug where MontePy would overly aggressively round outputs and remove the user's intent (#756).
- Fixed bug where a cell complement in the first five characters causes a spurious vertical mode detection (#753).
Contributors
Release 1.0.0
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 Material
is 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:
- Query, edit, and add nuclides to a specific material
- Change what the default library, e.g.,
nlib=80c
for a specific material - Find all materials that contain certain nuclides
- Create a new nuclide intuitively: e.g.,
montepy.Nuclide("U-235m1.80c")
- Materials are now iterable themselves.
General
This will also make it a lot easier to work with MontePy objects in general by:
- If a typo in made in an attribute an error raised. This prevents
cell.nuber = 5
from having no effect. - Create new objects with their just their string version of the MCNP input. You can create a new cell with
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
- Redesigned how Materials hold Material_Components. See migration guide (#507)
- Made it easier to create an Isotope (now Nuclide):
montepy.Nuclide("H-1.80c")
#505 - Improved material printing to avoid very long lists of components (#144)
- Allow querying for materials by components (#95)
- Added support for getting and setting default libraries, e.g.,
nlib
, from a material (#369) - Added most objects to the top level so they can be accessed like:
montepy.Cell
. - Made
Material.is_atom_fraction
settable (#511) - Added
Material.clear
to delete all components from aMaterial
(#655).
General Updates
- When a typo in an object attribute is made an Error is raised rather than 8000 silently having no effect (#508)
- Made NumberedObjectCollections act like a set (#138)
- Automatically added children objects, e.g., the surfaces in a cell, to the problem when the cell is added to the problem (#63).
- Added ability to parse all MCNP objects from a string (#88).
- Added function:
MCNP_Problem.parse
to parse arbitrary MCNP object (#88). - Warnings are no longer raised for comments that exceed the MCNP maximum line length (#188).
- If an importance is set for a particle type not included in
mode
a warning is raised, not an exception now (#381). - Allowed any
numbers.Real
ornumbers.Integral
for when type is enforced (#679). - Combine multiple
LineExpansionWarnings
coming from the same object on export (#198).
Bugs Fixed
- Made it so that a material created from scratch can be written to file (#512).
- Added support for parsing materials with parameters mixed throughout the definition (#182).
- Fixed bug where
surf.is_reflecting
would put an extra space in the output e.g.,* 1 PZ...
(#697). - Fixed bug where setting a lattice would print as
LAT=None
. Also switchedCellModifier
to print in the cell block by default (#699). - Fixed bug that wouldn't allow cloning most surfaces (#704).
- Fixed bug that crashed when some cells were not assigned to any universes (#705).
- Fixed bug where setting
surf.is_reflecting
toFalse
did not always get exported properly (#709). - Fixed bug where setting multiple universes for a cell fill not being properly exported (#714).
- Corrected bug where blank importance objects can't be printed (#549).
- Fixed bug where the
i
("x") andk
("z") dimensions of multiple universe matrixfills
were switched (#726).
Breaking Changes
- Removed
Material.material_components
(#507) - Removed
Isotope
and changed them toNuclide
- Removed
MCNP_Problem.add_cell_children_to_problem
as it is no longer needed.
Release 1.0.0a4
Bug fixes
- Fixed bug where
surf.is_reflecting
would put an extra space in the output e.g.,* 1 PZ...
(#697). - Fixed bug where setting a lattice would print as
LAT=None
. Also switchedCellModifier
to print in the cell block by default (#699). - Fixed bug that wouldn't allow cloning most surfaces (#704).
- Fixed bug that crashed when some cells were not assigned to any universes (#705).
- Fixed bug where setting
surf.is_reflecting
toFalse
did not always get exported properly (#709).
Release 0.5.5
Bug Fixes
- Fixed parsing bug with sigma baryon particles (e.g.,
+/-
) (#671).
Documentation Updates
- Various documentation updates from PyOpenSci review.
Release 1.0.0a3
Release 1.0.0a2
Second alpha-release of 1.0.0
Features added
- Warnings are no longer raised for comments that exceed the maximum line lengths (#188).
- Particle type exceptions are now warnings, not errors (#381).
- Allow any
Real
type for floating point numbers and anyIntegral
type for integer numbers during type enforcement (#679). - Added
strict
option tocontains
and changedcontains
tocontains_all
, andcontains_any
.
Release 0.5.4
Release 1.0.0a1
Features Added
- Redesigned how Materials hold Material_Components. See the migration plan (#507).
- Made it easier to create an Isotope (now Nuclide):
montepy.Nuclide("H-1.80c")
(#505). - When a typo in an object attribute is made an Error is raised rather than silently having no effect (#508).
- Improved material printing to avoid very long lists of components (#144).
- Allow querying for materials by components (#95).
- Added support for getting and setting default libraries, e.g.,
nlib
, from a material (#369). - Added most objects to the top level so they can be accessed like:
montepy.Cell
. - Made
Material.is_atom_fraction
settable (#511). - Made NumberedObjectCollections act like a set (#138).
- Automatically added children objects, e.g., the surfaces in a cell, to the problem when the cell is added to the problem (#63).
- Added ability to parse all MCNP objects from a string (#88).
- Added function:
montepy.mcnp_problem.MCNP_Problem.parse
to parse arbitrary MCNP object (#88). - An error is now raised when typos in object attributes are used, e.g.,
cell.nubmer
(#508).
Bugs Fixed
- Made it so that a material created from scratch can be written to file (#512).
- Added support for parsing materials with parameters mixed throughout the definition (#182).
Breaking Changes
- Removed
montepy.data_inputs.material.Material.material_components
. See the migration plan (#507). - Removed
montepy.data_inputs.isotope.Isotope
and changed them tomontepy.data_inputs.nuclide.Nuclide
. - Removed
montepy.mcnp_problem.MCNP_Problem.add_cell_children_to_problem
as it is no longer needed.
Release 0.5.3.post1
Merge pull request #610 from idaholab/relax_sly Relax sly dependency to include sly 0.4
Release 0.5.3
Bug Fixes
- Fixed how material components work so new components can actually be added to a material and exported (#597).