Position#

class fridom.framework.grid.position.Position(positions: tuple[AxisPosition])[source]#

Bases: object

The position of a field on a staggered grid.

Parameters#

positionstuple[AxisPosition]

The positions of the field along each axis.

__init__(positions: tuple[AxisPosition]) None[source]#

Methods

__init__(positions)

shift(axis)

Shift the position of the field along an axis.

Attributes

positions

The positions of the field along each axis.

shift(axis: int) Position[source]#

Shift the position of the field along an axis.

The position of the field along the specified axis is shifted from center to face or vice versa.

Parameters#

axisint

The axis along which to shift the field.

Returns#

Position

The new position of the field.

property positions: tuple[AxisPosition]#

The positions of the field along each axis.