Skip to content

Commit 0fb684c

Browse files
authored
Merge pull request #1777 from danielpeter/devel
adds coupling with wavefield injection from a SPECFEM simulation; adds Vs30 routines; updates setup scripts
2 parents 725321e + cfc5cfd commit 0fb684c

File tree

86 files changed

+99357
-795
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+99357
-795
lines changed

.github/scripts/run_tests.sh

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ my_kernel_test(){
8989
cd $dir
9090

9191
# default setup
92-
# limit time steps for testing
93-
sed -i "s:^NSTEP .*:NSTEP = 200:" DATA/Par_file
94-
# shortens output interval to avoid timeouts
95-
sed -i "s:^NTSTEP_BETWEEN_OUTPUT_INFO .*:NTSTEP_BETWEEN_OUTPUT_INFO = 100:" DATA/Par_file
92+
if [ -e DATA/Par_file ]; then
93+
# limit time steps for testing
94+
sed -i "s:^NSTEP .*:NSTEP = 200:" DATA/Par_file
95+
# shortens output interval to avoid timeouts
96+
sed -i "s:^NTSTEP_BETWEEN_OUTPUT_INFO .*:NTSTEP_BETWEEN_OUTPUT_INFO = 100:" DATA/Par_file
97+
fi
9698

9799
# limit time steps for specific examples
98100
# simple mesh example
@@ -139,6 +141,14 @@ fi
139141
if [ "$TESTDIR" == "EXAMPLES/applications/small_example_coupling_FK_specfem/" ]; then
140142
sed -i "s:^NSTEP .*:NSTEP = 1000:" DATA/Par_file
141143
fi
144+
# coupling SPECFEM
145+
if [ "$TESTDIR" == "EXAMPLES/applications/small_example_coupling_SPECFEM_specfem/" ]; then
146+
# turning off mesh output to avoid using too much memory on the test nodes
147+
sed -i "s:^SAVE_MESH_FILES .*:SAVE_MESH_FILES = .false.:" DATA.regional/Par_file
148+
sed -i "s:^SAVE_MESH_FILES .*:SAVE_MESH_FILES = .false.:" DATA.local/Par_file
149+
sed -i "s:^CREATE_VTK_FILES .*:CREATE_VTK_FILES = .false.:" DATA.regional/meshfem3D_files/Mesh_Par_file
150+
sed -i "s:^CREATE_VTK_FILES .*:CREATE_VTK_FILES = .false.:" DATA.local/meshfem3D_files/Mesh_Par_file
151+
fi
142152
# elastic halfspace, no absorbing
143153
if [ "$TESTDIR" == "EXAMPLES/applications/homogeneous_halfspace_HEX8_elastic_no_absorbing/" ]; then
144154
sed -i "s:^NSTEP .*:NSTEP = 600:" DATA/Par_file
@@ -189,7 +199,9 @@ if [ "${GPU}" == "true" ]; then
189199
fi
190200

191201
# save Par_file state
192-
cp -v DATA/Par_file DATA/Par_file.bak
202+
if [ -e DATA/Par_file ]; then
203+
cp -v DATA/Par_file DATA/Par_file.bak
204+
fi
193205

194206
# use kernel script
195207
if [ "${RUN_KERNEL}" == "true" ]; then
@@ -249,7 +261,9 @@ if [ "${RUN_KERNEL}" == "true" ]; then
249261
fi
250262

251263
# restore original Par_file
252-
cp -v DATA/Par_file.bak DATA/Par_file
264+
if [ -e DATA/Par_file.bak ]; then
265+
cp -v DATA/Par_file.bak DATA/Par_file
266+
fi
253267

254268
# cleanup
255269
rm -rf OUTPUT_FILES/

.github/workflows/CI.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,3 +893,26 @@ jobs:
893893
run: ./.github/scripts/run_tests.sh
894894
shell: bash
895895

896+
linuxTest_22:
897+
name: Test 22 - coupling SPECFEM
898+
runs-on: ubuntu-latest
899+
needs: [linuxCheck]
900+
901+
steps:
902+
- uses: actions/checkout@v4
903+
904+
- name: Install packages
905+
run: ./.github/scripts/run_install.sh
906+
shell: bash
907+
908+
- name: Run build
909+
env:
910+
TESTFLAGS: --with-mpi --enable-vectorization
911+
run: ./.github/scripts/run_build.sh
912+
shell: bash
913+
914+
- name: Run test
915+
env:
916+
TESTDIR: EXAMPLES/applications/small_example_coupling_SPECFEM_specfem/
917+
run: ./.github/scripts/run_tests.sh
918+
shell: bash

.travis/run_tests.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,12 @@ elif [ "$TESTID" == "14" ]; then
101101
./run_this_example.sh
102102
else
103103
# default setup
104-
# limit time steps for testing
105-
sed -i "s:^NSTEP .*:NSTEP = 200:" DATA/Par_file
106-
# shortens output interval to avoid timeouts
107-
sed -i "s:^NTSTEP_BETWEEN_OUTPUT_INFO .*:NTSTEP_BETWEEN_OUTPUT_INFO = 50:" DATA/Par_file
104+
if [ -e DATA/Par_file ]; then
105+
# limit time steps for testing
106+
sed -i "s:^NSTEP .*:NSTEP = 200:" DATA/Par_file
107+
# shortens output interval to avoid timeouts
108+
sed -i "s:^NTSTEP_BETWEEN_OUTPUT_INFO .*:NTSTEP_BETWEEN_OUTPUT_INFO = 50:" DATA/Par_file
109+
fi
108110

109111
# more specific directory setups
110112
# acoustic examples

EXAMPLES/applications/homogeneous_acoustic/REF_KERNEL/output_generate_databases.txt

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Surface shape functions defined by NGNOD2D = 4 control nodes
2222
Beware! Curvature (i.e. HEX27 elements) is not handled by our internal mesher
2323

24-
velocity model: default
24+
velocity model: default
2525

2626

2727
suppressing UTM projection
@@ -46,7 +46,7 @@
4646
defined materials : 1
4747
undefined materials : 0
4848
total number of spectral elements: 20736
49-
absorbing boundaries:
49+
absorbing boundaries:
5050
xmin,xmax : 576 576
5151
ymin,ymax : 576 576
5252
bottom,top: 1296 1296
@@ -60,14 +60,14 @@
6060

6161
create regions:
6262

63-
...allocating arrays
63+
...allocating arrays
6464
NGLLX = 5
6565
NGLLY = 5
6666
NGLLZ = 5
6767
NGNOD = 8
6868
NGNOD2D = 4
6969

70-
main process setup:
70+
main process setup:
7171
nspec = 5136
7272

7373
separating regular/irregular element shapes
@@ -84,16 +84,16 @@
8484
File DATA/Par_file_faults not found: assuming that there are no faults
8585

8686

87-
...setting up jacobian
87+
...setting up jacobian
8888

8989
...indexing global points
90-
creating ibool indexing : x min/max = 0.00000000 / 134000.000
90+
creating ibool indexing : x min/max = 0.00000000 / 134000.000
9191
creating indirect addressing: nglob = 343525
9292
creating unique point locations
9393

94-
...preparing MPI interfaces
94+
...preparing MPI interfaces
9595
number of interfaces : 2
96-
creating MPI indexing : x min/max = 0.00000000 / 134000.000
96+
creating MPI indexing : x min/max = 0.00000000 / 134000.000
9797
tolerance = 1.3400000000000000E-005
9898

9999
total MPI interface points: 42770
@@ -124,7 +124,7 @@
124124
90 % time remaining: 2.2891237377624420E-008 s
125125
100 % time remaining: 2.6291509789120710E-010 s
126126

127-
...detecting acoustic-elastic-poroelastic surfaces
127+
...detecting acoustic-elastic-poroelastic surfaces
128128
total acoustic elements : 20736
129129
total elastic elements : 0
130130
total poroelastic elements: 0
@@ -134,21 +134,21 @@
134134
elastic - poroelastic coupling : total number of faces = 0
135135

136136

137-
...element inner/outer separation
137+
...element inner/outer separation
138138
for overlapping of communications with calculations:
139139
percentage of edge elements 11.2149506 %
140140
percentage of volume elements 88.7850494 %
141141

142142

143-
...element mesh coloring
143+
...element mesh coloring
144144
use coloring = F
145145

146-
...external binary models
147-
no external binary model used
146+
...external binary models
147+
no external binary model used
148148

149-
...creating mass matrix
149+
...creating mass matrix
150150

151-
...setting up mesh adjacency
151+
...setting up mesh adjacency
152152

153153
mesh adjacency:
154154
total number of elements in this slice = 5136
@@ -174,7 +174,7 @@
174174
(maximum neighbor of neighbors) = 98
175175
total number of neighbors = 512346
176176

177-
Elapsed time for detection of neighbors in seconds = 0.133644789
177+
Elapsed time for detection of neighbors in seconds = 0.133644789
178178

179179

180180
...saving mesh databases
@@ -209,38 +209,38 @@
209209

210210

211211
********
212-
Model: P velocity min,max = 2800.00000 2800.00000
213-
Model: S velocity min,max = 0.00000000 0.00000000
212+
Model: P velocity min,max = 2800.00000 2800.00000
213+
Model: S velocity min,max = 0.00000000 0.00000000
214214

215-
Model: Poisson's ratio min,max = 0.500000000 0.500000000
215+
Model: Poisson's ratio min,max = 0.500000000 0.500000000
216216
********
217217

218218
*********************************************
219219
*** Verification of simulation parameters ***
220220
*********************************************
221221

222-
*** Xmin and Xmax of the model = 0.00000000 134000.000
223-
*** Ymin and Ymax of the model = 0.00000000 134000.000
224-
*** Zmin and Zmax of the model = -60000.0000 0.00000000
222+
*** Xmin and Xmax of the model = 0.00000000 134000.000
223+
*** Ymin and Ymax of the model = 0.00000000 134000.000
224+
*** Zmin and Zmax of the model = -60000.0000 0.00000000
225225

226-
*** Max GLL point distance = 1227.47656
227-
*** Min GLL point distance = 642.726562
228-
*** Max/min ratio = 1.90979588
226+
*** Max GLL point distance = 1227.47656
227+
*** Min GLL point distance = 642.726562
228+
*** Max/min ratio = 1.90979588
229229

230-
*** Max element size = 3750.00000
231-
*** Min element size = 3722.21875
232-
*** Max/min ratio = 1.00746357
230+
*** Max element size = 3750.00000
231+
*** Min element size = 3722.21875
232+
*** Max/min ratio = 1.00746357
233233

234-
*** Minimum period resolved = 1.67410719
235-
*** Maximum suggested time step = 0.109999999
234+
*** Minimum period resolved = 1.67410719
235+
*** Maximum suggested time step = 0.109999999
236236

237237
Elapsed time for checking mesh resolution in seconds = 1.2908709000001295E-002
238238
saving VTK files for Courant number and minimum period
239239

240240

241241
mesh regions done
242242

243-
min and max of elevation (i.e. height of the upper surface of the mesh) included in mesh in m is 0.0000000000000000 0.0000000000000000
243+
min and max of elevation (i.e. height of the upper surface of the mesh) included in mesh in m is 0.0000000000000000 0.0000000000000000
244244

245245

246246
done mesh setup
@@ -277,7 +277,7 @@
277277
smallest and largest possible floating-point numbers are: 1.17549435E-38 3.40282347E+38
278278

279279

280-
Elapsed time for mesh generation and buffer creation in seconds = 15.3367910
280+
Elapsed time for mesh generation and buffer creation in seconds = 15.3367910
281281
Elapsed time for mesh generation and buffer creation in hh:mm:ss = 0 h 00 m 15 s
282282

283283
End of mesh generation

0 commit comments

Comments
 (0)