Mondaic

Salvus 0.12.11

Released: 2023-05-09

Minor release with a few bug fixes and other small improvements listed below.

Highlights of new features include the ability to output volumes and surfaces on a subinterval of the simulation time axis, improved functionality to extrude meshes and an experimental feature to invert for the source wavelet.

Changes

SalvusCompute

Adds the ability to output surface and volume fields only between certain times. To access this functionality, the start_time_in_seconds and end_time_in_seconds can now be passed to the respective output groups in a simulation.Waveform(...) object. Times passed are always truncated (floored) to the preceding time step.

SalvusCompute

Fix a bug in computing gradients with respect to the C_ij components of the elastic tensor in fully anisotropic 3D media..

SalvusFlow

Fix a regression where sources and receivers could not longer be specified as dictionaries.

SalvusFlow

Enforce that each type of boundary condition can only be added once to a simulation object to ensure that the boundary conditions are treated properly in SalvusCompute.

w = sn.simple_config.simulation.Waveform(mesh=m)

# If all settings for the same type of boundary condition are the same,
# the side sets will be merged.
w.add_boundary_conditions([
  sn.simple_config.boundary.HomogeneousDirichlet(side_sets=["x0"]),
  sn.simple_config.boundary.HomogeneousDirichlet(side_sets=["x1"])
])

# However, using different settings for a boundary type will raise an error.
w.add_boundary_conditions([
  sn.simple_config.boundary.Absorbing(
    side_sets=["x0"], taper_amplitude=0.0, width_in_meters=0.0
  )
  sn.simple_config.boundary.Absorbing(
    side_sets=["x1"], taper_amplitude=1.0, width_in_meters=1.0
  )
])

This is now part of the validation of the simple config objects.

SalvusFlow

Fix a bug that could cause a failing license request when using tokens in adjoint simulations.

SalvusMesh

The mesh notebook widget will now initialize its camera to point at the center of spherical chunks.

SalvusMesh

Higher-order meshes can now be extruded from 2-D to 3-D.

SalvusMesh

Material parameters will now also be extruded when meshes are being extruded.

SalvusProject

Adding support for ipywidgets8.

SalvusProject API CHANGE

The window picking algorithm for seismology now correctly handles cases where the event origin time is not the time of the first sample of the synthetics.

A consequence of this is that custom window picking functions must now also have a event_origin_time keyword argument. We believe this should not affect any users, if it does: the error message is very clear and fixing it is straight forward.

SalvusUtils

Add a new algorithm that groups elements by their number of occurrences before performing the wavefield output tensor contraction. This should be close to the most efficient approach in all cases, so it is also now the default when extracting a WavefieldOutput object to an xarray.

Changes to Experimental Features

SalvusModules

Adds the ability to invert for source characteristics for single-component (acoustic) data. There are currently two interfaces for performing such a source inversion in the salvus.modules.source_inversion submodule by using one of the following functions:

  • invert_wavelet: Accepts the observed and synthetically generated data as NumPy arrays and returns the inverted wavelet as a NumPy array.
  • invert_wavelet_from_event_data: Performs the same inversion as within invert_wavelet, but accepts EventData objects instead of NumPy arrays. This is generally the more convenient approach when used together with SalvusProject.

Note that inverting for multi-component data is currently unsupported.