Skip to content

flex_rf.tidy3d.GridRefinement

Type: class Base(s): Tidy3dBaseModel

Specification for local mesh refinement that defines the grid step size and the number of grid cells in the refinement region.

If both refinement_factor and dl are defined, the grid step size is upper bounded by the smaller value of the two. If neither is defined, default refinement_factor=2 is applied.

grid_refine = GridRefinement(refinement_factor = 2, num_cells = 7)
refinement_factor [PositiveFloat | None] = None

Refine grid step size in vacuum by this factor.

dl [PositiveFloat | None] = None

Grid step size in the refined region.

num_cells [PositiveInt] = 3

Number of grid cells in the refinement region.

override_structure(center: CoordinateOptional, grid_size_in_vacuum: float, drop_outside_sim: bool)

Generate override structure for mesh refinement.