Mondaic
This API reference is not for the latest stable Salvus version.

salvus.geometry.coordinates.references

Coordinate references.

Classes

Absolute

class Absolute(salvus.geometry.coordinates.references._Reference):
    def __init__(self): ...

Absolute coordinates, e.g. take them at face values.

Methods
validate_compatibility()
def validate_compatibility(
    self, coordinates: npt.NDArray, coordinate_system: CoordinateSystem
) -> None: ...

Validate the compatibility of the reference with the given coordinates and coordinate system.

Subclasses can implement that to check for compatibility. The function should raise in case it detects an incompatibility.

Parameters
  • coordinates npt.NDArray — The coordinate array.
  • coordinate_system CoordinateSystem — The coordinate system.
Returns None

Depth

class Depth(salvus.geometry.coordinates.references._Reference):
    def __init__(self, side_set_name: str | None = None): ...

An abstract class representing the reference of a set of coordinates.

This meant to be used in conjunction with a coordinate system.

Relative coordinates where the last dimension corresponds to the depth beneath a surface.

Parameters
  • side_set_name str | None — Name of the side set the depth is relative to. Defaults to the top surface of the domain.
Methods
validate_compatibility()
def validate_compatibility(
    self, coordinates: npt.NDArray, coordinate_system: CoordinateSystem
) -> None: ...

Validate the compatibility of the reference with the given coordinates and coordinate system.

Subclasses can implement that to check for compatibility. The function should raise in case it detects an incompatibility.

Parameters
  • coordinates npt.NDArray — The coordinate array.
  • coordinate_system CoordinateSystem — The coordinate system.
Returns None

Height

class Height(salvus.geometry.coordinates.references._Reference):
    def __init__(self, side_set_name: str | None = None): ...

An abstract class representing the reference of a set of coordinates.

This meant to be used in conjunction with a coordinate system.

Relative coordinates where the last dimension corresponds to the height above a surface.

Parameters
  • side_set_name str | None — Name of the side set the height is relative to. Defaults to the bottom surface of the domain.
Methods
validate_compatibility()
def validate_compatibility(
    self, coordinates: npt.NDArray, coordinate_system: CoordinateSystem
) -> None: ...

Validate the compatibility of the reference with the given coordinates and coordinate system.

Subclasses can implement that to check for compatibility. The function should raise in case it detects an incompatibility.

Parameters
  • coordinates npt.NDArray — The coordinate array.
  • coordinate_system CoordinateSystem — The coordinate system.
Returns None

Relative

class Relative(salvus.geometry.coordinates.references._Reference):
    def __init__(
        self,
        side_set_name: str,
        directions: npt.ArrayLike,
        offsets: npt.ArrayLike | None = None,
    ): ...

An abstract class representing the reference of a set of coordinates.

This meant to be used in conjunction with a coordinate system.

Relative coordinates to a specific surface.

Parameters
  • side_set_name str — The side set name for relative receivers.
  • directions npt.ArrayLike — The direction vector for side set receivers. If a single direction is given it will be applied to all receivers, otherwise please supply one per receiver.
  • offsets npt.ArrayLike | None — The offsets from the intersection with the side set for relative receivers. Will be set to zeros if not given. If a single offsets is given, it will be applied to all receivers, otherwise please supply one per receiver.
Methods
validate_compatibility()
def validate_compatibility(
    self, coordinates: npt.NDArray, coordinate_system: CoordinateSystem
) -> None: ...

Validate the compatibility of the reference with the given coordinates and coordinate system.

Parameters
  • coordinates npt.NDArray — The coordinate array.
  • coordinate_system CoordinateSystem — The coordinate system.
Returns None