Version:

salvus.mesh.simple_mesh

salvus.mesh.simple_mesh salvus mesh simple_mesh
User-friendly meshing interface.

Classes

Cartesian2D

The base mesh class.
Cartesian2D mesh.
SIGNATURE
class Cartesian2D(salvus.mesh.simple_mesh.config.BaseMesh):
    def __init__(self) -> None: ...

Methods

Cartesian2D.apply()
Set the contents with a dictionary.
SIGNATURE
def apply(self, d: dict | _DeepSetter) -> None: ...
ARGUMENTS
Required
d
Type:dict | _DeepSetter
Description:
The dictionary to set.
Cartesian2D.copy()
Return a deep copy of the object.
SIGNATURE
def copy(self) -> _DeepSetter: ...
Cartesian2D.create_mesh()
Create the actual unstructured mesh object.
SIGNATURE
def create_mesh(
    self,
    verbose: bool = False,
    get_dictionary: bool = False,
    processing_function: (
        collections.abc.Callable
        | SurfaceMaskGenerator
        | RayMaskGenerator
        | None
    ) = None,
) -> UnstructuredMesh: ...
ARGUMENTS
Optional
verbose
Type:bool
Default value:False
Description:
Increase verbosity.
Optional
get_dictionary
Type:bool
Default value:False
Description:
Return the dictionary defining the mesh.
Optional
processing_function
Type:collections.abc.Callable | SurfaceMaskGenerator | RayMaskGenerator | None
Default value:None
Description:
optional call back function for mesh processing called directly after the mesh is finished to do efficient post processing, e.g. masking
Cartesian2D.get_dictionary()
Get the contents of this object as a dictionary.
SIGNATURE
def get_dictionary(self) -> dict: ...
Cartesian2D.validate()
Validates the current state of the configuration against its schema.
SIGNATURE
def validate(self) -> None: ...

Cartesian2DHomogeneous

The base mesh class.
Cartesian2DHomogeneous mesh.
SIGNATURE
class Cartesian2DHomogeneous(salvus.mesh.simple_mesh.config.BaseMesh):
    def __init__(self) -> None: ...

Methods

Cartesian2DHomogeneous.apply()
Set the contents with a dictionary.
SIGNATURE
def apply(self, d: dict | _DeepSetter) -> None: ...
ARGUMENTS
Required
d
Type:dict | _DeepSetter
Description:
The dictionary to set.
Cartesian2DHomogeneous.copy()
Return a deep copy of the object.
SIGNATURE
def copy(self) -> _DeepSetter: ...
Cartesian2DHomogeneous.create_mesh()
Create the actual unstructured mesh object.
SIGNATURE
def create_mesh(
    self,
    verbose: bool = False,
    get_dictionary: bool = False,
    processing_function: (
        collections.abc.Callable
        | SurfaceMaskGenerator
        | RayMaskGenerator
        | None
    ) = None,
) -> UnstructuredMesh: ...
ARGUMENTS
Optional
verbose
Type:bool
Default value:False
Description:
Increase verbosity.
Optional
get_dictionary
Type:bool
Default value:False
Description:
Return the dictionary defining the mesh.
Optional
processing_function
Type:collections.abc.Callable | SurfaceMaskGenerator | RayMaskGenerator | None
Default value:None
Description:
optional call back function for mesh processing called directly after the mesh is finished to do efficient post processing, e.g. masking
Cartesian2DHomogeneous.get_dictionary()
Get the contents of this object as a dictionary.
SIGNATURE
def get_dictionary(self) -> dict: ...
Cartesian2DHomogeneous.validate()
Validates the current state of the configuration against its schema.
SIGNATURE
def validate(self) -> None: ...

Cartesian3D

The base mesh class.
Cartesian3D mesh.
SIGNATURE
class Cartesian3D(salvus.mesh.simple_mesh.config.BaseMesh):
    def __init__(self) -> None: ...

Methods

