salvus.flow.collections.source_mechanism
The source mechanism data structures to be used with block sources.
Classes
MomentTensor
MomentTensorclass MomentTensor(salvus.flow.collections.source_mechanism._SourceMechanism):
def __init__(self, weights: npt.ArrayLike): ...A moment tensor source mechanism.
weightsnpt.ArrayLike — The weights of the vector gradient source. Must be of shape (NUM_SOURCES, 4|9) or (4|9,).
ndim int | tuple[int, int]
ndim int | tuple[int, int]The dimensionality of the source mechanism.
copy()
copy()def copy(self) -> typing.Self: ...Return a copy of the source mechanism.
to_2d()
to_2d()def to_2d(self) -> typing.Self: ...Return a 2-D version of the mechanism.
In cartesian systems, component along the z dimension are discarded. In spherical systems, components along the theta dimension are discarded.
If its already 2-D it will return itself.
to_3d()
to_3d()def to_3d(self) -> typing.Self: ...Return a 3-D version of the mechanism.
If its already 3-D it will return itself.
Please pass missing parameters as keyword arguments by name.
Scalar
Scalarclass Scalar(salvus.flow.collections.source_mechanism._SourceMechanism):
def __init__(self, weights: npt.ArrayLike): ...A scalar source mechanism.
weightsnpt.ArrayLike — The weights of the scalar source. Must be of shape (NUM_SOURCES, 1) or (1,).
ndim tuple[int, int]
ndim tuple[int, int]Return the dimensionality of the the source mechanism.
copy()
copy()def copy(self) -> typing.Self: ...Return a copy of the source mechanism.
to_2d()
to_2d()def to_2d(self) -> typing.Self: ...Return a 2-D version of the mechanism.
If its already 2-D it will return itself.
to_3d()
to_3d()def to_3d(self) -> typing.Self: ...Return a 3-D version of the mechanism.
If its already 3-D it will return itself.
ScalarGradient
ScalarGradientclass ScalarGradient(
salvus.flow.collections.source_mechanism._SourceMechanism
):
def __init__(self, weights: npt.ArrayLike): ...A scalar gradient source mechanism.
weightsnpt.ArrayLike — The weights of the scalar gradient source. Must be of shape (NUM_SOURCES, 2|3) or (2|3,).
ndim int | tuple[int, int]
ndim int | tuple[int, int]The dimensionality of the source mechanism.
copy()
copy()def copy(self) -> typing.Self: ...Return a copy of the source mechanism.
to_2d()
to_2d()def to_2d(self) -> typing.Self: ...Return a 2-D version of the mechanism.
In cartesian systems, component along the z dimension are discarded. In spherical systems, components along the theta dimension are discarded.
If its already 2-D it will return itself.
to_3d()
to_3d()def to_3d(self) -> typing.Self: ...Return a 3-D version of the mechanism.
If its already 3-D it will return itself.
Please pass missing parameters as keyword arguments by name.
Vector
Vectorclass Vector(salvus.flow.collections.source_mechanism._SourceMechanism):
def __init__(self, weights: npt.ArrayLike): ...A vector source mechanism.
weightsnpt.ArrayLike — The weights of the scalar gradient source. Must be of shape (NUM_SOURCES, 2|3) or (2|3,).
ndim int | tuple[int, int]
ndim int | tuple[int, int]The dimensionality of the source mechanism.
copy()
copy()def copy(self) -> typing.Self: ...Return a copy of the source mechanism.
to_2d()
to_2d()def to_2d(self) -> typing.Self: ...Return a 2-D version of the mechanism.
In cartesian systems, component along the z dimension are discarded. In spherical systems, components along the theta dimension are discarded.
If its already 2-D it will return itself.
to_3d()
to_3d()def to_3d(self) -> typing.Self: ...Return a 3-D version of the mechanism.
If its already 3-D it will return itself.
Please pass missing parameters as keyword arguments by name.
VectorGradient
VectorGradientclass VectorGradient(
salvus.flow.collections.source_mechanism._SourceMechanism
):
def __init__(self, weights: npt.ArrayLike): ...A vector gradient source mechanism.
weightsnpt.ArrayLike — The weights of the vector gradient source. Must be of (NUM_SOURCES, 4|9) or (4|9,).
ndim int | tuple[int, int]
ndim int | tuple[int, int]The dimensionality of the source mechanism.
copy()
copy()def copy(self) -> typing.Self: ...Return a copy of the source mechanism.
to_2d()
to_2d()def to_2d(self) -> typing.Self: ...Return a 2-D version of the mechanism.
In cartesian systems, component along the z dimension are discarded. In spherical systems, components along the theta dimension are discarded.
If its already 2-D it will return itself.
to_3d()
to_3d()def to_3d(self) -> typing.Self: ...Return a 3-D version of the mechanism.
If its already 3-D it will return itself.
Please pass missing parameters as keyword arguments by name.