gplugins.gmsh.uz_xsection_mesh#
- gplugins.gmsh.uz_xsection_mesh(component: Component | ComponentReference, xsection_bounds: tuple[tuple[float, float], tuple[float, float]], layer_stack: LayerStack, layer_physical_map: dict, layer_meshbool_map: dict, resolutions: dict | None = None, default_characteristic_length: float = 0.5, background_tag: str | None = None, background_padding: Sequence[float, float, float, float, float, float] = (2.0, 2.0, 2.0, 2.0, 2.0, 2.0), background_mesh_order: int | float = 9223372036854775807, global_scaling: float = 1, global_scaling_premesh: float = 1, global_2D_algorithm: int = 6, filename: str | None = None, round_tol: int = 4, simplify_tol: float = 0.0001, u_offset: float = 0.0, left_right_periodic_bcs: bool = False, verbosity: int | None = 0, n_threads: int = 4, gmsh_version: float | None = None, interface_delimiter: str = '___', background_remeshing_file=None, optimization_flags: tuple[tuple[str, int]] | None = None, **kwargs)[source]#
Mesh uz cross-section of component along line u = [[x1,y1] , [x2,y2]].
- Parameters:
component (Component) – gdsfactory component to mesh
xsection_bounds (Tuple) – Tuple [[x1,y1] , [x2,y2]] parametrizing the line u
layer_stack (LayerStack) – gdsfactory LayerStack to parse
layer_physical_map – map layer names to physical names
layer_meshbool_map – map layer names to mesh_bool (True: mesh the prisms, False: don’t mesh)
resolutions (Dict) – Pairs {“layername”: {“resolution”: float, “distance”: “float}} to roughly control mesh refinement
default_characteristic_length (float) – default characteristic length to use in the mesh.
background_tag (str) – name of the background layer to add (default: no background added)
background_padding (Tuple) – [xleft, ydown, xright, yup] distances to add to the components and to fill with background_tag
background_mesh_order (int, float) – mesh order to assign to the background
round_tol – during gds –> mesh conversion cleanup, number of decimal points at which to round the gdsfactory/shapely points before introducing to gmsh
global_scaling – global scaling factor to apply to the mesh.
global_scaling_premesh – global scaling factor to apply to the mesh before meshing.
global_2D_algorithm – gmsh 2D meshing algorithm to use.
filename – filename to save the mesh to.
round_tol – during gds –> mesh conversion cleanup, number of decimal points at which to round the gdsfactory/shapely points before introducing to gmsh.
simplify_tol – during gds –> mesh conversion cleanup, shapely “simplify” tolerance (make it so all points are at least separated by this amount)
u_offset – quantity to add to the “u” coordinates, useful to convert back to x or y if parallel to those axes
atol – tolerance used to establish equivalency between vertices
left_right_periodic_bcs – if True, makes the left and right simulation edge meshes periodic
verbosity – verbosity level of gmsh
n_threads – number of threads to use in gmsh.
gmsh_version – gmsh version to use.
interface_delimiter – delimiter to use in the interface names
background_remeshing_file – .pos file to use as a remeshing field. Overrides resolutions if not None.
optimization_flags – list of tuples containing optimization flags to pass to gmsh.
kwargs – additional arguments to pass to the meshing function.