Cartesian3D.apply()
Set the contents with a dictionary.
SIGNATURE
def apply(self, d: dict | _DeepSetter) -> None: ...
ARGUMENTS
Required
d
Type:dict | _DeepSetter
Description:
The dictionary to set.
Cartesian3D.copy()
Return a deep copy of the object.
SIGNATURE
def copy(self) -> _DeepSetter: ...
Cartesian3D.create_mesh()
Create the actual unstructured mesh object.
SIGNATURE
def create_mesh(
    self,
    verbose: bool = False,
    get_dictionary: bool = False,
    processing_function: (
        collections.abc.Callable
        | SurfaceMaskGenerator
        | RayMaskGenerator
        | None
    ) = None,
) -> UnstructuredMesh: ...
ARGUMENTS
Optional
verbose
Type:bool
Default value:False
Description:
Increase verbosity.
Optional
get_dictionary
Type:bool
Default value:False
Description:
Return the dictionary defining the mesh.
Optional
processing_function
Type:collections.abc.Callable | SurfaceMaskGenerator | RayMaskGenerator | None
Default value:None
Description:
optional call back function for mesh processing called directly after the mesh is finished to do efficient post processing, e.g. masking
Cartesian3D.get_dictionary()
Get the contents of this object as a dictionary.
SIGNATURE
def get_dictionary(self) -> dict: ...
Cartesian3D.validate()
Validates the current state of the configuration against its schema.
SIGNATURE
def validate(self) -> None: ...

Cartesian3DHomogeneous

The base mesh class.
Cartesian3DHomogeneous mesh.
SIGNATURE
class Cartesian3DHomogeneous(salvus.mesh.simple_mesh.config.BaseMesh):
    def __init__(self) -> None: ...

Methods

Cartesian3DHomogeneous.apply()
Set the contents with a dictionary.
SIGNATURE
def apply(self, d: dict | _DeepSetter) -> None: ...
ARGUMENTS
Required
d
Type:dict | _DeepSetter
Description:
The dictionary to set.
Cartesian3DHomogeneous.copy()
Return a deep copy of the object.
SIGNATURE
def copy(self) -> _DeepSetter: ...
Cartesian3DHomogeneous.create_mesh()
Create the actual unstructured mesh object.
SIGNATURE
def create_mesh(
    self,
    verbose: bool = False,
    get_dictionary: bool = False,
    processing_function: (
        collections.abc.Callable
        | SurfaceMaskGenerator
        | RayMaskGenerator
        | None
    ) = None,
) -> UnstructuredMesh: ...
ARGUMENTS
Optional
verbose
Type:bool
Default value:False
Description:
Increase verbosity.
Optional
get_dictionary
Type:bool
Default value:False
Description:
Return the dictionary defining the mesh.
Optional
processing_function
Type:collections.abc.Callable | SurfaceMaskGenerator | RayMaskGenerator | None
Default value:None
Description:
optional call back function for mesh processing called directly after the mesh is finished to do efficient post processing, e.g. masking
Cartesian3DHomogeneous.get_dictionary()
Get the contents of this object as a dictionary.
SIGNATURE
def get_dictionary(self) -> dict: ...
Cartesian3DHomogeneous.validate()
Validates the current state of the configuration against its schema.
SIGNATURE
def validate(self) -> None: ...

Globe3DAxialSymmetry

The base mesh class.
Globe3DAxialSymmetry mesh.
SIGNATURE
class Globe3DAxialSymmetry(salvus.mesh.simple_mesh.config.BaseMesh):
    def __init__(self) -> None: ...

Methods

Globe3DAxialSymmetry.apply()
Set the contents with a dictionary.
SIGNATURE
def apply(self, d: dict | _DeepSetter) -> None: ...
ARGUMENTS
Required
d
Type:dict | _DeepSetter
Description:
The dictionary to set.
Globe3DAxialSymmetry.copy()
Return a deep copy of the object.
SIGNATURE
def copy(self) -> _DeepSetter: ...
Globe3DAxialSymmetry.create_mesh()
Create the actual unstructured mesh object.
SIGNATURE
def create_mesh(
    self,
    verbose: bool = False,
    get_dictionary: bool = False,
    processing_function: (
        collections.abc.Callable
        | SurfaceMaskGenerator
        | RayMaskGenerator
        | None
    ) = None,
) -> UnstructuredMesh: ...
ARGUMENTS
Optional
verbose
Type:bool
Default value:False
Description:
Increase verbosity.
Optional
get_dictionary
Type:bool
Default value:False
Description:
Return the dictionary defining the mesh.
Optional
processing_function
Type:collections.abc.Callable | SurfaceMaskGenerator | RayMaskGenerator | None
Default value:None
Description:
optional call back function for mesh processing called directly after the mesh is finished to do efficient post processing, e.g. masking
Globe3DAxialSymmetry.get_dictionary()
Get the contents of this object as a dictionary.
SIGNATURE
def get_dictionary(self) -> dict: ...
Globe3DAxialSymmetry.validate()
Validates the current state of the configuration against its schema.
SIGNATURE
def validate(self) -> None: ...

