glow package
GLOW (Geometry Layout Oriented Workflow) is a Python is a Python package providing 2D unstructured geometries to the DRAGON5 lattice transport computer code.
Subpackages
- glow.generator package
- Submodules
- glow.generator.generator module
- glow.generator.geom_extractor module
BoundaryEdgeFaceLatticeDataExtractorLatticeDataExtractor.latticesLatticeDataExtractor.bordersLatticeDataExtractor.boundariesLatticeDataExtractor.subfacesLatticeDataExtractor.edgesLatticeDataExtractor.id_vs_edgeLatticeDataExtractor.lattice_edgesLatticeDataExtractor.type_geoLatticeDataExtractor.layout_centerLatticeDataExtractor.dimensionsLatticeDataExtractor.build_boundaries()LatticeDataExtractor.build_edges()LatticeDataExtractor.build_edges_and_faces_association()LatticeDataExtractor.build_faces()LatticeDataExtractor.print_log_analysis()LatticeDataExtractor.CASES_FOR_TRANSLATION
analyse_lattice()build_edge_id()classify_lattice_edges()
- glow.geometry_layouts package
- Submodules
- glow.geometry_layouts.cells module
CellCell.cell_typeCell.faceCell.face_entry_idCell.figureCell.inner_circlesCell.is_windmill_appliedCell.nameCell.regionsCell.rotationCell.sectorized_faceCell.tech_geom_propsCell.tech_geom_sect_optsCell.displayed_geomCell.add_circle()Cell.extract_subfaces()Cell.get_centered_circles()Cell.get_regions_info()Cell.remove_circle()Cell.restore()Cell.rotate()Cell.rotate_from_axis()Cell.sectorize()Cell.set_properties()Cell.set_region_property()Cell.show()Cell.translate()Cell.update_geometry()Cell.update_geometry_from_face()Cell.VALID_SECTOR_NO_VS_ANGLE
GenericCellGenericCell.cell_typeGenericCell.faceGenericCell.face_entry_idGenericCell.figureGenericCell.inner_circlesGenericCell.is_windmill_appliedGenericCell.nameGenericCell.regionsGenericCell.rotationGenericCell.sectorized_faceGenericCell.tech_geom_propsGenericCell.tech_geom_sect_optsGenericCell.displayed_geomGenericCell.sectorize()GenericCell.VALID_SECTOR_NO_VS_ANGLE
HexCellHexCell.apothemHexCell.cell_typeHexCell.edge_lengthHexCell.faceHexCell.face_entry_idHexCell.figureHexCell.inner_circlesHexCell.is_windmill_appliedHexCell.nameHexCell.regionsHexCell.rotationHexCell.sectorized_faceHexCell.tech_geom_propsHexCell.tech_geom_sect_optsHexCell.displayed_geomHexCell.sectorize()HexCell.VALID_SECTOR_NO_VS_ANGLE
RectCellRectCell.cell_typeRectCell.faceRectCell.face_entry_idRectCell.figureRectCell.heightRectCell.inner_circlesRectCell.is_windmill_appliedRectCell.nameRectCell.regionsRectCell.rotationRectCell.sectorized_faceRectCell.tech_geom_propsRectCell.tech_geom_sect_optsRectCell.displayed_geomRectCell.widthRectCell.sectorize()RectCell.VALID_SECTOR_NO_VS_ANGLE
Regioncheck_cell_circle_are_cut()get_region_info()
- glow.geometry_layouts.geometries module
CircleGenericSurfaceHexagonRectangleSurfaceSurface.oSurface.bordersSurface.faceSurface.nameSurface.face_entry_idSurface.verticesSurface.out_circleSurface.rotationSurface.lxSurface.lySurface.rotate()Surface.rotate_from_axis()Surface.show_borders()Surface.show_edges_and_vertices()Surface.show_face()Surface.translate()Surface.update_from_face()
build_hexagon()
- glow.geometry_layouts.lattices module
LatticeLattice.lattice_centerLattice.cells_typeLattice.lattice_cellsLattice.layersLattice.nameLattice.lattice_cmpdLattice.lattice_entry_idLattice.rings_noLattice.distanceLattice.symmetry_typeLattice.lxLattice.lyLattice.box_layersLattice.lattice_symmLattice.regionsLattice.displayed_geomLattice.is_update_neededLattice.add_cell()Lattice.add_ring_of_cells()Lattice.add_rings_of_cells()Lattice.apply_symmetry()Lattice.build_lattice_box()Lattice.build_regions()Lattice.get_regions_info()Lattice.restore_cells()Lattice.rotate()Lattice.set_lattice_box_properties()Lattice.set_region_property()Lattice.set_type_geo()Lattice.show()Lattice.translate()Lattice.VALID_CELLS_ANGLESLattice.cells_rotLattice.lattice_boxLattice.type_geo
get_changed_cells()get_compound_from_geometry()
- glow.interface package
- Submodules
- glow.interface.geom_interface module
ShapeTypeadd_to_study()add_to_study_in_father()clear_view()display_shape()extract_sorted_sub_shapes()extract_sub_shapes()fuse_edges_in_wire()get_angle_between_shapes()get_basic_properties()get_bounding_box()get_closed_free_boundary()get_id_from_object()get_in_place()get_inertia_matrix()get_kind_of_shape()get_min_distance()get_object_from_id()get_point_coordinates()get_selected_object()get_shape_name()get_shape_type()get_subshape_id()is_gui_available()is_point_inside_shape()make_arc_edge()make_cdg()make_circle()make_common()make_compound()make_cut()make_edge()make_face()make_fuse()make_line()make_partition()make_rotation()make_scale()make_translation()make_vector()make_vector_from_points()make_vertex()make_vertex_inside_face()make_vertex_on_curve()make_vertex_on_lines_intersection()make_wire()remove_from_study()set_color_face()set_shape_name()update_salome_study()
- glow.support package
- Submodules
- glow.support.types module
BoundaryTypeCellTypeEdgeTypeGeometryTypeLatticeGeometryTypeLatticeGeometryType.HEXAGON_TRANLatticeGeometryType.ISOTROPICLatticeGeometryType.R120LatticeGeometryType.RA60LatticeGeometryType.RECTANGLE_EIGHTLatticeGeometryType.RECTANGLE_SYMLatticeGeometryType.RECTANGLE_TRANLatticeGeometryType.ROTATIONLatticeGeometryType.S30LatticeGeometryType.SA60LatticeGeometryType.SYMMETRIES_TWO
PropertyTypeSymmetryType
- glow.support.utility module
are_same_shapes()build_compound_borders()build_contiguous_edges()check_shape_expected_types()check_type_geo_consistency()compute_point_by_reference()generate_unique_random_colors()get_angle_between_points()get_id_from_name()get_id_from_shape()is_collinear()make_infinite_axis()retrieve_selected_object()sort_vertices_radially()translate_wrt_reference()
Submodules
glow.main module
- class TdtSetup(geom_type: GeometryType = GeometryType.TECHNOLOGICAL, property_type: PropertyType = PropertyType.MATERIAL, albedo: float | None = None, type_geo: LatticeGeometryType = LatticeGeometryType.ISOTROPIC, symmetry_type: SymmetryType = SymmetryType.FULL)[source]
Bases:
objectDataclass holding the settings for configuring how to export the TDT file for the lattice’s geometry layout.
Notes
The albedo attribute can have values between
0.0and1.0, with the latter case indicating the ALBE 1.0 BC used in DRAGON5 with a uniform tracking (i.e.LatticeGeometryType.ISOTROPIC). IfNone, the value that corresponds to the type of geometry of the lattice is used, i.e.0.0for values ofLatticeGeometryTypegreater than zero,1.0otherwise.- albedo: float | None = None
Identifying the value for the albedo applied to the lattice’s BCs.
- geom_type: GeometryType = 0
Identifying the type of geometry of the lattice’s cells.
- property_type: PropertyType = 0
Identifying the type of property associated to lattice’s regions.
- symmetry_type: SymmetryType = 0
Identifying the value for the symmetry type applied to the lattice.
- type_geo: LatticeGeometryType = 0
Identifying the value for the typegeo related to the layout.
- analyse_and_generate_tdt(lattices: List[Lattice], filename: str, tdt_config: TdtSetup = TdtSetup(GeometryType.TECHNOLOGICAL, PropertyType.MATERIAL, None), compound_to_export: Any | None = None) None[source]
Function that analyses the given lattices, as instance of the
Latticeclass, to extract information about the characteristics of its geometry and the properties associated to its regions. A TDT file, whose name is provided as second parameter, is generated, collecting all this information. Users can also specify to analyse the lattice according to:the geometry type of its cells;
the type of property associated to the lattice regions;
the value for the albedo applied to the lattice’s BCs. If
None, a default value that corresponds to the lattice’s geometry type is adopted;the value for the typegeo parameter;
the type of symmetry applied to the single lattice or the colorset.
When exporting one or more
Latticeinstances provided by the input list, the typegeo and the symmetry type values of theTdtSetupinstance are neglected. The values of the corresponding attributes for the first lattice in the list (taken as reference) are considered instead.If the
compound_to_exportparameter is provided, it will be the one to be analysed and exported, according to the property information stored in the provided lattices. The indicated compound object must be a portion of the lattices, otherwise the successive steps of the analysis will fail. The values for the typegeo parameter and the symmetry type provided in theTdtSetupinstance are considered regardless of what set in the list of involved lattices, even if only one lattice is present. Users should note that these two values must match with the provided compound. If values that do not match with the shape of the compound are provided, the validity of the results in DRAGON cannot be assured.- Parameters:
lattices (List[Lattice]) – The object storing the information about the geometry and the properties of the lattices.
filename (str) – The name of the output TDT file.
tdt_config (TdtSetup) – Dataclass providing the settings for exporting the TDT representation of the geometry layout of the lattice.
compound_to_export (Any | None = None) – The compound object to analyse and export to TDT, if present. If
Noneis given, the lattices are considered instead.
- Raises:
RuntimeError – When multiple lattices, and no compound, are provided and they do not have the same
SymmetryType.FULLsymmetry. When a compound is provided and the corresponding lattices do not have the sameSymmetryType.FULLsymmetry. In case of inconsistencies in the values of theTdTSetupsettings. If the analysis fails due to the compound not been part of the lattices, no property found for a region, the impossibility to get the borders of the layout to export.