diff --git a/test/pargen/psb_d_pde2d.f90 b/test/pargen/psb_d_pde2d.f90 index a97f2d0a..6dc725f8 100644 --- a/test/pargen/psb_d_pde2d.f90 +++ b/test/pargen/psb_d_pde2d.f90 @@ -401,7 +401,7 @@ contains if (ix == 1) then zt(k) = g(dzero,y)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-2)*idim+iy + call ijk2idx(icol(icoeff),ix-1,iy,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif @@ -410,14 +410,14 @@ contains if (iy == 1) then zt(k) = g(x,dzero)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-1)*idim+(iy-1) + call ijk2idx(icol(icoeff),ix,iy-1,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif ! term depending on (x,y) val(icoeff)=(2*done)*(a1(x,y) + a2(x,y))/sqdeltah + c(x,y) - icol(icoeff) = (ix-1)*idim+iy + call ijk2idx(icol(icoeff),ix,iy,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 ! term depending on (x,y+1) @@ -425,7 +425,7 @@ contains if (iy == idim) then zt(k) = g(x,done)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-1)*idim+(iy+1) + call ijk2idx(icol(icoeff),ix,iy+1,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif @@ -434,7 +434,7 @@ contains if (ix==idim) then zt(k) = g(done,y)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix)*idim+(iy) + call ijk2idx(icol(icoeff),ix+1,iy,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif diff --git a/test/pargen/psb_d_pde3d.f90 b/test/pargen/psb_d_pde3d.f90 index 8896a95a..4eb18893 100644 --- a/test/pargen/psb_d_pde3d.f90 +++ b/test/pargen/psb_d_pde3d.f90 @@ -421,7 +421,7 @@ contains if (ix == 1) then zt(k) = g(dzero,y,z)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-2)*idim*idim+(iy-1)*idim+(iz) + call ijk2idx(icol(icoeff),ix-1,iy,iz,idim,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif @@ -430,7 +430,7 @@ contains if (iy == 1) then zt(k) = g(x,dzero,z)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-1)*idim*idim+(iy-2)*idim+(iz) + call ijk2idx(icol(icoeff),ix,iy-1,iz,idim,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif @@ -439,7 +439,7 @@ contains if (iz == 1) then zt(k) = g(x,y,dzero)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-1)*idim*idim+(iy-1)*idim+(iz-1) + call ijk2idx(icol(icoeff),ix,iy,iz-1,idim,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif @@ -447,7 +447,7 @@ contains ! term depending on (x,y,z) val(icoeff)=(2*done)*(a1(x,y,z)+a2(x,y,z)+a3(x,y,z))/sqdeltah & & + c(x,y,z) - icol(icoeff) = (ix-1)*idim*idim+(iy-1)*idim+(iz) + call ijk2idx(icol(icoeff),ix,iy,iz,idim,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 ! term depending on (x,y,z+1) @@ -455,7 +455,7 @@ contains if (iz == idim) then zt(k) = g(x,y,done)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-1)*idim*idim+(iy-1)*idim+(iz+1) + call ijk2idx(icol(icoeff),ix,iy,iz+1,idim,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif @@ -464,7 +464,7 @@ contains if (iy == idim) then zt(k) = g(x,done,z)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-1)*idim*idim+(iy)*idim+(iz) + call ijk2idx(icol(icoeff),ix,iy+1,iz,idim,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif @@ -473,7 +473,7 @@ contains if (ix==idim) then zt(k) = g(done,y,z)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix)*idim*idim+(iy-1)*idim+(iz) + call ijk2idx(icol(icoeff),ix+1,iy,iz,idim,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif diff --git a/test/pargen/psb_s_pde2d.f90 b/test/pargen/psb_s_pde2d.f90 index 940fd42c..58e11402 100644 --- a/test/pargen/psb_s_pde2d.f90 +++ b/test/pargen/psb_s_pde2d.f90 @@ -401,7 +401,7 @@ contains if (ix == 1) then zt(k) = g(szero,y)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-2)*idim+iy + call ijk2idx(icol(icoeff),ix-1,iy,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif @@ -410,14 +410,14 @@ contains if (iy == 1) then zt(k) = g(x,szero)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-1)*idim+(iy-1) + call ijk2idx(icol(icoeff),ix,iy-1,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif ! term depending on (x,y) val(icoeff)=(2*sone)*(a1(x,y) + a2(x,y))/sqdeltah + c(x,y) - icol(icoeff) = (ix-1)*idim+iy + call ijk2idx(icol(icoeff),ix,iy,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 ! term depending on (x,y+1) @@ -425,7 +425,7 @@ contains if (iy == idim) then zt(k) = g(x,sone)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-1)*idim+(iy+1) + call ijk2idx(icol(icoeff),ix,iy+1,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif @@ -434,7 +434,7 @@ contains if (ix==idim) then zt(k) = g(sone,y)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix)*idim+(iy) + call ijk2idx(icol(icoeff),ix+1,iy,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif diff --git a/test/pargen/psb_s_pde3d.f90 b/test/pargen/psb_s_pde3d.f90 index 23d58e59..3287ef69 100644 --- a/test/pargen/psb_s_pde3d.f90 +++ b/test/pargen/psb_s_pde3d.f90 @@ -421,7 +421,7 @@ contains if (ix == 1) then zt(k) = g(szero,y,z)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-2)*idim*idim+(iy-1)*idim+(iz) + call ijk2idx(icol(icoeff),ix-1,iy,iz,idim,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif @@ -430,7 +430,7 @@ contains if (iy == 1) then zt(k) = g(x,szero,z)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-1)*idim*idim+(iy-2)*idim+(iz) + call ijk2idx(icol(icoeff),ix,iy-1,iz,idim,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif @@ -439,7 +439,7 @@ contains if (iz == 1) then zt(k) = g(x,y,szero)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-1)*idim*idim+(iy-1)*idim+(iz-1) + call ijk2idx(icol(icoeff),ix,iy,iz-1,idim,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif @@ -447,7 +447,7 @@ contains ! term depending on (x,y,z) val(icoeff)=(2*sone)*(a1(x,y,z)+a2(x,y,z)+a3(x,y,z))/sqdeltah & & + c(x,y,z) - icol(icoeff) = (ix-1)*idim*idim+(iy-1)*idim+(iz) + call ijk2idx(icol(icoeff),ix,iy,iz,idim,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 ! term depending on (x,y,z+1) @@ -455,7 +455,7 @@ contains if (iz == idim) then zt(k) = g(x,y,sone)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-1)*idim*idim+(iy-1)*idim+(iz+1) + call ijk2idx(icol(icoeff),ix,iy,iz+1,idim,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif @@ -464,7 +464,7 @@ contains if (iy == idim) then zt(k) = g(x,sone,z)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix-1)*idim*idim+(iy)*idim+(iz) + call ijk2idx(icol(icoeff),ix,iy+1,iz,idim,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif @@ -473,7 +473,7 @@ contains if (ix==idim) then zt(k) = g(sone,y,z)*(-val(icoeff)) + zt(k) else - icol(icoeff) = (ix)*idim*idim+(iy-1)*idim+(iz) + call ijk2idx(icol(icoeff),ix+1,iy,iz,idim,idim,idim) irow(icoeff) = glob_row icoeff = icoeff+1 endif