Skip to content

Commit f54b50f

Browse files
Merge pull request #133 from PrincetonUniversity/devel
SPECFEM++ 0.2.0 Release
2 parents 3c9fffb + b7082e0 commit f54b50f

File tree

18 files changed

+26
-55
lines changed

18 files changed

+26
-55
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

docs/cookbooks/example_02.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Parameter file
5151
~~~~~~~~~~~~~
5252

5353
.. code-block:: bash
54+
:caption: Par_File
5455
5556
#-----------------------------------------------------------
5657
#
@@ -199,6 +200,7 @@ Defining the topography of the domain
199200
We define the topography of the domain using the following topography file
200201

201202
.. code-block:: bash
203+
:caption: topography_file.dat
202204
203205
#
204206
# number of interfaces
@@ -260,7 +262,7 @@ Defining the source
260262
We define the source location and the source time function in the source file.
261263

262264
.. code-block:: yaml
263-
:linenos:
265+
:caption: single_source.yaml
264266
265267
number-of-sources: 1
266268
sources:
@@ -282,7 +284,6 @@ Running the simulation
282284
To run the solver, we first need to define a configuration file ``specfem_config.yaml``.
283285

284286
.. code-block:: yaml
285-
:linenos:
286287
:caption: specfem_config.yaml
287288
288289
parameters:

docs/cookbooks/example_03.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ With the above input files, we can run the mesher to generate the mesh database.
216216

217217
.. code:: bash
218218
219-
xmeshfem2D -p Par_file
219+
xmeshfem2D -p Par_File
220220
221221
Running the forward simulation
222222
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -321,7 +321,7 @@ With the above input files, we can run the forward simulation.
321321
Generating adjoint sources
322322
--------------------------
323323

324-
The next step is to generate the adjoint sources. We can generate the adjoint sources using ``./xadj_seismogram`` utility which models Eq. 45 of `Tromp et al. 2005 <https://doi.org/10.1111/j.1365-246X.2004.02453.x>`_. The utility requires synthetic seismograms and does not depend on the observed data.
324+
The next step is to generate the adjoint sources. In this example, we are computing sensitivity kernels for travel-time measurements. The adjoint source required for this kernel is defined by Eq. 45 of `Tromp et al. 2005 <https://doi.org/10.1111/j.1365-246X.2004.02453.x>`_, and relies only the synthetic velocity seismogram. Here we use the utility ``xadj_seismogram``, which computes this adjoint source from the displacement synthetics computed during forward run i.e. by numerically differentiating the displacements.
325325

326326
.. code:: bash
327327
@@ -483,7 +483,7 @@ Lastly if the kernels are stored in ASCII format, we can use numpy to read the k
483483

484484
.. note::
485485

486-
An python code for reading ASCII kernels and plotting them is provided `here <https://github.com/PrincetonUniversity/SPECFEMPP/blob/latest/examples/Tromp_2005/plot.py>`_.
486+
An python code for reading ASCII kernels and plotting them is provided `here <https://github.com/PrincetonUniversity/SPECFEMPP/blob/main/examples/Tromp_2005/plot.py>`_.
487487

488488
.. figure:: ../../examples/Tromp_2005/Reference_Kernels/Kernels.png
489489
:alt: Kernels

docs/getting_started/index.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ SPECFEM++ inherits several architecure specific cmake configuration keywords fro
117117
.. code-block:: bash
118118
119119
# cd into SPECFEM root directory
120-
cmake3 -S . -B build -D CMAKE_BUILD_TYPE=Release -D BUILD_TESTS=ON -D Kokkos_ENABLE_CUDA=ON -D Kokkos_ARCH_<architecture>=ON -D BUILD_EXAMPLES=ON
120+
cmake3 -S . -B build -D CMAKE_BUILD_TYPE=Release -D BUILD_TESTS=ON -D Kokkos_ENABLE_CUDA=ON -D Kokkos_ARCH_<architecture>=ON
121121
cmake --build build
122122
123123
.. note::
@@ -127,11 +127,11 @@ SPECFEM++ inherits several architecure specific cmake configuration keywords fro
127127
Adding SPECFEM to PATH
128128
----------------------
129129

130-
Finally, once compiled you could run SPECFEM++ from inside the build directory, by running the executible ``./specfem``. However, we recommend you add SPECFEM++ build directory to your ``PATH`` using
130+
Finally, once compiled you could run SPECFEM++ from inside the build directory, by running the executible ``./specfem2d``. However, we recommend you add SPECFEM++ build directory to your ``PATH`` using
131131

132132
.. code-block:: bash
133133
134-
export $PATH=$(pwd)/build:$PATH
134+
export PATH=$(pwd)/build:$PATH
135135
136136
Running the solver
137137
------------------
@@ -145,12 +145,14 @@ Lets run a simple example to test the installation. We will use the ``example\ho
145145
.. code-block:: bash
146146
147147
cd examples/homogeneous-medium-flat-topography
148-
xmeshfem2D -p Par_file
148+
mkdir -p OUTPUT_FILES
149+
xmeshfem2D -p Par_File
149150
150151
This will generate the mesh files. Next, we will run the solver using
151152

152153
.. code-block:: bash
153154
155+
mkdir -p OUTPUT_FILES/results
154156
specfem2d -p specfem_config.yaml
155157
156158
This will run the solver and generate synthetic seismograms at the receiver locations specified in ``STATIONS`` file.

docs/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,19 @@ Table below shows various features available and tested in this package on vario
140140
-
141141
-
142142

143-
* - displacement
143+
* - Displacement
144144
- ✔
145145
- ✔
146146
- ✔
147147
-
148148

149-
* - velocity
149+
* - Velocity
150150
- ✔
151151
- ✔
152152
- ✔
153153
-
154154

155-
* - acceleration
155+
* - Acceleration
156156
- ✔
157157
- ✔
158158
- ✔

examples/Tromp_2005/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

22
CMAKE_MINIMUM_REQUIRED(VERSION 3.17.5)
33

4-
configure_file(Snakefile.in ${CMAKE_SOURCE_DIR}/examples/Tromp_2005/Snakefile)
4+
configure_file(CMakeFiles/Par_File.in ${CMAKE_SOURCE_DIR}/examples/Tromp_2005/Par_File)
5+
configure_file(CMakeFiles/Snakefile.in ${CMAKE_SOURCE_DIR}/examples/Tromp_2005/Snakefile)

examples/Tromp_2005/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Wave propagation through homogeneous medium with no interfaces
22

3-
This example reproduces the results from Fig 9 of [Tromp et al. 2005](https://doi.org/10.1111/j.1365-246X.2004.02453.x).
3+
This example reproduces the results from Fig 9 of [Tromp et al. 2005](https://doi.org/10.1111/j.1365-246X.2004.02453.x). For a step-by-step guide on this example, please refer to the [documentation](https://specfem2d-kokkos.readthedocs.io/en/latest/cookbooks/example_03.html).
44

55
## Running the examples
66

0 commit comments

Comments
 (0)