Version:

salvus.mesh.simple_mesh.basic_mesh

salvus.mesh.simple_mesh.basic_mesh salvus mesh simple_mesh basic_mesh
Useful meshing classes.

Functions

extrude_domain_ab()

Extrude the domain to account for absorbing boundaries.
If no absorbing boundaries are passed, the domain is just returned as is (except when force is True -- see below).
Returns the extruded domain and a list of realized side sets (i.e. ['x0', 'x1', 'y0'] when given 'all_except_free_surface' in a 2-D domain).
SIGNATURE
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]: ...
ARGUMENTS
Required
d
Type:_domain.Domain
Description:
The domain to extrude.
Required
ab
Type:AbsorbingBoundaryParameters | None
Description:
The optional absorbing boundaries.
Required
h_max
Type:list[float]
Description:
A list of the element sizes along each dimension.
Optional
side_sets
Type:list[str] | None
Default value:None
Description:
The side sets to extrude along.
Optional
force
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.
RETURNS
Return type: tuple[_domain.Domain, list[str], float]
A new domain, along with a list of realized side sets, and a desired extrusion distance in the coordinate system of the domain.

get_domain_radius()

Get the domain radius from a layered model.
Useful when the radius is set outside of the layered model itself, i.e. in the RADIUS attribute. This can be the case for some BM files.
SIGNATURE
def get_domain_radius(layered_model: lm.LayeredModel) -> float: ...
ARGUMENTS
Required
layered_model
Type:lm.LayeredModel
Description:
The layered model.
EXCEPTIONS
ValueError
If the radius of the model is not absolute or there is no RADIUS member in the layered model's attributes.
RETURNS
Return type: float
The radius.

get_poissons_ratio()

Determine Poisson's ratio from VP and VS.
SIGNATURE
def get_poissons_ratio(vp: float, vs: float) -> float: ...
ARGUMENTS
Required
vp
Type:float
Description:
P-wave velocity.
Required
vs
Type:float
Description:
S-wave velocity.
RETURNS
Return type: float

rho_from_gardeners()

Compute density using Gardner's relationship.
SIGNATURE
def rho_from_gardeners(vp: np.ndarray | float) -> np.ndarray | float: ...
ARGUMENTS
Required
vp
Type:np.ndarray | float
Description:
VP array.
RETURNS
Return type: np.ndarray | float

rho_from_gardners()

Compute density using Gardner's relationship.
According to Gardner's equation, density [kg/m3^3] is related to vp [m/s] using ρ=αvpβ\rho = \alpha v_p^\beta, with empirically derived constants α\alpha and β\beta. Note that the original work used units of g/cc and ft/s, respectively.
SIGNATURE
def rho_from_gardners(
    vp: np.ndarray | float, alpha: float = 310.0, beta: float = 0.25
) -> np.ndarray | float: ...
ARGUMENTS
Required
vp
Type:np.ndarray | float
Description:
P-wave velocity.
Optional
alpha
Type:float
Default value:310.0
Description:
Gardner's first contant.
Optional
beta
Type:float
Default value:0.25
Description:
Gardner's second contant.
RETURNS
Return type: np.ndarray | float

vs_from_poisson()

Compute VS from VP given a certain Poisson's ratio.
SIGNATURE
def vs_from_poisson(
    vp: np.ndarray | float, poisson_ratio: float = 0.25
) -> np.ndarray | float: ...
ARGUMENTS
Required
vp
Type:np.ndarray | float
Description:
VP array.
Optional
poisson_ratio
Type:float
Default value:0.25
Description:
Poisson's ratio to apply.
RETURNS
Return type: np.ndarray | float

Classes

AbsorbingBoundaryParameters

