[cig-commits] [commit] devel: Update for coupling with DSM (e793f3b)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Aug 1 10:06:14 PDT 2014
Repository : https://github.com/geodynamics/specfem3d
On branch : devel
Link : https://github.com/geodynamics/specfem3d/compare/8a3f14d7d473f70feb7f073639045daa35c587bc...d759e09dd946c593868753fbb4253d77378fb276
>---------------------------------------------------------------
commit e793f3b9ccb8de674c3db11875615a39f9d6f043
Author: Clément Durochat <c.durochat at gmail.com>
Date: Mon Jun 23 16:37:35 2014 +0200
Update for coupling with DSM
>---------------------------------------------------------------
e793f3b9ccb8de674c3db11875615a39f9d6f043
src/specfem3D/compute_add_sources_viscoelastic.f90 | 12 +++++++++---
src/specfem3D/compute_stacey_viscoelastic.f90 | 22 +++++++++++++++++-----
src/specfem3D/prepare_timerun.F90 | 6 +++---
src/specfem3D/read_mesh_databases_adios.F90 | 5 +++--
4 files changed, 32 insertions(+), 13 deletions(-)
diff --git a/src/specfem3D/compute_add_sources_viscoelastic.f90 b/src/specfem3D/compute_add_sources_viscoelastic.f90
index 0b0a25c..c1d2602 100644
--- a/src/specfem3D/compute_add_sources_viscoelastic.f90
+++ b/src/specfem3D/compute_add_sources_viscoelastic.f90
@@ -103,8 +103,10 @@
!equivalence (i2head,i4head,r4head) ! share the same 240-byte-memory
double precision :: hxir(NGLLX),hpxir(NGLLX),hetar(NGLLY),hpetar(NGLLY),hgammar(NGLLZ),hpgammar(NGLLZ)
+ !! CD modif (implemented by VM) : begin !! For coupling with DSM
! some old tests (currently unstable; do not remove them though, we might fix this one day)
- if (OLD_TEST_TO_FIX_ONE_DAY) return
+ if (COUPLE_WITH_DSM) return
+ !! CD modif : end
! plotting source time function
if(PRINT_SOURCE_TIME_FUNCTION .and. .not. phase_is_inner ) then
@@ -446,8 +448,10 @@
real(kind=CUSTOM_REAL) stf_used,stf_used_total_all,time_source
integer :: isource,iglob,i,j,k,ispec
+ !! CD modif (implemented by VM) : begin !! For coupling with DSM
! some old tests (currently unstable; do not remove them though, we might fix this one day)
- if (OLD_TEST_TO_FIX_ONE_DAY) return
+ if (COUPLE_WITH_DSM) return
+ !! CD modif : end
! plotting source time function
if(PRINT_SOURCE_TIME_FUNCTION .and. .not. phase_is_inner ) then
@@ -666,8 +670,10 @@
!equivalence (i2head,i4head,r4head) ! share the same 240-byte-memory
double precision :: hxir(NGLLX),hpxir(NGLLX),hetar(NGLLY),hpetar(NGLLY),hgammar(NGLLZ),hpgammar(NGLLZ)
+ !! CD modif (implemented by VM) : begin !! For coupling with DSM
! some old tests (currently unstable; do not remove them though, we might fix this one day)
- if (OLD_TEST_TO_FIX_ONE_DAY) return
+ if (COUPLE_WITH_DSM) return
+ !! CD modif : end
! plotting source time function
if(PRINT_SOURCE_TIME_FUNCTION .and. .not. phase_is_inner ) then
diff --git a/src/specfem3D/compute_stacey_viscoelastic.f90 b/src/specfem3D/compute_stacey_viscoelastic.f90
index f682f4c..88ad4b0 100644
--- a/src/specfem3D/compute_stacey_viscoelastic.f90
+++ b/src/specfem3D/compute_stacey_viscoelastic.f90
@@ -180,11 +180,13 @@
endif
endif
- if (OLD_TEST_TO_FIX_ONE_DAY) then
+ !! CD modif. : begin (implemented by VM) !! For coupling with DSM
+ if (COUPLE_WITH_DSM) then
if (phase_is_inner .eqv. .true.) then
it_dsm = it_dsm + 1
endif
endif
+ !! CD modif. : end
end subroutine compute_stacey_viscoelastic
!
@@ -274,7 +276,12 @@
end subroutine compute_stacey_viscoelastic_bpwf
-!---------------------------------------------------------------------------------------
+!=============================================================================
+!
+ !! CD modif. : begin (implemented by VM) !! For coupling with DSM
+!
+!-----------------------------------------------------------------------------
+
subroutine read_dsm_file(Veloc_dsm_boundary,Tract_dsm_boundary,num_abs_boundary_faces,it_dsm)
@@ -308,6 +315,7 @@
end subroutine read_dsm_file
+ !! CD modif. : end
!
!=====================================================================
! for elastic solver on GPU
@@ -340,13 +348,13 @@
! GPU_MODE variables
integer(kind=8) :: Mesh_pointer
- ! for new method
+ !! CD modif (implemented by VM) : begin !! For coupling with DSM
real(kind=CUSTOM_REAL) :: Veloc_dsm_boundary(3,Ntime_step_dsm,NGLLSQUARE,num_abs_boundary_faces)
real(kind=CUSTOM_REAL) :: Tract_dsm_boundary(3,Ntime_step_dsm,NGLLSQUARE,num_abs_boundary_faces)
integer :: it_dsm
- if (OLD_TEST_TO_FIX_ONE_DAY) then
+ if (COUPLE_WITH_DSM) then
if (phase_is_inner .eqv. .false.) then
if (mod(it_dsm,Ntime_step_dsm+1) == 0 .or. it == 1) then
call read_dsm_file(Veloc_dsm_boundary,Tract_dsm_boundary,num_abs_boundary_faces,it_dsm)
@@ -354,6 +362,8 @@
endif
endif
+ !! CD modif. : end
+
! checks if anything to do
if( num_abs_boundary_faces == 0 ) return
@@ -376,11 +386,13 @@
endif
endif
- if (OLD_TEST_TO_FIX_ONE_DAY) then
+ !! CD modif. (implemented by VM) : begin !! For coupling with DSM
+ if (COUPLE_WITH_DSM) then
if (phase_is_inner .eqv. .true.) then
it_dsm = it_dsm + 1
endif
endif
+ !! CD modif. : end
end subroutine compute_stacey_viscoelastic_GPU
diff --git a/src/specfem3D/prepare_timerun.F90 b/src/specfem3D/prepare_timerun.F90
index fcb863c..e9ee145 100644
--- a/src/specfem3D/prepare_timerun.F90
+++ b/src/specfem3D/prepare_timerun.F90
@@ -276,9 +276,7 @@
if(ELASTIC_SIMULATION) then
! switches to three-component mass matrix
- !! CD modif. : begin (implemented by VM)
- !! For coupling with DSM : maybe some changes to make here and after
- !! CD modif. : end
+ !! CD modif. : begin
if( STACEY_ABSORBING_CONDITIONS .and. (.not. COUPLE_WITH_DSM) ) then
! adds boundary contributions
@@ -295,6 +293,8 @@
rmassz(:) = rmass(:)
endif
+ !! CD modif. : end
+
! not needed anymore
deallocate(rmass)
diff --git a/src/specfem3D/read_mesh_databases_adios.F90 b/src/specfem3D/read_mesh_databases_adios.F90
index 3c7b0a1..62c07b7 100644
--- a/src/specfem3D/read_mesh_databases_adios.F90
+++ b/src/specfem3D/read_mesh_databases_adios.F90
@@ -853,8 +853,8 @@ subroutine read_mesh_databases_adios()
abs_boundary_normal(NDIM,NGLLSQUARE,num_abs_boundary_faces),stat=ier)
if( ier /= 0 ) stop 'error allocating array abs_boundary_ispec etc.'
- if (OLD_TEST_TO_FIX_ONE_DAY) then
- ! for new method
+ !! CD modif. : begin (implemented by VM) !! For coupling with DSM
+ if (COUPLE_WITH_DSM) then
allocate(Veloc_dsm_boundary(3,Ntime_step_dsm,NGLLSQUARE,num_abs_boundary_faces))
allocate(Tract_dsm_boundary(3,Ntime_step_dsm,NGLLSQUARE,num_abs_boundary_faces))
open(unit=IIN_veloc_dsm,file=dsmname(1:len_trim(dsmname))//'vel.bin',status='old', &
@@ -865,6 +865,7 @@ subroutine read_mesh_databases_adios()
allocate(Veloc_dsm_boundary(1,1,1,1))
allocate(Tract_dsm_boundary(1,1,1,1))
endif
+ !! CD modif. : end
allocate(ibelm_xmin(nspec2D_xmin),ibelm_xmax(nspec2D_xmax), &
ibelm_ymin(nspec2D_ymin),ibelm_ymax(nspec2D_ymax), &
More information about the CIG-COMMITS
mailing list