salvus.project.configuration.waveform_simulation_configuration
Classes
WaveformSimulationConfiguration
WaveformSimulationConfigurationclass WaveformSimulationConfiguration(
salvus.flow.utils.deep_setters._DeepSetter,
salvus.flow.utils.serialization_helpers.SerializationMixin,
):
def __init__(
self,
start_time_in_seconds: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
end_time_in_seconds: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
time_step_in_seconds: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
attenuation: bool = False,
spectral_element_order: Optional[int, numpy.int32, numpy.int64] = None,
receiver_sampling_rate_in_time_steps: Optional[
int, numpy.int32, numpy.int64
] = None,
boundary_conditions: Optional[
Iterable[salvus.flow.simple_config.boundary._Base],
salvus.flow.simple_config.boundary._Base,
] = None,
):
...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_secondsOptional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — The start time in seconds.end_time_in_secondsOptional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — The end time in seconds.time_step_in_secondsOptional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — The simulation time step in seconds.attenuationbool — Attenuation on/off.spectral_element_orderOptional[int, numpy.int32, numpy.int64] — The polynomial degree of the SEM shape functions.receiver_sampling_rate_in_time_stepsOptional[int, numpy.int32, numpy.int64] — The sampling interval for receiver output as an interger multiple of time steps.boundary_conditionsOptional[Iterable[salvus.flow.simple_config.boundary._Base], salvus.flow.simple_config.boundary._Base] — Specify boundary conditions. This is primarily meant for Dirichlet boundaries. Conditions specified here take precedence over the absorbing boundary parameters.
Methods
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
Parameters
dDict — Dictionary containing its init parameters and a few other things.
Returns Any
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None:
...Set the contents with a dictionary.
Parameters
dUnion[Dict, _DeepSetter] — The dictionary to set.
Returns None
copy()
copy()def copy(self) -> _DeepSetter:
...Return a deep copy of the object.
Returns _DeepSetter
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict:
...Get the contents of this object as a dictionary.
Returns Dict
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Get a dictionary serialization of the object.
Parameters
external_file_hashOptional[str] — 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.
Returns Dict
validate()
validate()def validate(self) -> None:
...Validates the current state of the configuration against its schema.
Returns None