salvus.mesh.simple_mesh
User-friendly meshing interface.
Classes
Cartesian2D
Cartesian2Dclass Cartesian2D(salvus.mesh.simple_mesh.config.BaseMesh):
def __init__(self): ...Cartesian2D mesh.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter: ...Return a deep copy of the object.
create_mesh()
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.
verbosebool — Increase verbosity.get_dictionarybool — Return the dictionary defining the mesh.processing_functionOptional[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
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict: ...Get the contents of this object as a dictionary.
validate()
validate()def validate(self) -> None: ...Validates the current state of the configuration against its schema.
Cartesian2DHomogeneous
Cartesian2DHomogeneousclass Cartesian2DHomogeneous(salvus.mesh.simple_mesh.config.BaseMesh):
def __init__(self): ...Cartesian2DHomogeneous mesh.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter: ...Return a deep copy of the object.
create_mesh()
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.
verbosebool — Increase verbosity.get_dictionarybool — Return the dictionary defining the mesh.processing_functionOptional[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
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict: ...Get the contents of this object as a dictionary.
validate()
validate()def validate(self) -> None: ...Validates the current state of the configuration against its schema.
Cartesian3D
Cartesian3Dclass Cartesian3D(salvus.mesh.simple_mesh.config.BaseMesh):
def __init__(self): ...Cartesian3D mesh.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter: ...Return a deep copy of the object.
create_mesh()
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.
verbosebool — Increase verbosity.get_dictionarybool — Return the dictionary defining the mesh.processing_functionOptional[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
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict: ...Get the contents of this object as a dictionary.
validate()
validate()def validate(self) -> None: ...Validates the current state of the configuration against its schema.
Cartesian3DHomogeneous
Cartesian3DHomogeneousclass Cartesian3DHomogeneous(salvus.mesh.simple_mesh.config.BaseMesh):
def __init__(self): ...Cartesian3DHomogeneous mesh.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter: ...Return a deep copy of the object.
create_mesh()
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.
verbosebool — Increase verbosity.get_dictionarybool — Return the dictionary defining the mesh.processing_functionOptional[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
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict: ...Get the contents of this object as a dictionary.
validate()
validate()def validate(self) -> None: ...Validates the current state of the configuration against its schema.
Globe3DAxialSymmetry
Globe3DAxialSymmetryclass Globe3DAxialSymmetry(salvus.mesh.simple_mesh.config.BaseMesh):
def __init__(self): ...Globe3DAxialSymmetry mesh.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter: ...Return a deep copy of the object.
create_mesh()
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.
verbosebool — Increase verbosity.get_dictionarybool — Return the dictionary defining the mesh.processing_functionOptional[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
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict: ...Get the contents of this object as a dictionary.
validate()
validate()def validate(self) -> None: ...Validates the current state of the configuration against its schema.
SmoothieSEM
SmoothieSEMclass SmoothieSEM(salvus.mesh.simple_mesh.config.BaseMesh):
def __init__(self): ...SmoothieSEM mesh.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter: ...Return a deep copy of the object.
create_mesh()
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.
verbosebool — Increase verbosity.get_dictionarybool — Return the dictionary defining the mesh.processing_functionOptional[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
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict: ...Get the contents of this object as a dictionary.
validate()
validate()def validate(self) -> None: ...Validates the current state of the configuration against its schema.
SphericalChunk3D
SphericalChunk3Dclass 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.
modelUnion[str, Callable] — The name of the 1-D background model.periodfloat — The minimum seismic period for which to generate the mesh. This value is used in conjunction withelements_per_wavelengthto control the accuracy of the simulation.latitude_extentfloat — The latitudinal extent of the mesh from its center in degrees.longitude_extentfloat — The longitudinal extent of the mesh from its center in degrees.tensor_orderint — The order of the model representation (1, 2, or 4). See the “Model Order” tutorial on the website for more details.latitude_centerfloat — The latitudinal center of the mesh in degrees.longitude_centerfloat — 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_wavelengthfloat — The desired elements per wavelength for the to be created mesh.minimum_radius_in_kmfloat — Minimum radius of the mesh in kilometers.ab_paramsOptional[salvus.mesh.simple_mesh.basic_mesh.AbsorbingBoundaryParameters] — Parameters controlling the extrusion of the domain for the purposes of adding absorbing boundaries.constant_q_frequency_bandOptional[Tuple[float, float]] — A tuple of frequencies (low, high) over which Q should be approximately constant. If not passed, the band will be estimatedmin_period_in_seconds.use_lmbool — Use the layered meshing backend.
SmoothieSEM
SmoothieSEMclass SmoothieSEM(salvus.mesh.simple_mesh.config.BaseMesh):
def __init__(self): ...SmoothieSEM mesh.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None: ...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter: ...Return a deep copy of the object.
create_mesh()
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.
verbosebool — Increase verbosity.get_dictionarybool — Return the dictionary defining the mesh.processing_functionOptional[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
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict: ...Get the contents of this object as a dictionary.
validate()
validate()def validate(self) -> None: ...Validates the current state of the configuration against its schema.