[cig-commits] [commit] devel: done implementing support for acoustic elements in periodic boundary conditions (52aa46b)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri Feb 21 18:03:12 PST 2014


Repository : ssh://geoshell/specfem2d

On branch  : devel
Link       : https://github.com/geodynamics/specfem2d/compare/29e6a861fa08a0b2474bb461f4e1ca2cfd500fb5...e8507f712e9eeec3d149e9599496a4b177de657b

>---------------------------------------------------------------

commit 52aa46b800165566b18c7cf78b915c04a72f23aa
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date:   Sat Feb 22 03:01:31 2014 +0100

    done implementing support for acoustic elements in periodic boundary conditions


>---------------------------------------------------------------

52aa46b800165566b18c7cf78b915c04a72f23aa
 DATA/Par_file                |  2 +-
 src/specfem2D/get_global.f90 |  1 +
 src/specfem2D/specfem2D.F90  | 16 +---------------
 3 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/DATA/Par_file b/DATA/Par_file
index 2188636..62fc2fc 100644
--- a/DATA/Par_file
+++ b/DATA/Par_file
@@ -137,7 +137,7 @@ ADD_SPRING_TO_STACEY            = .false.
 ADD_PERIODIC_CONDITIONS         = .false.
 
 # horizontal periodicity distance for periodic conditions
-PERIODIC_HORIZ_DIST             = 0.3597d0
+PERIODIC_HORIZ_DIST             = 4000.d0 # 0.3597d0
 
 #-----------------------------------------------------------------------------
 # PARAMETERS FOR EXTERNAL MESHING
diff --git a/src/specfem2D/get_global.f90 b/src/specfem2D/get_global.f90
index 85ef409..963ee8d 100644
--- a/src/specfem2D/get_global.f90
+++ b/src/specfem2D/get_global.f90
@@ -59,6 +59,7 @@
 
   ! initializes temporary arrays
   integer_mask_ibool(:) = -1
+  copy_ibool_ori(:,:,:) = ibool(:,:,:)
 
   inumber = 0
 
diff --git a/src/specfem2D/specfem2D.F90 b/src/specfem2D/specfem2D.F90
index 7cb79b6..19ee03b 100644
--- a/src/specfem2D/specfem2D.F90
+++ b/src/specfem2D/specfem2D.F90
@@ -900,7 +900,7 @@
 
 ! for horizontal periodic conditions
   logical :: ADD_PERIODIC_CONDITIONS
-  logical, dimension(:), allocatable :: this_ibool_is_a_periodic_edge,copy_this_ibool_is_a_periodic
+  logical, dimension(:), allocatable :: this_ibool_is_a_periodic_edge
 
 ! horizontal periodicity distance for periodic conditions
   double precision :: PERIODIC_HORIZ_DIST
@@ -1739,7 +1739,6 @@
 
     ! reduce cache misses by sorting the global numbering in the order in which it is accessed in the time loop.
     ! this speeds up the calculations significantly on modern processors
-    copy_ibool_ori(:,:,:) = ibool(:,:,:)
     call get_global(nspec,nglob,ibool,copy_ibool_ori,integer_mask_ibool)
 
 !---- compute shape functions and their derivatives for regular interpolated display grid
@@ -1964,7 +1963,6 @@
 
 ! allocate an array to make sure that an acoustic free surface is not enforced on periodic edges
   allocate(this_ibool_is_a_periodic_edge(NGLOB))
-  allocate(copy_this_ibool_is_a_periodic(NGLOB))
 
 ! set up a local geometric tolerance
 
@@ -2043,18 +2041,6 @@
 
       if(counter > 0) write(IOUT,*) 'implemented periodic conditions on ',counter,' grid points on proc ',myrank
 
-      ! put the periodic edge flag in the new ibool order
-      copy_this_ibool_is_a_periodic(:) = this_ibool_is_a_periodic_edge(:)
-      this_ibool_is_a_periodic_edge(:) = .false.
-      do ispec = 1,nspec
-        do j = 1,NGLLZ
-          do i = 1,NGLLX
-            ! if this point is on a periodic edge in the old numbering system, set the flag in the new numbering system
-            if(copy_this_ibool_is_a_periodic(copy_ibool_ori(i,j,ispec))) this_ibool_is_a_periodic_edge(ibool(i,j,ispec)) = .true.
-          enddo
-        enddo
-      enddo
-
     else
 
       ! dummy allocation just to be able to use this array as a subroutine argument later



More information about the CIG-COMMITS mailing list