glow package
GLOW (Geometry Layout Oriented Workflow) is a Python package providing 2D unstructured geometries to the DRAGON5 lattice transport computer code.
Subpackages
- glow.generator package
- Submodules
- glow.generator.export_data module
- glow.generator.generator module
- glow.generator.geom_extractor module
LayoutDataExtractorLayoutDataExtractor.geometry_layoutLayoutDataExtractor.bordersLayoutDataExtractor.boundariesLayoutDataExtractor.subfacesLayoutDataExtractor.edgesLayoutDataExtractor.id_vs_edgeLayoutDataExtractor.layout_edgesLayoutDataExtractor.layout_centreLayoutDataExtractor.dimensionsLayoutDataExtractor.build_boundaries()LayoutDataExtractor.build_edges()LayoutDataExtractor.build_edges_and_faces_association()LayoutDataExtractor.build_faces()LayoutDataExtractor.print_log_analysis()LayoutDataExtractor.CASES_FOR_TRANSLATION
analyse_layout()
- glow.geometry_layouts package
- Submodules
- glow.geometry_layouts.cells module
- glow.geometry_layouts.fillable_layouts module
FillableFillable.dimensionsFillable.entry_idFillable.geom_objFillable.geometry_mapsFillable.layersFillable.nameFillable.oFillable.regionsFillable.rot_angleFillable.shapeFillable.stateFillable.symmetry_mapFillable.add()Fillable.apply_symmetry()Fillable.clone()Fillable.get_geometry_map()Fillable.get_regions()Fillable.get_regions_with_symmetry()Fillable.print_region_info()Fillable.restore()Fillable.rotate()Fillable.scale()Fillable.set_region_properties()Fillable.show()Fillable.translate()Fillable.update()Fillable.update_hierarchical_structure()
find_region_path_in_tree()follow_path_to_node()get_region_in_tree()print_subtree()
- glow.geometry_layouts.geometries module
- glow.geometry_layouts.lattices module
CartesianLatticeCartesianLattice.dimensionsCartesianLattice.entry_idCartesianLattice.geom_objCartesianLattice.geometry_mapsCartesianLattice.layersCartesianLattice.nameCartesianLattice.oCartesianLattice.regionsCartesianLattice.rot_angleCartesianLattice.shapeCartesianLattice.stateCartesianLattice.symmetry_mapCartesianLattice.add_ring_of_cells()CartesianLattice.add_rings_of_cells()
HexLatticeLatticecompute_subdivision_points_on_borders()ensure_not_zero()get_cell_at_centres()
- glow.geometry_layouts.layouts module
LayoutLayoutStateRegionRegion.colorRegion.dimensionsRegion.entry_idRegion.geom_objRegion.nameRegion.oRegion.propertiesRegion.region_idRegion.rot_angleRegion.clone()Region.reset_region_color()Region.rotate()Region.scale()Region.set_region_color()Region.show()Region.translate()Region.update()Region.colorRegion.propertiesRegion.region_id
associate_colors_to_regions()build_compound_regions()get_unique_values_for_property()is_layout_contained()DEFAULT_REGION_COLOR
- glow.geometry_layouts.symmetry_management module
- glow.interface package
- Submodules
- glow.interface.geom_entities module
- 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_in_place_by_hystory()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()get_tolerances()is_gui_available()is_point_inside_shape()limit_tolerance()make_arc()make_arc_center()make_cdg()make_circle()make_common()make_compound()make_cut()make_edge()make_face()make_fuse()make_intersection()make_line()make_multi_translation_1d()make_partition()make_partition_non_self_intersecting()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_extra_edges()remove_from_study()set_color_face()set_shape_name()update_salome_study()
- glow.support package
- Submodules
- glow.support.types module
BoundaryTypeEdgeTypeGeometryTypeLayoutGeometryTypeLayoutGeometryType.HEXAGON_TRANLayoutGeometryType.ISOTROPICLayoutGeometryType.R120LayoutGeometryType.RA60LayoutGeometryType.RECTANGLE_EIGHTLayoutGeometryType.RECTANGLE_SYMLayoutGeometryType.RECTANGLE_TRANLayoutGeometryType.ROTATIONLayoutGeometryType.S30LayoutGeometryType.SA60LayoutGeometryType.SYMMETRIES_TWO
LayoutTypePropertyTypeSymmetryType
- glow.support.utility module
are_same_shapes()build_arcs_for_rounded_corners()build_compound_borders()build_contiguous_edges()build_subdvision_vertices_on_edge()build_z_axis_from_vertex()check_shape_expected_types()check_type_geo_consistency()compute_point_by_reference()flatten_list()generate_unique_random_colors()get_angle_between_points()get_id_from_name()get_id_from_shape()get_vertex_polar_position()get_vertices_on_edges()is_vertex_on_edge()retrieve_selected_object()sort_shapes_from_vertex()translate_wrt_reference()
Submodules
glow.main module
- class TdtSetup(geom_type: GeometryType = GeometryType.TECHNOLOGICAL, property_types: PropertyType | List[PropertyType] = PropertyType.MATERIAL, albedo: float | None = None, type_geo: LayoutGeometryType = LayoutGeometryType.ISOTROPIC, symmetry_type: SymmetryType = SymmetryType.FULL)[source]
Bases:
objectDataclass holding the settings for configuring how to export the TDT file for the current 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.LayoutGeometryType.ISOTROPIC). IfNone, the value that corresponds to the type of geometry of the layout is used, i.e.0.0for values ofLayoutGeometryTypegreater than zero,1.0otherwise.- albedo: float | None = None
Identifying the value for the albedo applied to the layout’s BCs.
- geom_type: GeometryType = 0
Identifying the type of geometry layout.
- layout_type: LayoutType
Identifying the type of the layout.
- property_types: PropertyType | List[PropertyType] = 0
Identifying the type(s) of property associated to the layout’s regions.
- symmetry_type: SymmetryType = 0
Identifying the value for the symmetry type applied to the layout.
- type_geo: LayoutGeometryType = 0
Identifying the value for the typgeo index used by the SALT module of DRAGON5.
- export_layout_to_tdt(layout: Fillable, filename: str, tdt_setup: TdtSetup = TdtSetup(GeometryType.TECHNOLOGICAL, PropertyType.MATERIAL, None), compound_to_export: Any | None = None) None[source]
Function that analyses the given layout, as instance of the
Fillableclass, 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.By properly configuring the
TdtSetupinstance, provided as third parameter, users can indicate which information about the geometry needs to be extracted from the layout and the tracking setup. In particular, the available options are:the geometry type of the layout (either the technological or the refined geometry);
the type(s) of property associated to the regions of the layout;
the value for the albedo applied to the BCs of the layout. If
None, a default value that corresponds to the geometry type of the layout is adopted;the value for the type_geo attribute which drives the type of tracking (either TISO or TSPC) to adopt accordingly with what requested by the SALT: module of DRAGON5;
the type of symmetry applied to the layout.
When specifying values for the type of symmetry which differ from the one currently applied to the layout, and specified in the the state attribute of the given
Fillableobject, the indicated symmetry is applied, if the corresponding shape of symmetry has already been built by calling theapply_symmetrymethod.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 layout. The indicated compound object must be a portion of the entire layout, otherwise the successive steps of the analysis will fail.- Parameters:
layout (Fillable) – The layout, as instance of the
Fillablesubclasses, storing the information about the geometry and the assigned properties.filename (str) – The name of the output TDT file.
tdt_setup (TdtSetup) – Dataclass providing the settings for exporting the TDT representation of the geometry layout.
compound_to_export (Any | None = None) – The compound object (as portion of the layout) to analyse and export to TDT, if provided.
- Raises:
RuntimeError – In case of inconsistencies in the values of the
TdTSetupsettings. If the analysis fails due to the compound not being part of the layout, no properties being found for any region of the layout, or the layout borders being impossible to obtain.
Notes
Users should note that:
The configuration values provided in the
TdtSetupinstance are considered regardless of what set in the givenFillableobject.The configuration values provided in the
TdtSetupinstance must match with the indicated compound object. If values that do not match with the shape of the compound are provided, the validity of the results in DRAGON cannot be assured.