New fwi notebook overview#236
Open
Olender wants to merge 130 commits into
Open
Conversation
…th-setter-and-getters' into olender/focused_fwi_tutorial
…P/spyro into olender/focused_fwi_tutorial
Olender
commented
Mar 16, 2026
| "\n", | ||
| "**What is Full Waveform Inversion?**\n", | ||
| "\n", | ||
| "Classical FWI is an iterative PDE-constrained optimization process that minimizes a cost functional, such as, the difference between observed seismic data and synthetic data generated from a velocity model. The cost functional to be minimized varies depending on your desired FWI research. The process can involve:\n", |
Olender
commented
Mar 16, 2026
| "\n", | ||
| "Let's set up our FWI problem parameters. We'll use a higher-order mass-lumped triangular finite element method (degree 4) for better accuracy, and define our mesh, acquisition geometry, and time domain settings.\n", | ||
| "\n", | ||
| "For a better understanding of why we chose degree higher-oder mass lumped triangles, please look at the [spyro paper](https://doi.org/10.5194/gmd-15-8639-2022)." |
Member
Author
There was a problem hiding this comment.
Remove this line e adicionar citação em cima
Olender
commented
Mar 16, 2026
| "id": "c4fa09e3", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "Let us define our mesh dimensions. These are the mesh dimonsions for the domain of interest and do not include any absorbing layers." |
Member
Author
There was a problem hiding this comment.
Reduzir tamanho de malha e local dos receptores e fontes
Olender
commented
Mar 16, 2026
| "Here we define the acquisition geometry, including the properties of the sources and receivers. \n", | ||
| "In this setup, we use **8 independent sources**.\n", | ||
| "\n", | ||
| "Since we are **not currently using source-encoding techniques** (only partially supported) nor a **supershot approach** (currently supported), each source requires a **fully independent forward propagation**. As a result, a total of **8 separate forward simulations** will be performed with this configuration.\n", |
Member
Author
There was a problem hiding this comment.
Remove the source-encoding and supershot comments and add a seperate notebook explaining them
Olender
commented
Mar 16, 2026
| "For this reason, it is recommended to **parallelize in multiples of 8** to achieve better performance. \n", | ||
| "However, in the present case, the problem is solved **in serial**. The simulations are therefore executed sequentially, one after the other, with intermediate results stored in cache. These cached data are continuously overwritten or discarded between runs.\n", | ||
| "\n", | ||
| "I've also printed the source location value so you can see that create_transect creates a list of floats. The same is true for the receiver locations. Therefore, you can pass data to them directly, just remember that it has to be a list of floats." |
Olender
commented
Mar 16, 2026
| "id": "44030540", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "Let's add some Clayton-Engquist absorbing boundary conditions since they are local (without adding a pad), and therefore computationally cheap. For other more realistic cases we recommend using HABCs." |
Olender
commented
Mar 16, 2026
| "id": "a409d9bb", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "Here we define our time marching related parameters. Spyro is able to calculate the maximum stable timestep, but since this is outside of the scope of this tutorial we just set up a value we know will work. If youuse a time-step large enought that your problem becomes unstable you will receive an appropriate error." |
Olender
commented
Mar 16, 2026
| "id": "dfee9c92", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "Now we'll create the \"true\" velocity model that will generate our synthetic observed data. This model contains both circular and rectangular anomalies to create a little more complexity for the inversion challenge. I call this velocity model the Minas Cheese model. You will usually see in the literature a Camembert model consisting of only a circle, but since spyro's team is mostly Brazilian, we use the Brazilian Minas cheese model and take into account that in the 1700s gold used to be hidden inside Minas cheese wheels." |
Olender
commented
Mar 16, 2026
| "id": "dfee9c92", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "Now we'll create the \"true\" velocity model that will generate our synthetic observed data. This model contains both circular and rectangular anomalies to create a little more complexity for the inversion challenge. I call this velocity model the Minas Cheese model. You will usually see in the literature a Camembert model consisting of only a circle, but since spyro's team is mostly Brazilian, we use the Brazilian Minas cheese model and take into account that in the 1700s gold used to be hidden inside Minas cheese wheels." |
Olender
commented
Mar 16, 2026
| " \"\"\"\n", | ||
| " \n", | ||
| " # Create FWI object for generating real data\n", | ||
| " fwi = spyro.FullWaveformInversion(dictionary=dictionary)\n", |
Olender
commented
Mar 16, 2026
| If True, output the velocity model to a pvd file for visualization. | ||
| Default is False. | ||
| dg_velocity_model : bool, optional | ||
| If True, use DG0 function space. Default is True. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #236 +/- ##
==========================================
+ Coverage 78.34% 82.10% +3.76%
==========================================
Files 74 75 +1
Lines 5228 5489 +261
==========================================
+ Hits 4096 4507 +411
+ Misses 1132 982 -150 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.