[cig-commits] [commit] devel: Use addressing to find regular grid slices. (433edf7)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Apr 30 16:39:58 PDT 2014
Repository : ssh://geoshell/specfem3d_globe
On branch : devel
Link : https://github.com/geodynamics/specfem3d_globe/compare/811ae11b80604736d2845c4e5a062755069fc9a6...fedf291c8257de6ffc3151362afcb814578beb7e
>---------------------------------------------------------------
commit 433edf748583064054667f860bf976116e33181d
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date: Wed Apr 30 18:59:09 2014 -0400
Use addressing to find regular grid slices.
This probably works out the same as calculating it, but it's
future-proof if the mesher decides to do things differently.
>---------------------------------------------------------------
433edf748583064054667f860bf976116e33181d
src/specfem3D/locate_regular_points.f90 | 4 ++--
src/specfem3D/read_mesh_databases.F90 | 1 -
src/specfem3D/specfem3D_par.F90 | 1 +
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/specfem3D/locate_regular_points.f90 b/src/specfem3D/locate_regular_points.f90
index e1db12e..aa50b6e 100644
--- a/src/specfem3D/locate_regular_points.f90
+++ b/src/specfem3D/locate_regular_points.f90
@@ -94,7 +94,7 @@
subroutine find_regular_grid_slice_number(slice_number, GRID)
use constants
- use specfem_par, only: myrank, &
+ use specfem_par, only: myrank, addressing, &
NCHUNKS_VAL, NPROC_XI_VAL, NPROC_ETA_VAL
implicit none
@@ -151,7 +151,7 @@
xi1 = xi_isp / xi_width * 2; eta1 = eta_isp / eta_width * 2
iproc_xi = floor((xi1+1)/2 * nproc)
iproc_eta = floor((eta1+1)/2 * nproc)
- slice_number(isp) = nproc * nproc * (chunk_isp-1) + nproc * iproc_eta + iproc_xi
+ slice_number(isp) = addressing(chunk_isp, iproc_xi, iproc_eta)
enddo
end subroutine find_regular_grid_slice_number
diff --git a/src/specfem3D/read_mesh_databases.F90 b/src/specfem3D/read_mesh_databases.F90
index d02af74..dfef7e2 100644
--- a/src/specfem3D/read_mesh_databases.F90
+++ b/src/specfem3D/read_mesh_databases.F90
@@ -783,7 +783,6 @@
implicit none
! local parameters
- integer, dimension(NCHUNKS_VAL,0:NPROC_XI_VAL-1,0:NPROC_ETA_VAL-1) :: addressing
integer, dimension(0:NPROCTOT_VAL-1) :: ichunk_slice,iproc_xi_slice,iproc_eta_slice
integer :: ier,iproc,iproc_read,iproc_xi,iproc_eta
diff --git a/src/specfem3D/specfem3D_par.F90 b/src/specfem3D/specfem3D_par.F90
index 6aa9b6c..89c61bf 100644
--- a/src/specfem3D/specfem3D_par.F90
+++ b/src/specfem3D/specfem3D_par.F90
@@ -216,6 +216,7 @@ module specfem_par
! proc numbers for MPI
integer :: myrank
integer :: ichunk ! needed for Stacey boundaries
+ integer, dimension(NCHUNKS_VAL,0:NPROC_XI_VAL-1,0:NPROC_ETA_VAL-1) :: addressing
! time loop timing
double precision :: time_start
More information about the CIG-COMMITS
mailing list