gplugins.femwell.mode_solver.compute_cross_section_modes

gplugins.femwell.mode_solver.compute_cross_section_modes#

gplugins.femwell.mode_solver.compute_cross_section_modes(cross_section: CrossSection | str | dict[str, Any] | Callable[[...], CrossSection] | SymmetricalCrossSection | DCrossSection, layer_stack: LayerStack, wavelength: float = 1.55, num_modes: int = 4, order: int = 1, radius: float = inf, wafer_padding: float = 2.0, **kwargs: Any) Modes[source]#

Calculate effective index of a cross-section.

Defines a “straight” component of the cross_section, and calls compute_component_slice_modes.

Parameters:
  • cross_section – gdsfactory cross_section.

  • layer_stack – gdsfactory layer_stack.

  • wavelength – in um.

  • num_modes – to compute.

  • order – order of the mesh elements. 1: linear, 2: quadratic.

  • radius – defaults to inf.

  • wafer_padding – in um.

  • kwargs – kwargs for compute_component_slice_modes

Keyword Arguments:
  • solver – can be slepc or scipy.

  • resolution_specs (Dict) – meshwell resolution specifications. Format: {“layername”: [ConstantInField(resolution=float, apply_to=”surfaces”)]}

  • default_characteristic_length (float) – default gmsh characteristic length.

  • background_tag (str) – name of the background layer to add (default: no background added).

  • background_remeshing_file (Path) – optional background mesh file for refinement.

  • global_scaling (float) – global scaling factor.

  • verbosity (int) – GMSH verbosity level.