Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dolci/exchange fwi demo test #3836

Merged
merged 13 commits into from
Nov 7, 2024
26 changes: 18 additions & 8 deletions demos/full_waveform_inversion/full_waveform_inversion.py.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,29 @@ The source number is defined with the ``Ensemble.ensemble_comm`` rank::
source_number = my_ensemble.ensemble_comm.rank

In this example, we consider a two-dimensional square domain with a side length of 1.0 km. The mesh is
built over the ``my_ensemble.comm`` (spatial) communicator::

Lx, Lz = 1.0, 1.0
mesh = UnitSquareMesh(80, 80, comm=my_ensemble.comm)
built over the ``my_ensemble.comm`` (spatial) communicator.

::

import os
if os.getenv("FIREDRAKE_CI_TESTS") == "1":
# Setup for a faster test execution.
dt = 0.03 # time step in seconds
final_time = 0.6 # final time in seconds
nx, ny = 15, 15
else:
dt = 0.002 # time step in seconds
final_time = 1.0 # final time in seconds
nx, ny = 80, 80

The basic input for the FWI problem are defined as follows::
mesh = UnitSquareMesh(nx, ny, comm=my_ensemble.comm)

The frequency of the Ricker wavelet, the source and receiver locations are defined as follows::

import numpy as np
frequency_peak = 7.0 # The dominant frequency of the Ricker wavelet in Hz.
source_locations = np.linspace((0.3, 0.1), (0.7, 0.1), num_sources)
receiver_locations = np.linspace((0.2, 0.9), (0.8, 0.9), 20)
dt = 0.002 # time step in seconds
final_time = 1.0 # final time in seconds
frequency_peak = 7.0 # The dominant frequency of the Ricker wavelet in Hz.

Sources and receivers locations are illustrated in the following figure:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/advanced_tut.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ element systems.
A pressure-convection-diffusion preconditioner for the Navier-Stokes equations.</demos/navier_stokes.py>
Rayleigh-Benard convection.<demos/rayleigh-benard.py>
Netgen support.<demos/netgen_mesh.py>
Full-waveform inversion: Full-waveform inversion: spatial and wave sources parallelism.<demos/full_waveform_inversion.py>
Full-waveform inversion: spatial and wave sources parallelism.<demos/full_waveform_inversion.py>
Loading