gplugins.gmsh.xy_xsection_mesh

gplugins.gmsh.xy_xsection_mesh#

gplugins.gmsh.xy_xsection_mesh(component: Component | DInstance, z: 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: tuple[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, verbosity: int | None = 0, round_tol: int = 3, simplify_tol: float = 0.001, n_threads: int = 4, port_names: list[str] | None = None, gmsh_version: float | None = None, interface_delimiter: str = '___', layer_port_delimiter: str | None = None, background_remeshing_file: str | None = None, optimization_flags: tuple[tuple[str, int]] | None = None, **kwargs: Any)[source]#

Mesh xy cross-section of component at height z.

Parameters:
  • component (Component) – gdsfactory component to mesh

  • z (float) – z-coordinate at which to sample the LayerStack

  • 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 – default characteristic length for 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

  • global_scaling – scaling factor for the mesh

  • global_scaling_premesh – scaling factor for the mesh before meshing

  • global_2D_algorithm – gmsh 2D algorithm to use

  • filename (str, path) – where to save the .msh file

  • verbosity – verbosity level for gmsh

  • 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)

  • n_threads – number of threads to use for mesh generation

  • port_names – list of port names to mesh

  • gmsh_version – gmsh version to use

  • interface_delimiter – delimiter to use for new layers generated for interfaces: “layer{interface_delimiter}interface_name”.

  • layer_port_delimiter – Delimiter to use for new layers generated for ports: “layer{delimiter}port_name”.

  • background_remeshing_file – filename to load background remeshing from.

  • optimization_flags – flags for Model.mesh

  • kwargs – kwargs for Model.mesh