SmoothieSEM

The base mesh class.
SmoothieSEM mesh.
SIGNATURE
class SmoothieSEM(salvus.mesh.simple_mesh.config.BaseMesh):
    def __init__(self) -> None: ...

Methods

SmoothieSEM.apply()
Set the contents with a dictionary.
SIGNATURE
def apply(self, d: dict | _DeepSetter) -> None: ...
ARGUMENTS
Required
d
Type:dict | _DeepSetter
Description:
The dictionary to set.
SmoothieSEM.copy()
Return a deep copy of the object.
SIGNATURE
def copy(self) -> _DeepSetter: ...
SmoothieSEM.create_mesh()
Create the actual unstructured mesh object.
SIGNATURE
def create_mesh(
    self,
    verbose: bool = False,
    get_dictionary: bool = False,
    processing_function: (
        collections.abc.Callable
        | SurfaceMaskGenerator
        | RayMaskGenerator
        | None
    ) = None,
) -> UnstructuredMesh: ...
ARGUMENTS
Optional
verbose
Type:bool
Default value:False
Description:
Increase verbosity.
Optional
get_dictionary
Type:bool
Default value:False
Description:
Return the dictionary defining the mesh.
Optional
processing_function
Type:collections.abc.Callable | SurfaceMaskGenerator | RayMaskGenerator | None
Default value:None
Description:
optional call back function for mesh processing called directly after the mesh is finished to do efficient post processing, e.g. masking
SmoothieSEM.get_dictionary()
Get the contents of this object as a dictionary.
SIGNATURE
def get_dictionary(self) -> dict: ...
SmoothieSEM.validate()
Validates the current state of the configuration against its schema.
SIGNATURE
def validate(self) -> None: ...

SphericalChunk3D

Base class to handle simple spherical chunk meshes using one of the built in models.
Compatible class with a few defaults. Please use SphericalChunkBuiltIn3D from the basic_mesh module instead.
SIGNATURE
class SphericalChunk3D(
    salvus.mesh.simple_mesh.basic_mesh.SphericalChunkBuiltIn3D
):
    def __init__(
        self,
        model: str | typing.Callable = "prem_iso_no_crust",
        period: float = 150.0,
        latitude_extent: float = 45.0,
        longitude_extent: float = 45.0,
        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
Optional
model
Type:str | typing.Callable
Default value:'prem_iso_no_crust'
Description:
The name of the 1-D background model.
Optional
period
Type:float
Default value:150.0
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.
Optional
latitude_extent
Type:float
Default value:45.0
Description:
The latitudinal extent of the mesh from its center in degrees.
Optional
longitude_extent
Type:float
Default value:45.0
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.

SmoothieSEM

The base mesh class.
SmoothieSEM mesh.
SIGNATURE
class SmoothieSEM(salvus.mesh.simple_mesh.config.BaseMesh):
    def __init__(self) -> None: ...

Methods

SmoothieSEM.apply()
Set the contents with a dictionary.
SIGNATURE
def apply(self, d: dict | _DeepSetter) -> None: ...
ARGUMENTS
Required
d
Type:dict | _DeepSetter
Description:
The dictionary to set.
SmoothieSEM.copy()
Return a deep copy of the object.
SIGNATURE
def copy(self) -> _DeepSetter: ...
SmoothieSEM.create_mesh()
Create the actual unstructured mesh object.
SIGNATURE
def create_mesh(
    self,
    verbose: bool = False,
    get_dictionary: bool = False,
    processing_function: (
        collections.abc.Callable
        | SurfaceMaskGenerator
        | RayMaskGenerator
        | None
    ) = None,
) -> UnstructuredMesh: ...
ARGUMENTS
Optional
verbose
Type:bool
Default value:False
Description:
Increase verbosity.
Optional
get_dictionary
Type:bool
Default value:False
Description:
Return the dictionary defining the mesh.
Optional
processing_function
Type:collections.abc.Callable | SurfaceMaskGenerator | RayMaskGenerator | None
Default value:None
Description:
optional call back function for mesh processing called directly after the mesh is finished to do efficient post processing, e.g. masking
SmoothieSEM.get_dictionary()
Get the contents of this object as a dictionary.
SIGNATURE
def get_dictionary(self) -> dict: ...
SmoothieSEM.validate()
Validates the current state of the configuration against its schema.
SIGNATURE
def validate(self) -> None: ...

Submodules

Used in tutorials

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