fdtdx.SizeConstraint

dataclass

SizeConstraint(
    *,
    object: SimulationObject,
    other_object: SimulationObject,
    axes: tuple[int, ...],
    other_axes: tuple[int, ...],
    proportions: tuple[float, ...],
    offsets: tuple[float, ...],
    grid_offsets: tuple[int, ...]
)

Defines a size relationship between two simulation objects.

A constraint that sets the size of one object relative to another, with optional proportions and offsets. Used to specify how objects should be sized relative to each other in the simulation.

Attributes:
  • object (SimulationObject) –

    The "child" object whose size is being adjusted

  • other_object (SimulationObject) –

    The "parent" object that serves as reference

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

    Which axes of the child to constrain

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

    Which axes of the parent to reference

  • proportions (tuple[float, ...]) –

    Size multipliers relative to parent

  • offsets (tuple[float, ...]) –

    Additional real-space size offsets

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

    Additional grid-space size offsets