# Local Mesh Refinement

Local Mesh Refinement defines a local region that influences mesh generation without adding a physical structure to the model.

This object corresponds to tidy3d.MeshOverrideStructure (opens new window).

Local mesh refinement is commonly used to refine conductors, dielectric gaps, feeds, ports, and regions with strong field variation.

# Name

name: Unique name for the override structure.

  • Required field

# Geometry

Specification of the override region.

# Center + Size

Object definition through a center position and size.

center: Center of the override region in x, y, and z-directions.

  • Type: floating-point number
  • Unit: m, mm (default unit), um

size: Size of the override region in x, y, and z-directions.

  • Type: floating-point number
  • Unit: m, mm (default unit), um
  • Constraint: greater than or equal to 0
  • Required field

# Bounds

Object definition through minimum and maximum coordinate bounds.

min: Values of the x, y, and z coordinates defining the lower corner of the override region.

  • Type: floating-point number
  • Unit: m, mm (default unit), um
  • Required field

max: Values of the x, y, and z coordinates defining the upper corner of the override region.

  • Type: floating-point number
  • Unit: m, mm (default unit), um
  • Required field

# Override Type

override_type: Method used to define the mesh override.

  • Options: Grid Size/Medium

# Grid Size

Select Grid Size to enter a target maximum grid size directly.

dl: Maximum grid size along x, y, and z-directions inside the override region.

  • Type: three floating-point numbers
  • Unit: m, mm (default unit), um
  • Required field when Grid Size is selected

NOTE

If one direction in dl is set to None, that direction is not refined. Grid-size overrides add shared grid planes along each axis, so the planes can extend outside the override box.

Grid size mesh override

# Medium

Select Medium to choose a material whose meshing behavior is applied inside the override region.

medium: Medium used by the automatic mesher in the override region.

  • Required field when Medium is selected

NOTE

In the Tidy3D API, this setting maps to background_medium. Use Medium when meshing should follow material properties; higher permittivity produces denser grid spacing.

Medium mesh override

# Advanced

enforce: Toggle whether the override grid size is enforced even where another structure would request a smaller grid size.

  • Options:
    • True: Enforce the grid size inside the override region.
    • False: Allow finer grid requests to take precedence.
  • Default: False

shadow: Toggle how overlapping override structures are prioritized.

  • Options:
    • True: In overlapping regions, the later override structure can shadow earlier override structures.
    • False: In overlapping regions, use the smaller grid size.
  • Default: True

drop_outside_sim: Toggle whether portions outside the simulation domain are ignored.

  • Options:
    • True: Drop portions of the override region outside the simulation domain.
    • False: Apply the override where its projection overlaps the simulation domain.
  • Default: True

NOTE

Mesh override structures are used by grid generation when at least one grid direction uses AutoGrid or QuasiUniformGrid.