[cig-commits] [commit] devel: Round chunk_map output to the nearest EPS. (eeeeb36)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Apr 30 16:39:56 PDT 2014


Repository : ssh://geoshell/specfem3d_globe

On branch  : devel
Link       : https://github.com/geodynamics/specfem3d_globe/compare/811ae11b80604736d2845c4e5a062755069fc9a6...fedf291c8257de6ffc3151362afcb814578beb7e

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

commit eeeeb3632af038ea91a670ad366f55f17413d038
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date:   Wed Apr 30 18:34:09 2014 -0400

    Round chunk_map output to the nearest EPS.
    
    Because of the increased precision of using the existing degrees/radians
    conversion constants, the results of chunk_map are slightly different.
    By rounding to the nearest EPS, we're able to get just the right results
    for xi and eta and the chunks. I'm not satisfied this is the correct
    fix, but at least it seems to work the way it used to.


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

eeeeb3632af038ea91a670ad366f55f17413d038
 src/specfem3D/locate_regular_points.f90 | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/specfem3D/locate_regular_points.f90 b/src/specfem3D/locate_regular_points.f90
index da322ee..e1db12e 100644
--- a/src/specfem3D/locate_regular_points.f90
+++ b/src/specfem3D/locate_regular_points.f90
@@ -165,7 +165,7 @@
                                    hxir_reg,hetar_reg,hgammar_reg)
 
   use constants_solver
-  use specfem_par, only: NEX_XI
+  use specfem_par, only: myrank, NEX_XI
 
   implicit none
 
@@ -288,9 +288,13 @@
           enddo
         enddo
       enddo
-
     enddo
-    if (.not. locate_target) stop 'error in point_source() array'
+
+    if (.not. locate_target) then
+      print *, 'Looking for point', isp, ilayer, ilat, ilon, lat, lon, &
+               x_target, y_target, z_target, myrank
+      call exit_MPI(myrank, 'error in point_source() array')
+    endif
 
     xi = xigll(ix_in)
     eta = yigll(iy_in)
@@ -497,5 +501,7 @@
      stop 'chunk number k < 6'
   endif
 
+  xi = EPS * nint(xi / EPS)
+  eta = EPS * nint(eta / EPS)
   end subroutine chunk_map
 



More information about the CIG-COMMITS mailing list