Skip to content

Commit

Permalink
Merge pull request #1777 from danielpeter/devel
Browse files Browse the repository at this point in the history
adds coupling with wavefield injection from a SPECFEM simulation; adds Vs30 routines; updates setup scripts
  • Loading branch information
danielpeter authored Dec 20, 2024
2 parents 725321e + cfc5cfd commit 0fb684c
Show file tree
Hide file tree
Showing 86 changed files with 99,357 additions and 795 deletions.
26 changes: 20 additions & 6 deletions .github/scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@ my_kernel_test(){
cd $dir

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

# limit time steps for specific examples
# simple mesh example
Expand Down Expand Up @@ -139,6 +141,14 @@ fi
if [ "$TESTDIR" == "EXAMPLES/applications/small_example_coupling_FK_specfem/" ]; then
sed -i "s:^NSTEP .*:NSTEP = 1000:" DATA/Par_file
fi
# coupling SPECFEM
if [ "$TESTDIR" == "EXAMPLES/applications/small_example_coupling_SPECFEM_specfem/" ]; then
# turning off mesh output to avoid using too much memory on the test nodes
sed -i "s:^SAVE_MESH_FILES .*:SAVE_MESH_FILES = .false.:" DATA.regional/Par_file
sed -i "s:^SAVE_MESH_FILES .*:SAVE_MESH_FILES = .false.:" DATA.local/Par_file
sed -i "s:^CREATE_VTK_FILES .*:CREATE_VTK_FILES = .false.:" DATA.regional/meshfem3D_files/Mesh_Par_file
sed -i "s:^CREATE_VTK_FILES .*:CREATE_VTK_FILES = .false.:" DATA.local/meshfem3D_files/Mesh_Par_file
fi
# elastic halfspace, no absorbing
if [ "$TESTDIR" == "EXAMPLES/applications/homogeneous_halfspace_HEX8_elastic_no_absorbing/" ]; then
sed -i "s:^NSTEP .*:NSTEP = 600:" DATA/Par_file
Expand Down Expand Up @@ -189,7 +199,9 @@ if [ "${GPU}" == "true" ]; then
fi

# save Par_file state
cp -v DATA/Par_file DATA/Par_file.bak
if [ -e DATA/Par_file ]; then
cp -v DATA/Par_file DATA/Par_file.bak
fi

# use kernel script
if [ "${RUN_KERNEL}" == "true" ]; then
Expand Down Expand Up @@ -249,7 +261,9 @@ if [ "${RUN_KERNEL}" == "true" ]; then
fi

# restore original Par_file
cp -v DATA/Par_file.bak DATA/Par_file
if [ -e DATA/Par_file.bak ]; then
cp -v DATA/Par_file.bak DATA/Par_file
fi

# cleanup
rm -rf OUTPUT_FILES/
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -893,3 +893,26 @@ jobs:
run: ./.github/scripts/run_tests.sh
shell: bash

linuxTest_22:
name: Test 22 - coupling SPECFEM
runs-on: ubuntu-latest
needs: [linuxCheck]

steps:
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
shell: bash

- name: Run build
env:
TESTFLAGS: --with-mpi --enable-vectorization
run: ./.github/scripts/run_build.sh
shell: bash

- name: Run test
env:
TESTDIR: EXAMPLES/applications/small_example_coupling_SPECFEM_specfem/
run: ./.github/scripts/run_tests.sh
shell: bash
10 changes: 6 additions & 4 deletions .travis/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ elif [ "$TESTID" == "14" ]; then
./run_this_example.sh
else
# default setup
# limit time steps for testing
sed -i "s:^NSTEP .*:NSTEP = 200:" DATA/Par_file
# shortens output interval to avoid timeouts
sed -i "s:^NTSTEP_BETWEEN_OUTPUT_INFO .*:NTSTEP_BETWEEN_OUTPUT_INFO = 50:" DATA/Par_file
if [ -e DATA/Par_file ]; then
# limit time steps for testing
sed -i "s:^NSTEP .*:NSTEP = 200:" DATA/Par_file
# shortens output interval to avoid timeouts
sed -i "s:^NTSTEP_BETWEEN_OUTPUT_INFO .*:NTSTEP_BETWEEN_OUTPUT_INFO = 50:" DATA/Par_file
fi

# more specific directory setups
# acoustic examples
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Surface shape functions defined by NGNOD2D = 4 control nodes
Beware! Curvature (i.e. HEX27 elements) is not handled by our internal mesher

velocity model: default
velocity model: default


suppressing UTM projection
Expand All @@ -46,7 +46,7 @@
defined materials : 1
undefined materials : 0
total number of spectral elements: 20736
absorbing boundaries:
absorbing boundaries:
xmin,xmax : 576 576
ymin,ymax : 576 576
bottom,top: 1296 1296
Expand All @@ -60,14 +60,14 @@

create regions:

...allocating arrays
...allocating arrays
NGLLX = 5
NGLLY = 5
NGLLZ = 5
NGNOD = 8
NGNOD2D = 4

main process setup:
main process setup:
nspec = 5136

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


...setting up jacobian
...setting up jacobian

...indexing global points
creating ibool indexing : x min/max = 0.00000000 / 134000.000
creating ibool indexing : x min/max = 0.00000000 / 134000.000
creating indirect addressing: nglob = 343525
creating unique point locations

...preparing MPI interfaces
...preparing MPI interfaces
number of interfaces : 2
creating MPI indexing : x min/max = 0.00000000 / 134000.000
creating MPI indexing : x min/max = 0.00000000 / 134000.000
tolerance = 1.3400000000000000E-005

total MPI interface points: 42770
Expand Down Expand Up @@ -124,7 +124,7 @@
90 % time remaining: 2.2891237377624420E-008 s
100 % time remaining: 2.6291509789120710E-010 s

...detecting acoustic-elastic-poroelastic surfaces
...detecting acoustic-elastic-poroelastic surfaces
total acoustic elements : 20736
total elastic elements : 0
total poroelastic elements: 0
Expand All @@ -134,21 +134,21 @@
elastic - poroelastic coupling : total number of faces = 0


...element inner/outer separation
...element inner/outer separation
for overlapping of communications with calculations:
percentage of edge elements 11.2149506 %
percentage of volume elements 88.7850494 %


...element mesh coloring
...element mesh coloring
use coloring = F

...external binary models
no external binary model used
...external binary models
no external binary model used

...creating mass matrix
...creating mass matrix

...setting up mesh adjacency
...setting up mesh adjacency

mesh adjacency:
total number of elements in this slice = 5136
Expand All @@ -174,7 +174,7 @@
(maximum neighbor of neighbors) = 98
total number of neighbors = 512346

Elapsed time for detection of neighbors in seconds = 0.133644789
Elapsed time for detection of neighbors in seconds = 0.133644789


...saving mesh databases
Expand Down Expand Up @@ -209,38 +209,38 @@


********
Model: P velocity min,max = 2800.00000 2800.00000
Model: S velocity min,max = 0.00000000 0.00000000
Model: P velocity min,max = 2800.00000 2800.00000
Model: S velocity min,max = 0.00000000 0.00000000

Model: Poisson's ratio min,max = 0.500000000 0.500000000
Model: Poisson's ratio min,max = 0.500000000 0.500000000
********

*********************************************
*** Verification of simulation parameters ***
*********************************************

*** Xmin and Xmax of the model = 0.00000000 134000.000
*** Ymin and Ymax of the model = 0.00000000 134000.000
*** Zmin and Zmax of the model = -60000.0000 0.00000000
*** Xmin and Xmax of the model = 0.00000000 134000.000
*** Ymin and Ymax of the model = 0.00000000 134000.000
*** Zmin and Zmax of the model = -60000.0000 0.00000000

*** Max GLL point distance = 1227.47656
*** Min GLL point distance = 642.726562
*** Max/min ratio = 1.90979588
*** Max GLL point distance = 1227.47656
*** Min GLL point distance = 642.726562
*** Max/min ratio = 1.90979588

*** Max element size = 3750.00000
*** Min element size = 3722.21875
*** Max/min ratio = 1.00746357
*** Max element size = 3750.00000
*** Min element size = 3722.21875
*** Max/min ratio = 1.00746357

*** Minimum period resolved = 1.67410719
*** Maximum suggested time step = 0.109999999
*** Minimum period resolved = 1.67410719
*** Maximum suggested time step = 0.109999999

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


mesh regions done

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
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


done mesh setup
Expand Down Expand Up @@ -277,7 +277,7 @@
smallest and largest possible floating-point numbers are: 1.17549435E-38 3.40282347E+38


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

End of mesh generation
Expand Down
Loading

0 comments on commit 0fb684c

Please sign in to comment.