fdtdx.GridCoordinateConstraint

dataclass

GridCoordinateConstraint(
    *,
    object: SimulationObject,
    axes: tuple[int, ...],
    sides: tuple[Literal["+", "-"], ...],
    coordinates: tuple[int, ...]
)

Constrains an object's position to specific grid coordinates.

Forces specific sides of an object to align with given grid coordinates. Used for precise positioning in the discretized simulation space.

Attributes:
  • object (SimulationObject) –

    The object to position

  • axes (tuple[int, ...]) –

    Which axes to constrain

  • sides (tuple[Literal['+', '-'], ...]) –

    Which side of each axis ('+' or '-')

  • coordinates (tuple[int, ...]) –

    Grid coordinates to align with