Mondaic

salvus.project.configuration.waveform_simulation_configuration

salvus.project.configuration.waveform_simulation_configuration salvus project configuration waveform_simulation_configuration

The waveform simulation configuration.

Classes

WaveformSimulationConfiguration

class WaveformSimulationConfiguration(
    salvus.flow.utils.deep_setters._DeepSetter,
    salvus.flow.utils.serialization_helpers.SerializationMixin,
):
    def __init__(
        self,
        start_time_in_seconds: salvus._core.types.float_ | None = None,
        end_time_in_seconds: salvus._core.types.float_ | None = None,
        time_step_in_seconds: salvus._core.types.float_ | None = None,
        attenuation: bool = False,
        spectral_element_order: salvus._core.types.int_ | None = None,
        receiver_sampling_rate_in_time_steps: (
            salvus._core.types.int_ | None
        ) = None,
        boundary_conditions: (
            Iterable[_BaseBoundary] | _BaseBoundary | None
        ) = None,
        courant_number: salvus._core.types.float_ | None = None,
    ): ...

Keeps track of the initial arguments passed to an objects and can later on serialize them to JSON document.

It will only consider whatever is passed in the init.

Detailed waveform simulation configuration options.

This is a restricted version of the default waveform simulation configuration that only allows setting some parameters.

Parameters
  • start_time_in_seconds salvus._core.types.float_ | None — The start time in seconds.
  • end_time_in_seconds salvus._core.types.float_ | None — The end time in seconds.
  • time_step_in_seconds salvus._core.types.float_ | None — The simulation time step in seconds.
  • attenuation bool — Attenuation on/off.
  • spectral_element_order salvus._core.types.int_ | None — The polynomial degree of the SEM shape functions.
  • receiver_sampling_rate_in_time_steps salvus._core.types.int_ | None — The sampling interval for receiver output as an interger multiple of time steps.
  • boundary_conditions Iterable[_BaseBoundary] | _BaseBoundary | None — Specify boundary conditions. This is primarily meant for Dirichlet boundaries. Conditions specified here take precedence over the absorbing boundary parameters.
  • courant_number salvus._core.types.float_ | None — Courant number used for the estimation of the time step. If not specified, default values of 0.6 (2-D) or 0.47 (3-D) will be used. Note that time_step_in_seconds takes precedence in case that both parameters are defined.
Methods
from_json()
def from_json(d: builtins.dict) -> Any: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d builtins.dict — Dictionary containing its init parameters and a few other things.
Returns Any
apply()
def apply(self, d: dict | _DeepSetter) -> None: ...

Set the contents with a dictionary.

Parameters
  • d dict | _DeepSetter — The dictionary to set.
Returns None
copy()
def copy(self) -> _DeepSetter: ...

Return a deep copy of the object.

Returns _DeepSetter
get_dictionary()
def get_dictionary(self) -> dict: ...

Get the contents of this object as a dictionary.

Returns dict
to_json()
def to_json(
    self,
    external_file_hash: str | None = None,
    timer: Timer | None = None,
    log_to_logger: bool = False,
    comm: int | None = None,
) -> dict: ...

Get a dictionary serialization of the object.

Parameters
  • external_file_hash str | None — 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.
  • timer Timer | None — Execution timer.
  • log_to_logger bool — Log timings to the logger.
  • comm int | None — MPI communicator, if any.
Returns dict
validate()
def validate(self) -> None: ...

Validates the current state of the configuration against its schema.

Returns None

Used in tutorials