Required information to extend the mesh for absorbing boundaries.
This class encapsulates the parameters required for mesh extrusion in the presence of absorbing boundary layers. All parameters need to be specified and will be used in relation to each other to calculate an appropriate distance by which to extend the mesh.
A good rule of thumb is to extend the domain by 3.5 or more wavelengths at each boundary which is marked as absorbing. In domain with heterogeneous velocities some experimentation may be required to find the optimal settings which balance the performance of the solver (e.g. # of total elements) with the performance of the absorbing boundaries (e.g. maximum reflection coefficient).
Initialize the absorbing boundary parameters.
SIGNATURE
class 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: ...
ARGUMENTS
Required
reference_velocity
Type:float
Description:
Wave velocity in the absorbing boundary layer.
Required
number_of_wavelengths
Type:float
Description:
Number of wavelengths to pad the domain by.
Required
reference_frequency
Type:float
Description:
Reference frequency for the distance calculation (i.e. the center frequency of the source).
Optional
free_surface
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.

Properties

  • distance(float)-Distance in meters of the absorbing boundaries.
  • number_of_wavelengths(float)-Get the stored number of wavelengths.
  • reference_frequency(float)-Get the stored reference frequency.
  • reference_velocity(float)-Get the stored velocity.
  • side_sets(list[str])-Get the side sets for the schema.

Class Methods

AbsorbingBoundaryParameters.from_json()
Recreate the object from a dictionary serialization of its initialization parameters.
SIGNATURE
def from_json(d: builtins.dict) -> Any: ...
ARGUMENTS
Required
d
Type:builtins.dict
Description:
Dictionary containing its init parameters and a few other things.
AbsorbingBoundaryParameters.no_sponge_layers()
Simplified constructor to handle when sponge layers are not desired.
When applied to a mesh will signify that first-order absorbing boundary conditions should be applied at the requisite side, and no domain extrusion / sponge layer attachment should occur
SIGNATURE
def no_sponge_layers(
    free_surface: bool | list[str] = True,
) -> AbsorbingBoundaryParameters: ...
ARGUMENTS
Optional
free_surface
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.

Methods

AbsorbingBoundaryParameters.to_json()
Serialize the object to a dictionary that can be written to JSON.
SIGNATURE
def to_json(
    self,
    external_file_hash: types = None,
    timer: types = None,
    log_to_logger: bool = False,
    comm: types = None,
) -> builtins.dict: ...
ARGUMENTS
Optional
external_file_hash
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.
Optional
timer
Type:types
Default value:None
Description:
Execution timer.
Optional
log_to_logger
Type:bool
Default value:False
Description:
Log timings to the logger.
Optional
comm
Type:types
Default value:None
Description:
MPI communicator, if any.

CartesianFromBm2D

Class to handle cartesian meshes created from BM files in 2D.
Initialize a mesh from an externally computed BM file. Useful for simple layered models.
SIGNATURE
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,
    ): ...
ARGUMENTS
Required
bm_file
Type:Path | str
Description:
Path to bm file.
Optional
x_min
Type:float
Default value:0.0
Description:
Min extent of the x-dimension in meter.
Required
x_max
Type:float
Description:
Max extent of the x-dimension in meter.
Optional
y_min
Type:float
Default value:0.0
Description:
Min extent of the y-dimension in meter.
Required
y_max
Type:float
Description:
Max extent of the y-dimension in meter.
Required
max_frequency
Type:float
Description:
Maximum expected frequency in mesh.
Optional
elements_per_wavelength
Type:float
Default value:2.0
Description:
Elements per mimimum wavelength.
Optional
tensor_order
Type:int
Default value:1
Description:
Order of the GLL model and shape mapping.
Optional
ab_params
Type:AbsorbingBoundaryParameters | None
Default value:None
Description:
Parameters governing the absorbing boundaries.
Optional
use_lm
Type:bool
Default value:True
Description:
Use the layered meshing backend.
Optional
interlayer_coarsening_policy
Type:lm.meshing_protocol.coarsening_policy.InterlayerCoarseningPolicy | None
Default value:None
Description:
Add a custom interlayer coarsening policy to the mesh.

CartesianFromBm3D

Class to handle cartesian meshes created from BM files in 3D.
Initialize a mesh from an externally computed BM file. Useful for simple layered models.
SIGNATURE
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,
    ): ...
