Required
d| Type: | _domain.Domain |
| Description: | The domain to extrude. |
def extrude_domain_ab(
d: _domain.Domain,
ab: AbsorbingBoundaryParameters | None,
h_max: list[float],
side_sets: list[str] | None = None,
force: bool = False,
) -> tuple[_domain.Domain, list[str], float]: ...| Type: | _domain.Domain |
| Description: | The domain to extrude. |
| Type: | AbsorbingBoundaryParameters | None |
| Description: | The optional absorbing boundaries. |
| Type: | list[float] |
| Description: | A list of the element sizes along each dimension. |
| Type: | list[str] | None |
| Default value: | None |
| Description: | The side sets to extrude along. |
| Type: | bool |
| Default value: | False |
| Description: | Force extrusion even if ab is None. Useful for extruding by h_max only -- kept to retain legacy behavior. |
tuple[_domain.Domain, list[str], float]def get_domain_radius(layered_model: lm.LayeredModel) -> float: ...| Type: | lm.LayeredModel |
| Description: | The layered model. |
floatdef get_poissons_ratio(vp: float, vs: float) -> float: ...| Type: | float |
| Description: | P-wave velocity. |
| Type: | float |
| Description: | S-wave velocity. |
floatdef rho_from_gardeners(vp: np.ndarray | float) -> np.ndarray | float: ...| Type: | np.ndarray | float |
| Description: | VP array. |
np.ndarray | floatdef rho_from_gardners(
vp: np.ndarray | float, alpha: float = 310.0, beta: float = 0.25
) -> np.ndarray | float: ...| Type: | np.ndarray | float |
| Description: | P-wave velocity. |
| Type: | float |
| Default value: | 310.0 |
| Description: | Gardner's first contant. |
| Type: | float |
| Default value: | 0.25 |
| Description: | Gardner's second contant. |
np.ndarray | floatdef vs_from_poisson(
vp: np.ndarray | float, poisson_ratio: float = 0.25
) -> np.ndarray | float: ...| Type: | np.ndarray | float |
| Description: | VP array. |
| Type: | float |
| Default value: | 0.25 |
| Description: | Poisson's ratio to apply. |
np.ndarray | floatclass AbsorbingBoundaryParameters(
salvus.flow.utils.serialization_helpers.SerializationMixin
):
def __init__(
self,
reference_velocity: float,
number_of_wavelengths: float,
reference_frequency: float,
free_surface: bool | list[str] = True,
) -> None: ...| Type: | float |
| Description: | Wave velocity in the absorbing boundary layer. |
| Type: | float |
| Description: | Number of wavelengths to pad the domain by. |
| Type: | float |
| Description: | Reference frequency for the distance calculation (i.e. the center frequency of the source). |
| Type: | bool | list[str] |
| Default value: | True |
| Description: | If True, retain a free surface, and don't mark the top surface (either r1 or z1) as absorbing. For Cartesian domains, one can also pass a list of side sets (i.e. ["z0", "z1"] in the case of a thin plate) that should be kept as a free surface. |
float)-Distance in meters of the absorbing boundaries.float)-Get the stored number of wavelengths.float)-Get the stored reference frequency.float)-Get the stored velocity.list[str])-Get the side sets for the schema.def from_json(d: builtins.dict) -> Any: ...| Type: | builtins.dict |
| Description: | Dictionary containing its init parameters and a few other things. |
def no_sponge_layers(
free_surface: bool | list[str] = True,
) -> AbsorbingBoundaryParameters: ...| Type: | bool | list[str] |
| Default value: | True |
| Description: | If True, retain a free surface, and don't mark the top surface (either r1 or z1) as absorbing. For Cartesian domains, one can also pass a list of side sets (i.e. ["z0", "z1"] in the case of a thin plate) that should be kept as a free surface. |
def to_json(
self,
external_file_hash: types = None,
timer: types = None,
log_to_logger: bool = False,
comm: types = None,
) -> builtins.dict: ...| Type: | types |
| Default value: | None |
| Description: | Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file. |
| Type: | types |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | types |
| Default value: | None |
| Description: | MPI communicator, if any. |
class CartesianFromBm2D(
salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
salvus.mesh.simple_mesh.Cartesian2D,
):
def __init__(
self,
bm_file: Path | str,
x_min: float = 0.0,
x_max: float,
y_min: float = 0.0,
y_max: float,
max_frequency: float,
elements_per_wavelength: float = 2.0,
tensor_order: int = 1,
ab_params: AbsorbingBoundaryParameters | None = None,
use_lm: bool = True,
interlayer_coarsening_policy: (
lm.meshing_protocol.coarsening_policy.InterlayerCoarseningPolicy
| None
) = None,
): ...| Type: | Path | str |
| Description: | Path to bm file. |
| Type: | float |
| Default value: | 0.0 |
| Description: | Min extent of the x-dimension in meter. |
| Type: | float |
| Description: | Max extent of the x-dimension in meter. |
| Type: | float |
| Default value: | 0.0 |
| Description: | Min extent of the y-dimension in meter. |
| Type: | float |
| Description: | Max extent of the y-dimension in meter. |
| Type: | float |
| Description: | Maximum expected frequency in mesh. |
| Type: | float |
| Default value: | 2.0 |
| Description: | Elements per mimimum wavelength. |
| Type: | int |
| Default value: | 1 |
| Description: | Order of the GLL model and shape mapping. |
| Type: | AbsorbingBoundaryParameters | None |
| Default value: | None |
| Description: | Parameters governing the absorbing boundaries. |
| Type: | bool |
| Default value: | True |
| Description: | Use the layered meshing backend. |
| Type: | lm.meshing_protocol.coarsening_policy.InterlayerCoarseningPolicy | None |
| Default value: | None |
| Description: | Add a custom interlayer coarsening policy to the mesh. |
class CartesianFromBm3D(
salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
salvus.mesh.simple_mesh.Cartesian3D,
):
def __init__(
self,
bm_file: Path | str,
x_max: float,
y_max: float,
max_frequency: float,
elements_per_wavelength: float = 2.0,
tensor_order: int = 1,
ab_params: AbsorbingBoundaryParameters | None = None,
z_range: typing.Iterable[float] | None = None,
use_lm: bool = True,
bm_shift: float = 0.0,
interlayer_coarsening_policy: (
lm.meshing_protocol.coarsening_policy.InterlayerCoarseningPolicy
| None
) = None,
): ...| Type: | Path | str |
| Description: | Path to bm file. |
| Type: | float |
| Description: | Size of x-dimension in meters. |
| Type: | float |
| Description: | Size of y-dimension in meters. |
| Type: | float |
| Description: | Maximum expected frequency in mesh. |
| Type: | float |
| Default value: | 2.0 |
| Description: | Elements per mimimum wavelength. |
| Type: | int |
| Default value: | 1 |
| Description: | Order of the GLL model and shape mapping. |
| Type: | AbsorbingBoundaryParameters | None |
| Default value: | None |
| Description: | Parameters governing the absorbing boundaries. |
| Type: | typing.Iterable[float] | None |
| Default value: | None |
| Description: | Range in the vertical direction of the mesh. |
| Type: | bool |
| Default value: | True |
| Description: | Use the layered meshing backend. |
| Type: | float |
| Default value: | 0.0 |
| Description: | Used to offset layered models in project's UTM domains to retain previous behavior. |
| Type: | lm.meshing_protocol.coarsening_policy.InterlayerCoarseningPolicy | None |
| Default value: | None |
| Description: | Add a custom interlayer coarsening policy to the mesh. |
class CartesianHomogeneousAcoustic2D(
salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
salvus.mesh.simple_mesh.Cartesian2D,
):
def __init__(
self,
vp: float,
rho: float,
x_max: float,
y_max: float,
max_frequency: float,
elements_per_wavelength: float = 2.0,
tensor_order: int = 1,
ab_params: AbsorbingBoundaryParameters | None = None,
use_lm: bool = True,
): ...| Type: | float |
| Description: | P-wave velocity. |
| Type: | float |
| Description: | Density. |
| Type: | float |
| Description: | Size of x-dimension in meters. |
| Type: | float |
| Description: | Size of y-dimension in meters. |
| Type: | float |
| Description: | Maximum expected frequency in mesh. |
| Type: | float |
| Default value: | 2.0 |
| Description: | Elements per mimimum wavelength. |
| Type: | int |
| Default value: | 1 |
| Description: | Order of the GLL model and shape mapping. |
| Type: | AbsorbingBoundaryParameters | None |
| Default value: | None |
| Description: | Parameters governing the absorbing boundaries. |
| Type: | bool |
| Default value: | True |
| Description: | Use the layered meshing backend. |
class CartesianHomogeneousAcoustic3D(
salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
salvus.mesh.simple_mesh.Cartesian3D,
):
def __init__(
self,
vp: float,
rho: float,
x_max: float,
y_max: float,
z_max: float,
max_frequency: float,
elements_per_wavelength: float = 2.0,
tensor_order: int = 1,
ab_params: AbsorbingBoundaryParameters | None = None,
use_lm: bool = True,
): ...| Type: | float |
| Description: | P-wave velocity. |
| Type: | float |
| Description: | Density. |
| Type: | float |
| Description: | Size of x-dimension in meters. |
| Type: | float |
| Description: | Size of y-dimension in meters. |
| Type: | float |
| Description: | Size of z-dimension in meters. |
| Type: | float |
| Description: | Maximum expected frequency in mesh. |
| Type: | float |
| Default value: | 2.0 |
| Description: | Elements per mimimum wavelength. |
| Type: | int |
| Default value: | 1 |
| Description: | Order of the GLL model and shape mapping. |
| Type: | AbsorbingBoundaryParameters | None |
| Default value: | None |
| Description: | Parameters governing the absorbing boundaries. |
| Type: | bool |
| Default value: | True |
| Description: | Use the layered meshing backend. |
class CartesianHomogeneousIsotropicElastic2D(
salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
salvus.mesh.simple_mesh.Cartesian2D,
):
def __init__(
self,
vp: float,
vs: float,
rho: float,
x_max: float,
y_max: float,
max_frequency: float,
elements_per_wavelength: float = 2.0,
tensor_order: int = 1,
ab_params: AbsorbingBoundaryParameters | None = None,
use_lm: bool = True,
): ...| Type: | float |
| Description: | P-wave velocity. |
| Type: | float |
| Description: | S-wave velocity. |
| Type: | float |
| Description: | Density. |
| Type: | float |
| Description: | Size of x-dimension in meters. |
| Type: | float |
| Description: | Size of y-dimension in meters. |
| Type: | float |
| Description: | Maximum expected frequency in mesh. |
| Type: | float |
| Default value: | 2.0 |
| Description: | Elements per mimimum wavelength. |
| Type: | int |
| Default value: | 1 |
| Description: | Order of the GLL model and shape mapping. |
| Type: | AbsorbingBoundaryParameters | None |
| Default value: | None |
| Description: | Parameters governing the absorbing boundaries. |
| Type: | bool |
| Default value: | True |
| Description: | Use the layered meshing backend. |
class CartesianHomogeneousIsotropicElastic3D(
salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
salvus.mesh.simple_mesh.Cartesian3D,
):
def __init__(
self,
vp: float,
vs: float,
rho: float,
x_max: float,
y_max: float,
z_max: float,
max_frequency: float,
elements_per_wavelength: float = 2.0,
tensor_order: int = 1,
ab_params: AbsorbingBoundaryParameters | None = None,
use_lm: bool = True,
): ...| Type: | float |
| Description: | P-wave velocity. |
| Type: | float |
| Description: | S-wave velocity. |
| Type: | float |
| Description: | Density. |
| Type: | float |
| Description: | Size of x-dimension in meters. |
| Type: | float |
| Description: | Size of y-dimension in meters. |
| Type: | float |
| Description: | Size of z-dimension in meters. |
| Type: | float |
| Description: | Maximum expected frequency in mesh. |
| Type: | float |
| Default value: | 2.0 |
| Description: | Elements per mimimum wavelength. |
| Type: | int |
| Default value: | 1 |
| Description: | Order of the GLL model and shape. |
| Type: | AbsorbingBoundaryParameters | None |
| Default value: | None |
| Description: | Parameters governing the absorbing boundaries. |
| Type: | bool |
| Default value: | True |
| Description: | Use the layered meshing backend. |
class CartesianHomogeneousIsotropicViscoElastic2D(
salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
salvus.mesh.simple_mesh.Cartesian2D,
):
def __init__(
self,
vp: float,
vs: float,
rho: float,
qkappa: float,
qmu: float,
x_max: float,
y_max: float,
max_frequency: float,
elements_per_wavelength: float = 2.0,
tensor_order: int = 1,
ab_params: AbsorbingBoundaryParameters | None = None,
use_lm: bool = True,
): ...| Type: | float |
| Description: | P-wave velocity. |
| Type: | float |
| Description: | S-wave velocity. |
| Type: | float |
| Description: | Density. |
| Type: | float |
| Description: | Qkappa. |
| Type: | float |
| Description: | Qmu. |
| Type: | float |
| Description: | Size of x-dimension in meters. |
| Type: | float |
| Description: | Size of y-dimension in meters. |
| Type: | float |
| Description: | Maximum expected frequency in mesh. |
| Type: | float |
| Default value: | 2.0 |
| Description: | Elements per mimimum wavelength. |
| Type: | int |
| Default value: | 1 |
| Description: | Order of the GLL model and shape mapping. |
| Type: | AbsorbingBoundaryParameters | None |
| Default value: | None |
| Description: | Parameters governing the absorbing boundaries. |
| Type: | bool |
| Default value: | True |
| Description: | Use the layered meshing backend. |
class CartesianTransverselyIsotropicElastic3D(
salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
salvus.mesh.simple_mesh.Cartesian3D,
):
def __init__(
self,
vpv: float,
vph: float,
vsv: float,
vsh: float,
eta: float,
rho: float,
x_max: float,
y_max: float,
z_max: float,
max_frequency: float,
elements_per_wavelength: float = 2.0,
tensor_order: int = 1,
use_lm: bool = True,
): ...| Type: | float |
| Description: | P-wave velocity (along symmetry axis). |
| Type: | float |
| Description: | P-wave velocity (perpendicular to symmetry axis). |
| Type: | float |
| Description: | P-wave velocity (along symmetry axis). |
| Type: | float |
| Description: | P-wave velocity (perpendicular to symmetry axis). |
| Type: | float |
| Description: | TTI Eta parameter. |
| Type: | float |
| Description: | Density. |
| Type: | float |
| Description: | Size of x-dimension in meters. |
| Type: | float |
| Description: | Size of y-dimension in meters. |
| Type: | float |
| Description: | Size of z-dimension in meters. |
| Type: | float |
| Description: | Maximum expected frequency in mesh. |
| Type: | float |
| Default value: | 2.0 |
| Description: | Elements per mimimum wavelength. |
| Type: | int |
| Default value: | 1 |
| Description: | Order of the GLL model and shape. |
| Type: | bool |
| Default value: | True |
| Description: | Use the layered meshing backend. |
class Circular2D(
salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
salvus.mesh.simple_mesh._Circular2D,
):
def __init__(self, radius: float = inf): ...| Type: | float |
| Default value: | inf |
| Description: | The radius of the circle in meters. |
class GlobalBuiltIn3D(
salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
salvus.mesh.simple_mesh._Globe3D,
):
def __init__(
self,
model: str | typing.Callable,
period: float,
tensor_order: int = 1,
constant_q_frequency_band: tuple[float, float] | None = None,
max_depth_in_meters: float | None = None,
use_lm: bool = True,
): ...| Type: | str | typing.Callable |
| Description: | Model name. |
| Type: | float |
| Description: | Mesh period. |
| Type: | int |
| Default value: | 1 |
| Description: | Tensor order for the mesh. |
| Type: | tuple[float, float] | None |
| Default value: | None |
| Description: | A tuple of frequencies (low, high) over which Q should be approximately constant. If not passed, the band will be estimated min_period_in_seconds. |
| Type: | float | None |
| Default value: | None |
| Description: | The maximum depth of the mesh. If None, a full sphere will be constructed. |
| Type: | bool |
| Default value: | True |
| Description: | Use the layered meshing backend. |
class Globe3D(
salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
salvus.mesh.simple_mesh._Globe3D,
):
def __init__(self, radius: float = inf): ...| Type: | float |
| Default value: | inf |
| Description: | The radius of the sphere in meters. |
class SphericalChunkBuiltIn3D(
salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
salvus.mesh.simple_mesh._SphericalChunk3D,
):
def __init__(
self,
model: str | typing.Callable,
period: float,
latitude_extent: float,
longitude_extent: float,
tensor_order: int = 1,
latitude_center: float = 0.0,
longitude_center: float = 0.0,
elements_per_wavelength: float = 2.0,
minimum_radius_in_km: float = 3755.0,
ab_params: AbsorbingBoundaryParameters | None = None,
constant_q_frequency_band: tuple[float, float] | None = None,
use_lm: bool = True,
): ...| Type: | str | typing.Callable |
| Description: | The name of the 1-D background model. |
| Type: | float |
| Description: | The minimum seismic period for which to generate the mesh. This value is used in conjunction with elements_per_wavelength to control the accuracy of the simulation. |
| Type: | float |
| Description: | The latitudinal extent of the mesh from its center in degrees. |
| Type: | float |
| Description: | The longitudinal extent of the mesh from its center in degrees. |
| Type: | int |
| Default value: | 1 |
| Description: | The order of the model representation (1, 2, or 4). See the "Model Order" tutorial on the website for more details. |
| Type: | float |
| Default value: | 0.0 |
| Description: | The latitudinal center of the mesh in degrees. |
| Type: | float |
| Default value: | 0.0 |
| Description: | The longitudinal center of the mesh in degrees. elements_per_wavelength: Given the 1-D background model and period as specified, ensure that there are at least this many elements per minimum wavelength throughout the mesh volume. |
| Type: | float |
| Default value: | 2.0 |
| Description: | The desired elements per wavelength for the to be created mesh. |
| Type: | float |
| Default value: | 3755.0 |
| Description: | Minimum radius of the mesh in kilometers. |
| Type: | AbsorbingBoundaryParameters | None |
| Default value: | None |
| Description: | Parameters controlling the extrusion of the domain for the purposes of adding absorbing boundaries. |
| Type: | tuple[float, float] | None |
| Default value: | None |
| Description: | A tuple of frequencies (low, high) over which Q should be approximately constant. If not passed, the band will be estimated min_period_in_seconds. |
| Type: | bool |
| Default value: | True |
| Description: | Use the layered meshing backend. |
class SphericalFromBm3D(
salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
salvus.mesh.simple_mesh._Globe3D,
):
def __init__(
self,
bm_file: str | Path | typing.Callable,
max_frequency: float,
elements_per_wavelength: float = 2.0,
tensor_order: int = 1,
constant_q_frequency_band: tuple[float, float] | None = None,
use_lm: bool = True,
): ...| Type: | str | Path | typing.Callable |
| Description: | Path to bm file. |
| Type: | float |
| Description: | Maximum expected frequency in mesh. |
| Type: | float |
| Default value: | 2.0 |
| Description: | Elements per mimimum wavelength. |
| Type: | int |
| Default value: | 1 |
| Description: | Order of the GLL model and shape mapping. |
| Type: | tuple[float, float] | None |
| Default value: | None |
| Description: | A tuple of frequencies (low, high) over which Q should be approximately constant. If not passed, the band will be estimated min_period_in_seconds. |
| Type: | bool |
| Default value: | True |
| Description: | Use the layered meshing backend. |
class SphericalHomogeneousAcoustic2D(
salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
salvus.mesh.simple_mesh._Circular2D,
):
def __init__(
self,
vp: float,
rho: float,
radius: float,
max_frequency: float,
elements_per_wavelength: float = 2.0,
tensor_order: int = 1,
use_lm: bool = True,
): ...| Type: | float |
| Description: | vp velocity |
| Type: | float |
| Description: | density |
| Type: | float |
| Description: | Radius of the sphere. |
| Type: | float |
| Description: | Mesh frequency. |
| Type: | float |
| Default value: | 2.0 |
| Description: | The number of elements per wavelength. |
| Type: | int |
| Default value: | 1 |
| Description: | Tensor order of the mesh. |
| Type: | bool |
| Default value: | True |
| Description: | Use the layered meshing backend. |