t4_geom_convert.Kernel.FileHandlers.Parser package
Submodules
t4_geom_convert.Kernel.FileHandlers.Parser.ParseMCNPCell module
- exception t4_geom_convert.Kernel.FileHandlers.Parser.ParseMCNPCell.MissingLatticeOptError
Bases:
ExceptionAn exception class to raise when the
--latticeoption is missing.
- class t4_geom_convert.Kernel.FileHandlers.Parser.ParseMCNPCell.ParseMCNPCell(mcnp_parser, cell_cache_path, lattice_params)
Bases:
objectClass that parses the CELLS block.
- LIKE_RE = re.compile('like\\s+(\\d+)\\s+but')
- static apply_but(parsed_cell, but_options)
Extend the list of cell options with the BUT options.
- parse()
:brief method which permit to recover the information of each line of the block CELLS :return: dictionary which contains the ID of the cells as a key and as a value, a object from the
CellMCNPclass.
- parse_all_cells()
Actually parse the cells.
- parse_importance_cards()
Parse any importance cards and return the maximum importance value for each cell.
- parse_keywords(kw_list)
Parse the list of keywords following the cell definition.
- static parse_lat_kw(kw_list)
Parse the argument of the LAT keyword.
- static parse_material(material)
Parse the material/density pair.
- parse_one_cell(parsed_cells, rank, lat_opt, parsed_cell)
Handle the
LIKE n BUTsyntax, delegate the real parsing toparse_one_cell_worker().
- static to_fillid(kws, lat_opt)
Convert the values of the fill-related keywords into a single fillid specification.
t4_geom_convert.Kernel.FileHandlers.Parser.ParseMCNPComposition module
- t4_geom_convert.Kernel.FileHandlers.Parser.ParseMCNPComposition.parseMCNPComposition(mcnpParser)
:brief method which permit to recover the information of each line of the block SURFACE :return: dictionary which contains the ID of the materials as a key and as a value, a object from the class CCompositionMCNP
t4_geom_convert.Kernel.FileHandlers.Parser.ParseMCNPSurface module
- t4_geom_convert.Kernel.FileHandlers.Parser.ParseMCNPSurface.normalize_surface(typ, params)
Put the surface parametrization in a canonical form. For instance, planes defined by three points are transformed into the equivalent (A,B,C,D) representation.
- t4_geom_convert.Kernel.FileHandlers.Parser.ParseMCNPSurface.parseMCNPSurface(mcnp_parser)
Function that recovers the information of each line of the block SURFACE.
- Returns:
dictionary with keys given by the ID of the surfaces, as a
MIPSurface, and value given by lists of (:class:`~.SurfaceMCNP, int)` pairs. The integer represents the side of the subsurface.
- t4_geom_convert.Kernel.FileHandlers.Parser.ParseMCNPSurface.to_surface_mcnp(key, bound_cond, transform_id, enum_surface, params, transform_parsed)
Convert the parsed surface into a
SurfaceMCNP.
- t4_geom_convert.Kernel.FileHandlers.Parser.ParseMCNPSurface.to_surfaces_macro(key, bound_cond, transform_id, enum_surface, params, transform_parsed)
Convert the parsed macro body into a collection of
SurfaceMCNP.
- t4_geom_convert.Kernel.FileHandlers.Parser.ParseMCNPSurface.to_surfaces_mcnp(key, parsed_surface, transform_parsed)
Convert the parsed surface into a collection of
SurfaceMCNP.This function returns a list of
(int, SurfaceMCNP)pairs. The integers represent the side of the surface that should be considered as positive (±1).