Mondaic
This API reference is not for the latest stable Salvus version.

salvus.mesh.simple_mesh

User-friendly meshing interface.

Classes

Cartesian2D

class Cartesian2D(salvus.mesh.simple_mesh.config.BaseMesh):
    def __init__(self): ...

Cartesian2D mesh.

Methods
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
create_mesh()
def create_mesh(
    self,
    verbose: bool = False,
    get_dictionary: bool = False,
    processing_function: Optional[
        Callable, SurfaceMaskGenerator, RayMaskGenerator
    ] = None,
) -> Union[
    Tuple[
        salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh,
        Dict,
    ],
    salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh,
]: ...

Create the actual unstructured mesh object.

Parameters
  • verbose bool — Increase verbosity.
  • get_dictionary bool — Return the dictionary defining the mesh.
  • processing_function Optional[Callable, SurfaceMaskGenerator, RayMaskGenerator] — optional call back function for mesh processing called directly after the mesh is finished to do efficient post processing, e.g. masking
Returns Union[Tuple[salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh, Dict], salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh]
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

Cartesian2DHomogeneous

class Cartesian2DHomogeneous(salvus.mesh.simple_mesh.config.BaseMesh):
    def __init__(self): ...

Cartesian2DHomogeneous mesh.

Methods
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
create_mesh()
def create_mesh(
    self,
    verbose: bool = False,
    get_dictionary: bool = False,
    processing_function: Optional[
        Callable, SurfaceMaskGenerator, RayMaskGenerator
    ] = None,
) -> Union[
    Tuple[
        salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh,
        Dict,
    ],
    salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh,
]: ...

Create the actual unstructured mesh object.

Parameters
  • verbose bool — Increase verbosity.
  • get_dictionary bool — Return the dictionary defining the mesh.
  • processing_function Optional[Callable, SurfaceMaskGenerator, RayMaskGenerator] — optional call back function for mesh processing called directly after the mesh is finished to do efficient post processing, e.g. masking
Returns Union[Tuple[salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh, Dict], salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh]
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

Cartesian3D

class Cartesian3D(salvus.mesh.simple_mesh.config.BaseMesh):
    def __init__(self): ...

Cartesian3D mesh.

Methods
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
create_mesh()
def create_mesh(
    self,
    verbose: bool = False,
    get_dictionary: bool = False,
    processing_function: Optional[
        Callable, SurfaceMaskGenerator, RayMaskGenerator
    ] = None,
) -> Union[
    Tuple[
        salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh,
        Dict,
    ],
    salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh,
]: ...

Create the actual unstructured mesh object.

Parameters
  • verbose bool — Increase verbosity.
  • get_dictionary bool — Return the dictionary defining the mesh.
  • processing_function Optional[Callable, SurfaceMaskGenerator, RayMaskGenerator] — optional call back function for mesh processing called directly after the mesh is finished to do efficient post processing, e.g. masking
Returns Union[Tuple[salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh, Dict], salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh]
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

Cartesian3DHomogeneous

class Cartesian3DHomogeneous(salvus.mesh.simple_mesh.config.BaseMesh):
    def __init__(self): ...

Cartesian3DHomogeneous mesh.

Methods
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
create_mesh()
def create_mesh(
    self,
    verbose: bool = False,
    get_dictionary: bool = False,
    processing_function: Optional[
        Callable, SurfaceMaskGenerator, RayMaskGenerator
    ] = None,
) -> Union[
    Tuple[
        salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh,
        Dict,
    ],
    salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh,
]: ...

Create the actual unstructured mesh object.

Parameters
  • verbose bool — Increase verbosity.
  • get_dictionary bool — Return the dictionary defining the mesh.
  • processing_function Optional[Callable, SurfaceMaskGenerator, RayMaskGenerator] — optional call back function for mesh processing called directly after the mesh is finished to do efficient post processing, e.g. masking
Returns Union[Tuple[salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh, Dict], salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh]
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

Globe3DAxialSymmetry

class Globe3DAxialSymmetry(salvus.mesh.simple_mesh.config.BaseMesh):
    def __init__(self): ...

Globe3DAxialSymmetry mesh.