ARGUMENTS
Required
bm_file
Type:Path | str
Description:
Path to bm file.
Required
x_max
Type:float
Description:
Size of x-dimension in meters.
Required
y_max
Type:float
Description:
Size of y-dimension in meters.
Required
max_frequency
Type:float
Description:
Maximum expected frequency in mesh.
Optional
elements_per_wavelength
Type:float
Default value:2.0
Description:
Elements per mimimum wavelength.
Optional
tensor_order
Type:int
Default value:1
Description:
Order of the GLL model and shape mapping.
Optional
ab_params
Type:AbsorbingBoundaryParameters | None
Default value:None
Description:
Parameters governing the absorbing boundaries.
Optional
z_range
Type:typing.Iterable[float] | None
Default value:None
Description:
Range in the vertical direction of the mesh.
Optional
use_lm
Type:bool
Default value:True
Description:
Use the layered meshing backend.
Optional
bm_shift
Type:float
Default value:0.0
Description:
Used to offset layered models in project's UTM domains to retain previous behavior.
Optional
interlayer_coarsening_policy
Type:lm.meshing_protocol.coarsening_policy.InterlayerCoarseningPolicy | None
Default value:None
Description:
Add a custom interlayer coarsening policy to the mesh.

CartesianHomogeneousAcoustic2D

Base class to handle homogeneous cartesian acoustic meshes in 2D.
Initialize a simple homogeneous acoustic mesh.
SIGNATURE
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,
    ): ...
ARGUMENTS
Required
vp
Type:float
Description:
P-wave velocity.
Required
rho
Type:float
Description:
Density.
Required
x_max
Type:float
Description:
Size of x-dimension in meters.
Required
y_max
Type:float
Description:
Size of y-dimension in meters.
Required
max_frequency
Type:float
Description:
Maximum expected frequency in mesh.
Optional
elements_per_wavelength
Type:float
Default value:2.0
Description:
Elements per mimimum wavelength.
Optional
tensor_order
Type:int
Default value:1
Description:
Order of the GLL model and shape mapping.
Optional
ab_params
Type:AbsorbingBoundaryParameters | None
Default value:None
Description:
Parameters governing the absorbing boundaries.
Optional
use_lm
Type:bool
Default value:True
Description:
Use the layered meshing backend.

CartesianHomogeneousAcoustic3D

Base class to handle homogeneous cartesian acoustic meshes in 3D.
Initialize a simple homogeneous acoustic mesh.
SIGNATURE
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,
    ): ...
ARGUMENTS
Required
vp
Type:float
Description:
P-wave velocity.
Required
rho
Type:float
Description:
Density.
Required
x_max
Type:float
Description:
Size of x-dimension in meters.
Required
y_max
Type:float
Description:
Size of y-dimension in meters.
Required
z_max
Type:float
Description:
Size of z-dimension in meters.
Required
max_frequency
Type:float
Description:
Maximum expected frequency in mesh.
Optional
elements_per_wavelength
Type:float
Default value:2.0
Description:
Elements per mimimum wavelength.
Optional
tensor_order
Type:int
Default value:1
Description:
Order of the GLL model and shape mapping.
Optional
ab_params
Type:AbsorbingBoundaryParameters | None
Default value:None
Description:
Parameters governing the absorbing boundaries.
Optional
use_lm
Type:bool
Default value:True
Description:
Use the layered meshing backend.

CartesianHomogeneousIsotropicElastic2D

Base class to handle homogeneous cartesian isotropic elastic meshes in 2D.
Initialize a simple homogeneous isotropic elastic mesh.
SIGNATURE
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,
    ): ...
ARGUMENTS
Required
vp
Type:float
Description:
P-wave velocity.
Required
vs
Type:float
Description:
S-wave velocity.
Required
rho
Type:float
Description:
Density.
Required
x_max
Type:float
Description:
Size of x-dimension in meters.
Required
y_max
Type:float
Description:
Size of y-dimension in meters.
Required
max_frequency
Type:float
Description:
Maximum expected frequency in mesh.
Optional
elements_per_wavelength
Type:float
Default value:2.0
Description:
Elements per mimimum wavelength.
Optional
tensor_order
Type:int
Default value:1
Description:
Order of the GLL model and shape mapping.
Optional
ab_params
Type:AbsorbingBoundaryParameters | None
Default value:None
Description:
Parameters governing the absorbing boundaries.
Optional
use_lm
Type:bool
Default value:True
Description:
Use the layered meshing backend.

