Types in Arch
(since Python 3.12, we can use the type keyword)
Coordinate
type Coordinate = Tuple[float, float, float]
Coordinates
Represents a list of Coordinate
type Coordinates = list[float]
Indices
Represents a list of indices (int)
type Indices = list[int]
StressTensor (as a flat array)
type StressTensor = Tuple[float, float, float, float, float, float]
and representing a tensor ordered as
[xx, xy, xz, yy, yz, zz]
CoordinateFunctor
The signature is
CoordinateFunctor(p: Coordinates) -> float
StressFunctor
The signature is
StressFunctor(p: Coordinates) -> StressTensor
Vector
type Vector = list[float]
ProgressFunctor
ProgressFunctor(iteration: int, convergence: float, context: int) -> None
MessageFunctor
MessageFunctor(msg: str) -> None
WarningFunctor
WarningFunctor(msg: str) -> None
ErrorFunctor
ErrorFunctor(msg: str) -> None
EndFunctor
EndFunctor() -> None
StopRequested
StopRequested() -> bool
ContraintFunctor
The signature is
ContraintFunctor(position: Coordinate, traction: Coordinate) -> Coordinate
Parameter position is the coordinates of the triangle center
Parameter traction is the actual traction vector of the triangle
Return the modified traction vector