[cig-commits] [commit] devel: Updated for coupling with DSM (b513776)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Aug 1 10:05:59 PDT 2014
Repository : https://github.com/geodynamics/specfem3d
On branch : devel
Link : https://github.com/geodynamics/specfem3d/compare/8a3f14d7d473f70feb7f073639045daa35c587bc...d759e09dd946c593868753fbb4253d77378fb276
>---------------------------------------------------------------
commit b51377691e1d76df2bf1da449694f1122d4f945e
Author: Clément Durochat <c.durochat at gmail.com>
Date: Thu Jun 19 16:10:23 2014 +0200
Updated for coupling with DSM
>---------------------------------------------------------------
b51377691e1d76df2bf1da449694f1122d4f945e
...compute_forces_viscoelastic_calling_routine.F90 | 22 +++++++++++++---------
src/specfem3D/compute_stacey_viscoelastic.f90 | 18 ++++++++++++++----
2 files changed, 27 insertions(+), 13 deletions(-)
diff --git a/src/specfem3D/compute_forces_viscoelastic_calling_routine.F90 b/src/specfem3D/compute_forces_viscoelastic_calling_routine.F90
index 5c3a165..059376c 100644
--- a/src/specfem3D/compute_forces_viscoelastic_calling_routine.F90
+++ b/src/specfem3D/compute_forces_viscoelastic_calling_routine.F90
@@ -170,15 +170,19 @@ subroutine compute_forces_viscoelastic()
ispec_is_inner,phase_is_inner)
endif
-! adds source term (single-force/moment-tensor solution)
- call compute_add_sources_viscoelastic( NSPEC_AB,NGLOB_AB,accel, &
- ibool,ispec_is_inner,phase_is_inner, &
- NSOURCES,myrank,it,islice_selected_source,ispec_selected_source,&
- hdur,hdur_gaussian,tshift_src,dt,t0,sourcearrays, &
- ispec_is_elastic,SIMULATION_TYPE,NSTEP, &
- nrec,islice_selected_rec,ispec_selected_rec, &
- nadj_rec_local,adj_sourcearrays, &
- NTSTEP_BETWEEN_READ_ADJSRC,NOISE_TOMOGRAPHY)
+ !! C. DUROCHAT modification : begin !! For coupling with DSM by VM
+ if(.not. COUPLE_WITH_DSM) then
+ ! adds source term (single-force/moment-tensor solution)
+ call compute_add_sources_viscoelastic(NSPEC_AB,NGLOB_AB,accel, &
+ ibool,ispec_is_inner,phase_is_inner, &
+ NSOURCES,myrank,it,islice_selected_source,ispec_selected_source,&
+ hdur,hdur_gaussian,tshift_src,dt,t0,sourcearrays, &
+ ispec_is_elastic,SIMULATION_TYPE,NSTEP, &
+ nrec,islice_selected_rec,ispec_selected_rec, &
+ nadj_rec_local,adj_sourcearrays, &
+ NTSTEP_BETWEEN_READ_ADJSRC,NOISE_TOMOGRAPHY)
+ endif
+ !! C. DUROCHAT modification : end
! assemble all the contributions between slices using MPI
if( phase_is_inner .eqv. .false. ) then
diff --git a/src/specfem3D/compute_stacey_viscoelastic.f90 b/src/specfem3D/compute_stacey_viscoelastic.f90
index 9f4109d..ed85981 100644
--- a/src/specfem3D/compute_stacey_viscoelastic.f90
+++ b/src/specfem3D/compute_stacey_viscoelastic.f90
@@ -79,13 +79,15 @@
real(kind=CUSTOM_REAL) vx,vy,vz,nx,ny,nz,tx,ty,tz,vn,jacobianw
integer :: ispec,iglob,i,j,k,iface,igll
-! for new method
+ !! C. DUROCHAT modification : begin !! For coupling with DSM by VM
+
+ ! See also DSM parameters in setup/constants.h.in
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)
@@ -93,6 +95,8 @@
endif
endif
+ !! C. DUROCHAT modification : end
+
! checks if anything to do
if( num_abs_boundary_faces == 0 ) return
@@ -118,11 +122,15 @@
vx=veloc(1,iglob)
vy=veloc(2,iglob)
vz=veloc(3,iglob)
- if (OLD_TEST_TO_FIX_ONE_DAY) then
+
+ !! C. DUROCHAT modification : begin !! For coupling with DSM by VM
+ if (COUPLE_WITH_DSM) then
vx = vx - Veloc_dsm_boundary(1,it_dsm,igll,iface)
vy = vy - Veloc_dsm_boundary(2,it_dsm,igll,iface)
vz = vz - Veloc_dsm_boundary(3,it_dsm,igll,iface)
endif
+ !! C. DUROCHAT modification : end
+
! gets associated normal
nx = abs_boundary_normal(1,igll,iface)
ny = abs_boundary_normal(2,igll,iface)
@@ -136,11 +144,13 @@
ty = rho_vp(i,j,k,ispec)*vn*ny + rho_vs(i,j,k,ispec)*(vy-vn*ny)
tz = rho_vp(i,j,k,ispec)*vn*nz + rho_vs(i,j,k,ispec)*(vz-vn*nz)
- if (OLD_TEST_TO_FIX_ONE_DAY) then
+ !! C. DUROCHAT modification : begin !! For coupling with DSM by VM
+ if (COUPLE_WITH_DSM) then
tx = tx -Tract_dsm_boundary(1,it_dsm,igll,iface)
ty = ty -Tract_dsm_boundary(2,it_dsm,igll,iface)
tz = tz -Tract_dsm_boundary(3,it_dsm,igll,iface)
endif
+ !! C. DUROCHAT modification : end
! gets associated, weighted jacobian
jacobianw = abs_boundary_jacobian2Dw(igll,iface)
More information about the CIG-COMMITS
mailing list