CartesianHomogeneousIsotropicElastic3D

Base class to handle homogeneous cartesian isotropic elastic meshes 3D.
Initialize a simple homogeneous isotropic elastic mesh.
SIGNATURE
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,
    ): ...
ARGUMENTS
Required
vp
Type:float
Description:
P-wave velocity.
Required
vs
Type:float
Description:
S-wave velocity.
Required
rho
Type:float
Description:
Density.
Required
x_max
Type:float
Description:
Size of x-dimension in meters.
Required
y_max
Type:float
Description:
Size of y-dimension in meters.
Required
z_max
Type:float
Description:
Size of z-dimension in meters.
Required
max_frequency
Type:float
Description:
Maximum expected frequency in mesh.
Optional
elements_per_wavelength
Type:float
Default value:2.0
Description:
Elements per mimimum wavelength.
Optional
tensor_order
Type:int
Default value:1
Description:
Order of the GLL model and shape.
Optional
ab_params
Type:AbsorbingBoundaryParameters | None
Default value:None
Description:
Parameters governing the absorbing boundaries.
Optional
use_lm
Type:bool
Default value:True
Description:
Use the layered meshing backend.

CartesianHomogeneousIsotropicViscoElastic2D

Base class to handle homogeneous cartesian isotropic elastic meshes in 2D.
Initialize a simple homogeneous isotropic elastic mesh.
SIGNATURE
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,
    ): ...
ARGUMENTS
Required
vp
Type:float
Description:
P-wave velocity.
Required
vs
Type:float
Description:
S-wave velocity.
Required
rho
Type:float
Description:
Density.
Required
qkappa
Type:float
Description:
Qkappa.
Required
qmu
Type:float
Description:
Qmu.
Required
x_max
Type:float
Description:
Size of x-dimension in meters.
Required
y_max
Type:float
Description:
Size of y-dimension in meters.
Required
max_frequency
Type:float
Description:
Maximum expected frequency in mesh.
Optional
elements_per_wavelength
Type:float
Default value:2.0
Description:
Elements per mimimum wavelength.
Optional
tensor_order
Type:int
Default value:1
Description:
Order of the GLL model and shape mapping.
Optional
ab_params
Type:AbsorbingBoundaryParameters | None
Default value:None
Description:
Parameters governing the absorbing boundaries.
Optional
use_lm
Type:bool
Default value:True
Description:
Use the layered meshing backend.

CartesianTransverselyIsotropicElastic3D

Base class to handle homogeneous cartesian isotropic elastic meshes 3D.
Initialize a simple homogeneous isotropic elastic mesh.
SIGNATURE
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,
    ): ...
ARGUMENTS
Required
vpv
Type:float
Description:
P-wave velocity (along symmetry axis).
Required
vph
Type:float
Description:
P-wave velocity (perpendicular to symmetry axis).
Required
vsv
Type:float
Description:
P-wave velocity (along symmetry axis).
Required
vsh
Type:float
Description:
P-wave velocity (perpendicular to symmetry axis).
Required
eta
Type:float
Description:
TTI Eta parameter.
Required
rho
Type:float
Description:
Density.
Required
x_max
Type:float
Description:
Size of x-dimension in meters.
Required
y_max
Type:float
Description:
Size of y-dimension in meters.
Required
z_max
Type:float
Description:
Size of z-dimension in meters.
Required
max_frequency
Type:float
Description:
Maximum expected frequency in mesh.
Optional
elements_per_wavelength
Type:float
Default value:2.0
Description:
Elements per mimimum wavelength.
Optional
tensor_order
Type:int
Default value:1
Description:
Order of the GLL model and shape.
Optional
use_lm
Type:bool
Default value:True
Description:
Use the layered meshing backend.

Circular2D

Base class to handle simple spherical chunk meshes using one of the built in models.
Generate a circular mesh.
SIGNATURE
class Circular2D(
    salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
    salvus.mesh.simple_mesh._Circular2D,
):
    def __init__(self, radius: float = inf): ...
ARGUMENTS
Optional
radius
Type:float
Default value:inf
Description:
The radius of the circle in meters.

GlobalBuiltIn3D

Base class to build global meshes using one of the built in models.
SIGNATURE
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,
    ): ...
