[cig-commits] [commit] devel: Coupling with DSM (64e54da)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Aug 1 10:05:34 PDT 2014
Repository : https://github.com/geodynamics/specfem3d
On branch : devel
Link : https://github.com/geodynamics/specfem3d/compare/8a3f14d7d473f70feb7f073639045daa35c587bc...d759e09dd946c593868753fbb4253d77378fb276
>---------------------------------------------------------------
commit 64e54dae9d10e95555b6007cb586e821350315e6
Author: Clément Durochat <c.durochat at gmail.com>
Date: Wed Jun 18 17:35:52 2014 +0200
Coupling with DSM
>---------------------------------------------------------------
64e54dae9d10e95555b6007cb586e821350315e6
setup/constants.h.in | 11 ++++
src/generate_databases/get_absorbing_boundary.f90 | 77 +++++++++++++++++++++++
2 files changed, 88 insertions(+)
diff --git a/setup/constants.h.in b/setup/constants.h.in
index a98f322..3c74111 100644
--- a/setup/constants.h.in
+++ b/setup/constants.h.in
@@ -157,6 +157,17 @@
!!-----------------------------------------------------------
!!
+!! Roland_Sylvain gravity calculations
+!!
+!!-----------------------------------------------------------
+
+ !! C. DUROCHAT modification : begin
+ logical, parameter :: COUPLE_WITH_DSM = .false. !!! .true.
+
+ !! C. DUROCHAT modification : end
+
+!!-----------------------------------------------------------
+!!
!! source/receiver setup
!!
!!-----------------------------------------------------------
diff --git a/src/generate_databases/get_absorbing_boundary.f90 b/src/generate_databases/get_absorbing_boundary.f90
index 40b8ba9..fcd997a 100644
--- a/src/generate_databases/get_absorbing_boundary.f90
+++ b/src/generate_databases/get_absorbing_boundary.f90
@@ -81,6 +81,33 @@
real(kind=CUSTOM_REAL),dimension(NGNOD2D_FOUR_CORNERS) :: xcoord,ycoord,zcoord
integer :: ispec,ispec2D,icorner,itop,iabsval,iface,igll,i,j,igllfree,ifree
+ !! C. DUROCHAT modification : begin !! additonal local parameters for coupling with DSM by VM
+
+ logical, dimension(:,:),allocatable :: iboun ! pll
+
+ ! corner locations for faces
+ real(kind=CUSTOM_REAL), dimension(:,:,:),allocatable :: xcoord_iboun,ycoord_iboun,zcoord_iboun
+ character(len=27) namefile
+
+ ! allocate temporary flag array
+ allocate(iboun(6,nspec), &
+ xcoord_iboun(NGNOD2D,6,nspec), &
+ ycoord_iboun(NGNOD2D,6,nspec), &
+ zcoord_iboun(NGNOD2D,6,nspec),stat=ier)
+ if(ier /= 0) call exit_MPI(myrank,'not enough memory to allocate arrays')
+
+ ! sets flag in array iboun for elements with an absorbing boundary faces
+ if(COUPLE_WITH_DSM) then
+
+ iboun(:,:) = .false.
+
+ write(namefile,'(a17,i6.6,a4)') 'xmin_gll_for_dsm_',myrank,'.txt'
+ open(123,file=namefile)
+ write(123,*) nspec2D_xmin
+ endif
+
+ !! C. DUROCHAT modification : end
+
! abs face counter
iabsval = 0
@@ -106,6 +133,12 @@
xstore_dummy,ystore_dummy,zstore_dummy, &
iface)
+ !! C. DUROCHAT modification : begin !! for coupling with DSM by VM
+ if(COUPLE_WITH_DSM) then
+ iboun(iface,ispec) = .true.
+ endif
+ !! C. DUROCHAT modification : end
+
! ijk indices of GLL points for face id
call get_element_face_gll_indices(iface,ijk_face,NGLLX,NGLLZ)
@@ -126,6 +159,14 @@
xstore_dummy,ystore_dummy,zstore_dummy, &
lnormal )
normal_face(:,i,j) = lnormal(:)
+
+ !! C. DUROCHAT modification : begin !! for coupling with DSM by VM
+ if(COUPLE_WITH_DSM) then
+ write(123,'(i10,3f20.10)') ispec,xstore_dummy(ibool(i,j,1,ispec)),&
+ ystore_dummy(ibool(i,j,1,ispec)),zstore_dummy(ibool(i,j,1,ispec))
+ endif
+ !! C. DUROCHAT modification : end
+
enddo
enddo
@@ -146,6 +187,12 @@
enddo ! nspec2D_xmin
+ !! C. DUROCHAT modification : begin !! for coupling with DSM by VM
+ if(COUPLE_WITH_DSM) then
+ close(123)
+ endif
+ !! C. DUROCHAT modification : end
+
! xmax
ijk_face(:,:,:) = 0
normal_face(:,:,:) = 0.0_CUSTOM_REAL
@@ -168,6 +215,12 @@
xstore_dummy,ystore_dummy,zstore_dummy, &
iface )
+ !! C. DUROCHAT modification : begin !! for coupling with DSM by VM
+ if(COUPLE_WITH_DSM) then
+ iboun(iface,ispec) = .true.
+ endif
+ !! C. DUROCHAT modification : end
+
! ijk indices of GLL points on face
call get_element_face_gll_indices(iface,ijk_face,NGLLX,NGLLZ)
@@ -230,6 +283,12 @@
xstore_dummy,ystore_dummy,zstore_dummy, &
iface )
+ !! C. DUROCHAT modification : begin !! for coupling with DSM by VM
+ if(COUPLE_WITH_DSM) then
+ iboun(iface,ispec) = .true.
+ endif
+ !! C. DUROCHAT modification : end
+
! ijk indices of GLL points on face
call get_element_face_gll_indices(iface,ijk_face,NGLLY,NGLLZ)
@@ -292,6 +351,12 @@
xstore_dummy,ystore_dummy,zstore_dummy, &
iface )
+ !! C. DUROCHAT modification : begin !! for coupling with DSM by VM
+ if(COUPLE_WITH_DSM) then
+ iboun(iface,ispec) = .true.
+ endif
+ !! C. DUROCHAT modification : end
+
! ijk indices of GLL points on face
call get_element_face_gll_indices(iface,ijk_face,NGLLY,NGLLZ)
@@ -354,6 +419,12 @@
xstore_dummy,ystore_dummy,zstore_dummy, &
iface )
+ !! C. DUROCHAT modification : begin !! for coupling with DSM by VM
+ if(COUPLE_WITH_DSM) then
+ iboun(iface,ispec) = .true.
+ endif
+ !! C. DUROCHAT modification : end
+
! ijk indices of GLL points on face
call get_element_face_gll_indices(iface,ijk_face,NGLLX,NGLLY)
@@ -419,6 +490,12 @@
xstore_dummy,ystore_dummy,zstore_dummy, &
iface )
+ !! C. DUROCHAT modification : begin !! for coupling with DSM by VM
+ if(COUPLE_WITH_DSM) then
+ iboun(iface,ispec) = .true.
+ endif
+ !! C. DUROCHAT modification : end
+
! ijk indices of GLL points on face
call get_element_face_gll_indices(iface,ijk_face,NGLLX,NGLLY)
More information about the CIG-COMMITS
mailing list