Methods
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
create_mesh()
def create_mesh(
    self,
    verbose: bool = False,
    get_dictionary: bool = False,
    processing_function: Optional[
        Callable, SurfaceMaskGenerator, RayMaskGenerator
    ] = None,
) -> Union[
    Tuple[
        salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh,
        Dict,
    ],
    salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh,
]: ...

Create the actual unstructured mesh object.

Parameters
  • verbose bool — Increase verbosity.
  • get_dictionary bool — Return the dictionary defining the mesh.
  • processing_function Optional[Callable, SurfaceMaskGenerator, RayMaskGenerator] — optional call back function for mesh processing called directly after the mesh is finished to do efficient post processing, e.g. masking
Returns Union[Tuple[salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh, Dict], salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh]
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

SmoothieSEM

class SmoothieSEM(salvus.mesh.simple_mesh.config.BaseMesh):
    def __init__(self): ...

SmoothieSEM mesh.

Methods
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
create_mesh()
def create_mesh(
    self,
    verbose: bool = False,
    get_dictionary: bool = False,
    processing_function: Optional[
        Callable, SurfaceMaskGenerator, RayMaskGenerator
    ] = None,
) -> Union[
    Tuple[
        salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh,
        Dict,
    ],
    salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh,
]: ...

Create the actual unstructured mesh object.

Parameters
  • verbose bool — Increase verbosity.
  • get_dictionary bool — Return the dictionary defining the mesh.
  • processing_function Optional[Callable, SurfaceMaskGenerator, RayMaskGenerator] — optional call back function for mesh processing called directly after the mesh is finished to do efficient post processing, e.g. masking
Returns Union[Tuple[salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh, Dict], salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh]
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

SphericalChunk3D

class SphericalChunk3D(
    salvus.mesh.simple_mesh.basic_mesh.SphericalChunkBuiltIn3D
):
    def __init__(
        self,
        model: Union[str, 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: Optional[
            salvus.mesh.simple_mesh.basic_mesh.AbsorbingBoundaryParameters
        ] = None,
        constant_q_frequency_band: Optional[Tuple[float, float]] = None,
        use_lm: bool = True,
    ): ...

Compatible class with a few defaults. Please use SphericalChunkBuiltIn3D from the basic_mesh module instead.

Parameters
  • model Union[str, Callable] — The name of the 1-D background model.
  • period float — 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.
  • latitude_extent float — The latitudinal extent of the mesh from its center in degrees.
  • longitude_extent float — The longitudinal extent of the mesh from its center in degrees.
  • tensor_order int — The order of the model representation (1, 2, or 4). See the “Model Order” tutorial on the website for more details.
  • latitude_center float — The latitudinal center of the mesh in degrees.
  • longitude_center float — 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.
  • elements_per_wavelength float — The desired elements per wavelength for the to be created mesh.
  • minimum_radius_in_km float — Minimum radius of the mesh in kilometers.
  • ab_params Optional[salvus.mesh.simple_mesh.basic_mesh.AbsorbingBoundaryParameters] — Parameters controlling the extrusion of the domain for the purposes of adding absorbing boundaries.
  • constant_q_frequency_band Optional[Tuple[float, float]] — 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.
  • use_lm bool — Use the layered meshing backend.

SmoothieSEM

class SmoothieSEM(salvus.mesh.simple_mesh.config.BaseMesh):
    def __init__(self): ...

SmoothieSEM mesh.

Methods
apply()
def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...

Set the contents with a dictionary.

Parameters
  • d Union[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
create_mesh()
def create_mesh(
    self,
    verbose: bool = False,
    get_dictionary: bool = False,
    processing_function: Optional[
        Callable, SurfaceMaskGenerator, RayMaskGenerator
    ] = None,
) -> Union[
    Tuple[
        salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh,
        Dict,
    ],
    salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh,
]: ...

Create the actual unstructured mesh object.

Parameters
  • verbose bool — Increase verbosity.
  • get_dictionary bool — Return the dictionary defining the mesh.
  • processing_function Optional[Callable, SurfaceMaskGenerator, RayMaskGenerator] — optional call back function for mesh processing called directly after the mesh is finished to do efficient post processing, e.g. masking
Returns Union[Tuple[salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh, Dict], salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh]
get_dictionary()
def get_dictionary(self) -> Dict: ...

Get the contents of this object as a dictionary.

Returns Dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

Submodules