ARGUMENTS
Required
model
Type:str | typing.Callable
Description:
Model name.
Required
period
Type:float
Description:
Mesh period.
Optional
tensor_order
Type:int
Default value:1
Description:
Tensor order for the mesh.
Optional
constant_q_frequency_band
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.
Optional
max_depth_in_meters
Type:float | None
Default value:None
Description:
The maximum depth of the mesh. If None, a full sphere will be constructed.
Optional
use_lm
Type:bool
Default value:True
Description:
Use the layered meshing backend.

Globe3D

Base class to handle simple spherical chunk meshes using one of the built in models.
Generate a spherical mesh.
SIGNATURE
class Globe3D(
    salvus.mesh.simple_mesh.basic_mesh._MigratedBasicMeshProtocol,
    salvus.mesh.simple_mesh._Globe3D,
):
    def __init__(self, radius: float = inf): ...
ARGUMENTS
Optional
radius
Type:float
Default value:inf
Description:
The radius of the sphere in meters.

SphericalChunkBuiltIn3D

Base class to handle simple spherical chunk meshes using one of the built in models.
Get a spherical chunk mesh based on a 1-D background model.
This function returns a spherical chunk mesh with a 1-D model attached to it. The 1-D model is necessary, at it is used to set the element sizes and adjust the double and tripling layers with depth. It also defines a series of strict spherical discontinuities which the mesh will honour. Once the mesh is returned, one can then overwrite the background model with their own 3-D model as desired.
SIGNATURE
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,
    ): ...
ARGUMENTS
Required
model
Type:str | typing.Callable
Description:
The name of the 1-D background model.
Required
period
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.
Required
latitude_extent
Type:float
Description:
The latitudinal extent of the mesh from its center in degrees.
Required
longitude_extent
Type:float
Description:
The longitudinal extent of the mesh from its center in degrees.
Optional
tensor_order
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.
Optional
latitude_center
Type:float
Default value:0.0
Description:
The latitudinal center of the mesh in degrees.
Optional
longitude_center
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.
Optional
elements_per_wavelength
Type:float
Default value:2.0
Description:
The desired elements per wavelength for the to be created mesh.
Optional
minimum_radius_in_km
Type:float
Default value:3755.0
Description:
Minimum radius of the mesh in kilometers.
Optional
ab_params
Type:AbsorbingBoundaryParameters | None
Default value:None
Description:
Parameters controlling the extrusion of the domain for the purposes of adding absorbing boundaries.
Optional
constant_q_frequency_band
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.
Optional
use_lm
Type:bool
Default value:True
Description:
Use the layered meshing backend.

SphericalFromBm3D

Class to handle cartesian meshes created from BM files in 3D.
Initialize a mesh from an externally computed BM file. Useful for simple layered models.
SIGNATURE
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,
    ): ...
ARGUMENTS
Required
bm_file
Type:str | Path | typing.Callable
Description:
Path to bm file.
Required
max_frequency
Type:float
Description:
Maximum expected frequency in mesh.
Optional
elements_per_wavelength
Type:float
Default value:2.0
Description:
Elements per mimimum wavelength.
Optional
tensor_order
Type:int
Default value:1
Description:
Order of the GLL model and shape mapping.
Optional
constant_q_frequency_band
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.
Optional
use_lm
Type:bool
Default value:True
Description:
Use the layered meshing backend.

SphericalHomogeneousAcoustic2D

Base class to handle simple spherical chunk meshes using one of the built in models.
SIGNATURE
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,
    ): ...
ARGUMENTS
Required
vp
Type:float
Description:
vp velocity
Required
rho
Type:float
Description:
density
Required
radius
Type:float
Description:
Radius of the sphere.
Required
max_frequency
Type:float
Description:
Mesh frequency.
Optional
elements_per_wavelength
Type:float
Default value:2.0
Description:
The number of elements per wavelength.
Optional
tensor_order
Type:int
Default value:1
Description:
Tensor order of the mesh.
Optional
use_lm
Type:bool
Default value:True
Description:
Use the layered meshing backend.

Used in tutorials

Functionality from this module is used in the following tutorials.
PAGE CONTENTS