[cig-commits] r20473 - seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Fri Jul 6 16:42:37 PDT 2012


Author: dkomati1
Date: 2012-07-06 16:42:37 -0700 (Fri, 06 Jul 2012)
New Revision: 20473

Modified:
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/auto_ner.f90
Log:
fixed a warning given by the Cray compiler


Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/auto_ner.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/auto_ner.f90	2012-07-06 21:56:02 UTC (rev 20472)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/auto_ner.f90	2012-07-06 23:42:37 UTC (rev 20473)
@@ -406,17 +406,19 @@
 !
 
   subroutine get_element(points, ispec, npts, pts)
+    implicit none
+    integer :: npts,ispec,istart_left,istart_right
+    integer, parameter :: NBNODE = 8
+    double precision pts(NBNODE+1,2), points(npts,2)
 
-  implicit none
-  integer npts, ispec,istart,iend
-  integer, parameter :: NBNODE = 8
-  double precision pts(NBNODE+1,2), points(npts,2)
+    istart_left = 1
+    istart_right = (ispec-1)*NBNODE + 1
+    do i = 0,NBNODE-1
+      pts(istart_left + i,1) = points(istart_right + i,1)
+      pts(istart_left + i,2) = points(istart_right + i,2)
+    enddo
+    pts(NBNODE+1,:) = pts(1,:)  ! Use first point as the last point
 
-  istart = 1
-  iend = 8
-  pts(istart:iend,:) = points( ( (ispec-1) * NBNODE)+1 : ( (ispec) * NBNODE )+1, : )
-  pts(NBNODE+1,:) = pts(1,:)  ! Use first point as the last point
-
   end subroutine get_element
 
 !



More information about the CIG-COMMITS mailing list