Skip to content

Commit

Permalink
Fixed example03 | added copybutton
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit-Kakodkar committed Nov 4, 2024
1 parent a7ad49e commit fc8d4b5
Show file tree
Hide file tree
Showing 8 changed files with 502 additions and 135 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"sphinx_sitemap",
"sphinx.ext.inheritance_diagram",
"breathe",
"sphinx_copybutton",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/example_02.rst
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ To execute the mesher run

Make sure either your are in the build directory of SPECFEM2D kokkos or the build directory is added to your ``PATH``.

Note the path of the database file and :ref:`stations_file` generated after successfully running the mesher.
Note the path of the database file and a stations file generated after successfully running the mesher.

Defining the source
~~~~~~~~~~~~~~~~~~~
Expand Down
90 changes: 45 additions & 45 deletions docs/cookbooks/example_03.rst
Original file line number Diff line number Diff line change
Expand Up @@ -296,21 +296,21 @@ To store the wavefield at the last time step, we need to set the following param
Lastly we define the source:

.. code-block:: yaml
:caption: sources.yaml
number-of-sources: 1
sources:
- force:
x: 50000
z: 40000
source_surf: false
angle: 270.0
vx: 0.0
vz: 0.0
Ricker:
factor: 0.75e+10
tshift: 0.0
f0: 0.42
:caption: forward_sources.yaml
number-of-sources: 1
sources:
- force:
x: 50000
z: 40000
source_surf: false
angle: 270.0
vx: 0.0
vz: 0.0
Ricker:
factor: 0.75e+10
tshift: 0.0
f0: 0.42
With the above input files, we can run the forward simulation.

Expand Down Expand Up @@ -355,36 +355,36 @@ Now finally we can run the adjoint simulation. We use the same mesh database as
1. The adjoint sources are added to the sources file.

.. code-block:: yaml
:caption: sources.yaml
number-of-sources: 2
sources:
- force:
x: 50000
z: 40000
source_surf: false
angle: 270.0
vx: 0.0
vz: 0.0
Ricker:
factor: 0.75e+10
tshift: 0.0
f0: 0.42
- adjoint-source:
station_name: AA
network_name: S0001
x: 150000
z: 40000
source_surf: false
angle: 0.0
vx: 0.0
vz: 0.0
External:
format: ascii
stf:
X-component: OUTPUT_FILES/adjoint_sources/S0001AA.BXX.adj
Z-component: OUTPUT_FILES/adjoint_sources/S0001AA.BXZ.adj
:caption: adjoint_sources.yaml
number-of-sources: 2
sources:
- force:
x: 50000
z: 40000
source_surf: false
angle: 270.0
vx: 0.0
vz: 0.0
Ricker:
factor: 0.75e+10
tshift: 0.0
f0: 0.42
- adjoint-source:
station_name: AA
network_name: S0001
x: 150000
z: 40000
source_surf: false
angle: 0.0
vx: 0.0
vz: 0.0
External:
format: ascii
stf:
X-component: OUTPUT_FILES/adjoint_sources/S0001AA.BXX.adj
Z-component: OUTPUT_FILES/adjoint_sources/S0001AA.BXZ.adj
The adjoint sources require an external source time function generated during the previous step. The source time function is stored as a trace in ASCII format. Where the ``BXX`` is the X-component of the adjoint source and ``BXZ`` is the Z-component of the adjoint source.

Expand Down
2 changes: 1 addition & 1 deletion docs/meshfem2d/internal_mesher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ The region is described using a string.
- ``nxmax``: Integer value describing the x-coordinate of the spectral element at the top right corner of the region.
- ``nzmin``: Integer value describing the z-coordinate of the spectral element at the bottom left corner of the region.
- ``nzmax``: Integer value describing the z-coordinate of the spectral element at the top right corner of the region.
- ``material_number``: Integer value describing the type of material in the region. This value references the material number in the :ref:`velocity_model` section.
- ``material_number``: Integer value describing the type of material in the region. This value references the material number in the ``velocity_model``.
4 changes: 2 additions & 2 deletions docs/parameter_documentation/receivers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Receivers section defines receiver information required to calculate seismograms

.. note::

Please note that the :ref:`stations_file` is generated using SPECFEM2D mesh generator i.e. xmeshfem2d
Please note that the ``stations_file`` is generated using SPECFEM2D mesh generator i.e. xmeshfem2d

**Parameter Name** : ``receivers``
-----------------------------------
Expand All @@ -23,7 +23,7 @@ Receivers section defines receiver information required to calculate seismograms

**possible values** : [string]

**documentation** : Path to :ref:`stations_file`
**documentation** : Path to ``stations_file``

**Parameter Name** : ``receivers.angle``
******************************************************
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
breathe
furo
sphinx-copybutton
sphinx-sitemap
Loading

0 comments on commit fc8d4b5

Please sign in to comment.