fdtdx.PerfectlyMatchedLayer

Bases: BaseBoundary

Implements a Convolutional Perfectly Matched Layer (CPML) boundary condition.

The CPML absorbs outgoing electromagnetic waves with minimal reflection by using a complex coordinate stretching approach. This implementation supports arbitrary axis orientation and both positive/negative directions.

Attributes:
  • axis (int) –

    Principal axis for PML (0=x, 1=y, 2=z)

  • direction (Literal['+', '-']) –

    Direction along axis ("+" or "-")

  • alpha (float) –

    Loss parameter for complex frequency shifting. Defaults to 1e-8.

  • kappa_start (float) –

    Initial kappa stretching coefficient. Defaults to 1.0.

  • kappa_end (float) –

    Final kappa stretching coefficient. Defaults to 1.5.

  • color (tuple[float, float, float] | None) –

    RGB color tuple for visualization. defualts to dark grey.

descriptive_name property

descriptive_name: str

Gets a human-readable name describing this PML boundary's location.

Returns:
  • str( str ) –

    Description like "min_x" or "max_z" indicating position

thickness property

thickness: int

Gets the thickness of the PML layer in grid points.

Returns:
  • int( int ) –

    Number of grid points in the PML along its axis