Version:

salvus.project.configuration.mesh_configuration

salvus.project.configuration.mesh_configuration salvus project configuration mesh_configuration
The mesh configuration.

Classes

MeshConfiguration

Parameters to turn abstract simulation settings into a concrete mesh.
SIGNATURE
class MeshConfiguration(
    salvus.flow.utils.serialization_helpers.SerializationMixin
):
    def __init__(
        self,
        max_frequency_in_hertz: salvus._core.types.float_,
        elements_per_wavelength: salvus._core.types.float_,
        tensor_order: salvus._core.types.int_ = 1,
        max_depth_in_meters: salvus._core.types.float_ | None = None,
        absorbing_boundaries: AbsorbingBoundaryParameters | None = None,
        mask_generator: SurfaceMaskGenerator | RayMaskGenerator | None = None,
    ) -> None: ...
ARGUMENTS
Required
max_frequency_in_hertz
Type:salvus._core.types.float_
Description:
Max mesh frequency.
Required
elements_per_wavelength
Type:salvus._core.types.float_
Description:
Elements per wavelength.
Optional
tensor_order
Type:salvus._core.types.int_
Default value:1
Description:
Tensor order for the mesh.
Optional
max_depth_in_meters
Type:salvus._core.types.float_ | None
Default value:None
Description:
Maximum depth in meters of the mesh.
Optional
absorbing_boundaries
Type:AbsorbingBoundaryParameters | None
Default value:None
Description:
Absorbing boundary configuration.
Optional
mask_generator
Type:SurfaceMaskGenerator | RayMaskGenerator | None
Default value:None
Description:
A mesh masking callback function.

Properties

  • min_period_in_seconds(float)-Minimum mesh period in seconds.

Class Methods

MeshConfiguration.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.

Methods

MeshConfiguration.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.

ModelDependentMeshParameters

Model dependent mesh parameters.
SIGNATURE
class ModelDependentMeshParameters(
    salvus.flow.utils.serialization_helpers.SerializationMixin
):
    def __init__(
        self,
        mesh_parameters: MeshConfiguration,
        model_configuration: ModelConfiguration,
        topography_configuration: TopographyConfiguration | None,
        bathymetry_configuration: BathymetryConfiguration | None = None,
    ): ...
ARGUMENTS
Required
mesh_parameters
Type:MeshConfiguration
Description:
The mesh parameters.
Required
model_configuration
Type:ModelConfiguration
Description:
Model configuration.
Required
topography_configuration
Type:TopographyConfiguration | None
Description:
Configuration for the topography.
Optional
bathymetry_configuration
Type:BathymetryConfiguration | None
Default value:None
Description:
Configuration for the bathymetry.

Class Methods

ModelDependentMeshParameters.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.

Methods

ModelDependentMeshParameters.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.

SphericalSmoothieSemLateralRefinement

Parameters describing a SmoothieSEM lateral refinement.
Multiple refinements can be used in a SmoothieSEM context, with the strict requirement that each refinement must be wholly contained within the others. To add multiple refinements, one can pass a list of these objects to the relevant mesh generation routines.
Note here that theta and phi are to be taken from the source's reference frame, and are in general not equivalent to geographical latitude and longitude.
SIGNATURE
class SphericalSmoothieSemLateralRefinement(builtins.object):
    def __init__(
        self,
        min_theta_in_degrees: salvus._core.types.float_,
        max_theta_in_degrees: salvus._core.types.float_,
        min_radius_in_meters: salvus._core.types.float_,
        max_radius_in_meters: salvus._core.types.float_ | None = None,
        min_phi_in_degrees: salvus._core.types.float_ | None = None,
        max_phi_in_degrees: salvus._core.types.float_ | None = None,
    ) -> None: ...
ARGUMENTS
Required
min_theta_in_degrees
Type:salvus._core.types.float_
Description:
Min theta refinement boundary.
Required
max_theta_in_degrees
Type:salvus._core.types.float_
Description:
Max theta refinement boundary.
Required
min_radius_in_meters
Type:salvus._core.types.float_
Description:
Min radius of the refinement.
Optional
max_radius_in_meters
Type:salvus._core.types.float_ | None
Default value:None
Description:
Max radius of the refinement. Defaults to None (which represents the surface of the Earth).
Optional
min_phi_in_degrees
Type:salvus._core.types.float_ | None
Default value:None
Description:
Min phi refinement boundary. Defaults to None (which results in a refinement in a band around the globe).
Optional
max_phi_in_degrees
Type:salvus._core.types.float_ | None
Default value:None
Description:
Max phi refinement boundary. Defaults to None (which results in a refinement in a band around the globe).

Methods

SphericalSmoothieSemLateralRefinement.get_dict()
Get the refinement parameters as a Python dictionary.
This is the form which is accepted by the Salvus_Mesh_ schema.
SIGNATURE
def get_dict(self) -> dict: ...

SphericalSmoothieSemMeshConfiguration

A mixin add SmoothieSEM parameters to spherical meshes.
SIGNATURE
class SphericalSmoothieSemMeshConfiguration(
    salvus.project.configuration.mesh_configuration._SphericalSmoothieSemMixin,
    salvus.project.configuration.mesh_configuration.MeshConfiguration,
):
    def __init__(
        self,
        elements_per_wavelength: salvus._core.types.float_,
        source_latitude: salvus._core.types.float_,
        source_longitude: salvus._core.types.float_,
        num_lateral_elements: salvus._core.types.int_,
        tensor_order: salvus._core.types.int_ = 1,
        lateral_refinements: (
            SphericalSmoothieSemLateralRefinement
            | list[SphericalSmoothieSemLateralRefinement]
            | None
        ) = None,
        max_frequency_in_hertz: salvus._core.types.float_ | None = None,
        min_period_in_seconds: salvus._core.types.float_ | None = None,
        mask_generator: SurfaceMaskGenerator | RayMaskGenerator | None = None,
    ): ...
ARGUMENTS
Required
elements_per_wavelength
Type:salvus._core.types.float_
Description:
Elements per wavelength.
Required
source_latitude
Type:salvus._core.types.float_
Description:
Latitude of the seismic source.
Required
source_longitude
Type:salvus._core.types.float_
Description:
Longitude of the seismic source.
Required
num_lateral_elements
Type:salvus._core.types.int_
Description:
Number of lateral elements per hemisphere.
Optional
tensor_order
Type:salvus._core.types.int_
Default value:1
Description:
Tensor order for the mesh.
Optional
lateral_refinements
Type:SphericalSmoothieSemLateralRefinement | list[SphericalSmoothieSemLateralRefinement] | None
Default value:None
Description:
A list of lateral refinements to add.
Optional
max_frequency_in_hertz
Type:salvus._core.types.float_ | None
Default value:None
Description:
Max mesh frequency.
Optional
min_period_in_seconds
Type:salvus._core.types.float_ | None
Default value:None
Description:
Minimum period in seconds.
Optional
mask_generator
Type:SurfaceMaskGenerator | RayMaskGenerator | None
Default value:None
Description:
. An optional mesh masking callback.

Properties

  • min_period_in_seconds(float)-Minimum mesh period in seconds.

Class Methods

SphericalSmoothieSemMeshConfiguration.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.

Methods

SphericalSmoothieSemMeshConfiguration.get_lateral_refinements()
Get a any lateral refinements as a list of dictionaries.
The list can then be passed directly to the SmoothieSem mesh schema.
SIGNATURE
def get_lateral_refinements(self) -> list[dict] | None: ...
SphericalSmoothieSemMeshConfiguration.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.
PAGE CONTENTS