salvus.geometry.coordinates.references
Coordinate references.
Classes
Absolute
Absoluteclass Absolute(salvus.geometry.coordinates.references._Reference):
def __init__(self): ...Absolute coordinates, e.g. take them at face values.
validate_compatibility()
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.
coordinatesnpt.NDArray — The coordinate array.coordinate_systemCoordinateSystem — The coordinate system.
Depth
Depthclass 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.
side_set_namestr | None — Name of the side set the depth is relative to. Defaults to the top surface of the domain.
validate_compatibility()
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.
coordinatesnpt.NDArray — The coordinate array.coordinate_systemCoordinateSystem — The coordinate system.
Height
Heightclass 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.
side_set_namestr | None — Name of the side set the height is relative to. Defaults to the bottom surface of the domain.
validate_compatibility()
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.
coordinatesnpt.NDArray — The coordinate array.coordinate_systemCoordinateSystem — The coordinate system.
Relative
Relativeclass 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.
side_set_namestr — The side set name for relative receivers.directionsnpt.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.offsetsnpt.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.
validate_compatibility()
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.
coordinatesnpt.NDArray — The coordinate array.coordinate_systemCoordinateSystem — The coordinate system.