fdtdx.BrushConstraint2D

Bases: ParameterTransformation

Applies 2D brush-based constraints to ensure minimum feature sizes.

Implements the brush-based constraint method described in: https://pubs.acs.org/doi/10.1021/acsphotonics.2c00313

This ensures minimum feature sizes and connectivity in 2D designs by using morphological operations with a brush kernel.

Attributes:
  • brush (Array) –

    Array defining the brush kernel for morphological operations.

  • axis (int) –

    Axis along which to apply the 2D constraint (perpendicular plane).

  • background_material (str | None) –

    Name of the background material in the material dictionary of the device. If None, the material with the lowest permittivity is used. Defaults to None.