fdtdx.SizeExtensionConstraint

dataclass

SizeExtensionConstraint(
    *,
    object: SimulationObject,
    other_object: Optional[SimulationObject],
    axis: int,
    direction: Literal["+", "-"],
    other_position: float,
    offset: float,
    grid_offset: int
)

Defines how an object extends toward another object or boundary.

A constraint that extends one object's size until it reaches another object or the simulation boundary. Can extend in positive or negative direction along an axis.

Attributes:
  • object (SimulationObject) –

    The object being extended

  • other_object (Optional[SimulationObject]) –

    Optional target object to extend to

  • axis (int) –

    Which axis to extend along

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

    Direction to extend ('+' or '-')

  • other_position (float) –

    Relative position on target (-1 to 1)

  • offset (float) –

    Additional real-space offset

  • grid_offset (int) –

    Additional grid-space offset