Skip to content

salvus.project.configuration.bathymetry

salvus.project.configuration.bathymetry salvus project configuration bathymetry

Bathymetry.

Classes

BathymetryConfiguration

class BathymetryConfiguration(
    salvus.flow.utils.serialization_helpers.SerializationMixin
):
    def __init__(self, bathymetry_models: list[str] | str) -> 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.

Create a bathymetry configuration.

A bathymetry configuration is a collection of bathymetry models which will be applied to a given mesh via a simulation configuration. The order in which bathymetry models are applied to a mesh is the order in which they appear in this configuration.

Parameters
  • bathymetry_models list[str] | str — List of bathymetry models to be used.
Attributes
bathymetry_models list[str]

Get a list of the bathymetry models in this configuration.

Methods
from_json()
def from_json(d: Dict) -> Any: ...

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

Only load trusted input.

Parameters
  • d Dict — Dictionary containing its init parameters and a few other things.
Returns Any
to_json()
def to_json(
    self,
    external_file_hash: Optional[str] = None,
    timer: Optional[salvus._core.timer.timer.Timer] = None,
    log_to_logger: bool = False,
    comm: Optional[int] = None,
) -> Dict: ...

Serialize the object to a dictionary that can be written to JSON.

Parameters
  • external_file_hash Optional[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 Optional[salvus._core.timer.timer.Timer] = None — Execution timer.
  • log_to_logger bool = False — Log timings to the logger.
  • comm Optional[int] = None — MPI communicator, if any.
Returns Dict

Submodules

Used in tutorials