Version:

salvus.flow.collections.source_mechanism

salvus.flow.collections.source_mechanism salvus flow collections source_mechanism
The source mechanism data structures to be used with block sources.

Classes

MomentTensor

A moment tensor source mechanism.
SIGNATURE
class MomentTensor(salvus.flow.collections.source_mechanism.SourceMechanism):
    def __init__(self, weights: npt.ArrayLike): ...
ARGUMENTS
Required
weights
Type:npt.ArrayLike
Description:
The weights of the vector gradient source. Must be of shape (NUM_SOURCES, 4|9) or (4|9,).

Properties

  • ndim(int | tuple[int, int])-The dimensionality of the source mechanism.

Methods

MomentTensor.copy()
Return a copy of the source mechanism.
SIGNATURE
def copy(self) -> typing.Self: ...
MomentTensor.to_2d()
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.
SIGNATURE
def to_2d(self) -> typing.Self: ...
MomentTensor.to_3d()
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.
SIGNATURE
def to_3d(self) -> typing.Self: ...

Scalar

A scalar source mechanism.
SIGNATURE
class Scalar(salvus.flow.collections.source_mechanism.SourceMechanism):
    def __init__(self, weights: npt.ArrayLike): ...
ARGUMENTS
Required
weights
Type:npt.ArrayLike
Description:
The weights of the scalar source. Must be of shape (NUM_SOURCES, 1) or (1,).

Properties

  • ndim(tuple[int, int])-Return the dimensionality of the the source mechanism.

Methods

Scalar.copy()
Return a copy of the source mechanism.
SIGNATURE
def copy(self) -> typing.Self: ...
Scalar.to_2d()
Return a 2-D version of the mechanism.
If its already 2-D it will return itself.
SIGNATURE
def to_2d(self) -> typing.Self: ...
Scalar.to_3d()
Return a 3-D version of the mechanism.
If its already 3-D it will return itself.
SIGNATURE
def to_3d(self) -> typing.Self: ...

ScalarGradient

A scalar gradient source mechanism.
SIGNATURE
class ScalarGradient(salvus.flow.collections.source_mechanism.SourceMechanism):
    def __init__(self, weights: npt.ArrayLike): ...
ARGUMENTS
Required
weights
Type:npt.ArrayLike
Description:
The weights of the scalar gradient source. Must be of shape (NUM_SOURCES, 2|3) or (2|3,).

Properties

  • ndim(int | tuple[int, int])-The dimensionality of the source mechanism.

Methods

ScalarGradient.copy()
Return a copy of the source mechanism.
SIGNATURE
def copy(self) -> typing.Self: ...
ScalarGradient.to_2d()
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.
SIGNATURE
def to_2d(self) -> typing.Self: ...
ScalarGradient.to_3d()
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.
SIGNATURE
def to_3d(self) -> typing.Self: ...

SourceMechanism

A source mechanism.
SIGNATURE
class SourceMechanism(abc.ABC):
    def __init__(self, weights: npt.ArrayLike): ...
ARGUMENTS
Required
weights
Type:npt.ArrayLike
Description:
The weights as an array.

Properties

  • ndim(int | tuple[int, int])-The dimensionality of the source mechanism.

Methods

SourceMechanism.copy()
Return a copy of the source mechanism.
SIGNATURE
def copy(self) -> typing.Self: ...
SourceMechanism.to_2d()
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.
SIGNATURE
def to_2d(self) -> typing.Self: ...
SourceMechanism.to_3d()
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.
SIGNATURE
def to_3d(self) -> typing.Self: ...

Vector

A vector source mechanism.
SIGNATURE
class Vector(salvus.flow.collections.source_mechanism.SourceMechanism):
    def __init__(self, weights: npt.ArrayLike): ...
ARGUMENTS
Required
weights
Type:npt.ArrayLike
Description:
The weights of the scalar gradient source. Must be of shape (NUM_SOURCES, 2|3) or (2|3,).

Properties

  • ndim(int | tuple[int, int])-The dimensionality of the source mechanism.

Methods

Vector.copy()
Return a copy of the source mechanism.
SIGNATURE
def copy(self) -> typing.Self: ...
Vector.to_2d()
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.
SIGNATURE
def to_2d(self) -> typing.Self: ...
Vector.to_3d()
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.
SIGNATURE
def to_3d(self) -> typing.Self: ...

VectorGradient

A vector gradient source mechanism.
SIGNATURE
class VectorGradient(salvus.flow.collections.source_mechanism.SourceMechanism):
    def __init__(self, weights: npt.ArrayLike): ...
ARGUMENTS
Required
weights
Type:npt.ArrayLike
Description:
The weights of the vector gradient source. Must be of (NUM_SOURCES, 4|9) or (4|9,).

Properties

  • ndim(int | tuple[int, int])-The dimensionality of the source mechanism.

Methods

VectorGradient.copy()
Return a copy of the source mechanism.
SIGNATURE
def copy(self) -> typing.Self: ...
VectorGradient.to_2d()
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.
SIGNATURE
def to_2d(self) -> typing.Self: ...
VectorGradient.to_3d()
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.
SIGNATURE
def to_3d(self) -> typing.Self: ...
PAGE CONTENTS