diff options
author | allen <allen@1d96b42b-98df-4a6a-9d84-1b24288d4588> | 1999-10-24 16:04:17 +0000 |
---|---|---|
committer | allen <allen@1d96b42b-98df-4a6a-9d84-1b24288d4588> | 1999-10-24 16:04:17 +0000 |
commit | bf6679af34570c51bc466ea4dbbd103810b7aacb (patch) | |
tree | 8474b548af8d08edc43d499e06d7fa5f10f1e73b /src | |
parent | 3033134fb8864db49c8735dfeb60110ebb708a2e (diff) |
Adding recent changes to rnx lnx nx etc from PUGH
git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllPETSc/trunk@22 1d96b42b-98df-4a6a-9d84-1b24288d4588
Diffstat (limited to 'src')
-rw-r--r-- | src/petsc_confmetric_solver.c | 26 | ||||
-rw-r--r-- | src/petsc_flat_solver.c | 26 |
2 files changed, 26 insertions, 26 deletions
diff --git a/src/petsc_confmetric_solver.c b/src/petsc_confmetric_solver.c index 55f5e7a..4c74ab8 100644 --- a/src/petsc_confmetric_solver.c +++ b/src/petsc_confmetric_solver.c @@ -250,18 +250,18 @@ void petsc_confmetric_solver(cGH *GH, int *MetricPsiI, int MetricPsiISize, the sense that they are no ghostzones: */ imin=((pughGH->neighbors[pughGH->myproc][XDM]<0) && !(octant) ? 1 : pughGH->nghostzones); - imax=((pughGH->neighbors[pughGH->myproc][XDP]<0) ? pughGH->lnx-1 : - pughGH->lnx-GH->cctk_nghostzones[0]); + imax=((pughGH->neighbors[pughGH->myproc][XDP]<0) ? pughGH->lnsize[0]-1 : + pughGH->lnsize[0]-GH->cctk_nghostzones[0]); jmin=((pughGH->neighbors[pughGH->myproc][YDM]<0) && !(octant) ? 1 : GH->cctk_nghostzones[1]); - jmax=((pughGH->neighbors[pughGH->myproc][YDP]<0) ? pughGH->lny-1 : - pughGH->lny-GH->cctk_nghostzones[1]); + jmax=((pughGH->neighbors[pughGH->myproc][YDP]<0) ? pughGH->lnsize[1]-1 : + pughGH->lnsize[1]-GH->cctk_nghostzones[1]); kmin=((pughGH->neighbors[pughGH->myproc][ZDM]<0) && !(octant) ? 1 : GH->cctk_nghostzones[2]); - kmax=((pughGH->neighbors[pughGH->myproc][ZDP]<0) ? pughGH->lnz-1 : - pughGH->lnz-GH->cctk_nghostzones[2]); + kmax=((pughGH->neighbors[pughGH->myproc][ZDP]<0) ? pughGH->lnsize[2]-1 : + pughGH->lnsize[2]-GH->cctk_nghostzones[2]); /* We need to get the global index of gridpoints (gps) owned on my proc. For that we have to know how many gps are there before my processors @@ -271,17 +271,17 @@ void petsc_confmetric_solver(cGH *GH, int *MetricPsiI, int MetricPsiISize, for (i=0;i<myproc;i++) { - nxs=pughGH->rnx[i]; + nxs=pughGH->rnsize[i][0]; nxs=((pughGH->neighbors[i][XDM]<0) && !(octant) ? nxs-1 : nxs-GH->cctk_nghostzones[0]); nxs=((pughGH->neighbors[i][XDP]<0) ? nxs-1 : nxs-GH->cctk_nghostzones[0]); - nys=pughGH->rny[i]; + nys=pughGH->rnsize[i][1]; nys=((pughGH->neighbors[i][YDM]<0) && !(octant) ? nys-1 : nys-GH->cctk_nghostzones[1]); nys=((pughGH->neighbors[i][YDP]<0) ? nys-1 : nys-GH->cctk_nghostzones[1]); - nzs=pughGH->rnz[i]; + nzs=pughGH->rnsize[i][2]; nzs=((pughGH->neighbors[i][ZDM]<0) && !(octant) ? nzs-1 : nzs-GH->cctk_nghostzones[2]); nzs=((pughGH->neighbors[i][ZDP]<0) ? nzs-1 : nzs-GH->cctk_nghostzones[2]); @@ -318,14 +318,14 @@ void petsc_confmetric_solver(cGH *GH, int *MetricPsiI, int MetricPsiISize, as well as the column for the stencil of the neighbors (workspace->data[DATINDEX(GH,i+1,j,k)] etc...). So onwards */ - nxs = pughGH->nx-2; - nys = pughGH->ny-2; - nzs = pughGH->nz-2; + nxs = pughGH->nsize[0]-2; + nys = pughGH->nsize[1]-2; + nzs = pughGH->nsize[2]-2; #ifdef DEBUG if (debug) { printf("nxyzs %d %d %d \n",nxs,nys,nzs); - printf("lnxyz: %d %d %d \n",pughGH->lnx,pughGH->lny,pughGH->lnz); + printf("lnxyz: %d %d %d \n",pughGH->lnsize[0],pughGH->lnsize[1],pughGH->lnsize[2]); } #endif diff --git a/src/petsc_flat_solver.c b/src/petsc_flat_solver.c index e838577..a5ada15 100644 --- a/src/petsc_flat_solver.c +++ b/src/petsc_flat_solver.c @@ -166,18 +166,18 @@ void petsc_flat(cGH *GH, int FieldIndex, int MIndex, int NIndex, the sense that they are no ghostzones: */ imin=((pughGH->neighbors[pughGH->myproc][XDM]<0) && !(octant) ? 1 : pughGH->nghostzones); - imax=((pughGH->neighbors[pughGH->myproc][XDP]<0) ? pughGH->lnx-1 : - pughGH->lnx-GH->cctk_nghostzones[0]); + imax=((pughGH->neighbors[pughGH->myproc][XDP]<0) ? pughGH->lnsize[0]-1 : + pughGH->lnsize[0]-GH->cctk_nghostzones[0]); jmin=((pughGH->neighbors[pughGH->myproc][YDM]<0) && !(octant) ? 1 : GH->cctk_nghostzones[1]); - jmax=((pughGH->neighbors[pughGH->myproc][YDP]<0) ? pughGH->lny-1 : - pughGH->lny-GH->cctk_nghostzones[1]); + jmax=((pughGH->neighbors[pughGH->myproc][YDP]<0) ? pughGH->lnsize[1]-1 : + pughGH->lnsize[1]-GH->cctk_nghostzones[1]); kmin=((pughGH->neighbors[pughGH->myproc][ZDM]<0) && !(octant) ? 1 : GH->cctk_nghostzones[2]); - kmax=((pughGH->neighbors[pughGH->myproc][ZDP]<0) ? pughGH->lnz-1 : - pughGH->lnz-GH->cctk_nghostzones[2]); + kmax=((pughGH->neighbors[pughGH->myproc][ZDP]<0) ? pughGH->lnsize[2]-1 : + pughGH->lnsize[2]-GH->cctk_nghostzones[2]); /* We need to get the global index of gridpoints (gps) owned on my proc. For that we have to know how many gps are there before my processors @@ -187,17 +187,17 @@ void petsc_flat(cGH *GH, int FieldIndex, int MIndex, int NIndex, for (i=0;i<myproc;i++) { - nxs=pughGH->rnx[i]; + nxs=pughGH->rnsize[i][0]; nxs=((pughGH->neighbors[i][XDM]<0) && !(octant) ? nxs-1 : nxs-GH->cctk_nghostzones[0]); nxs=((pughGH->neighbors[i][XDP]<0) ? nxs-1 : nxs-GH->cctk_nghostzones[0]); - nys=pughGH->rny[i]; + nys=pughGH->rnsize[i][1]; nys=((pughGH->neighbors[i][YDM]<0) && !(octant) ? nys-1 : nys-GH->cctk_nghostzones[1]); nys=((pughGH->neighbors[i][YDP]<0) ? nys-1 : nys-GH->cctk_nghostzones[1]); - nzs=pughGH->rnz[i]; + nzs=pughGH->rnsize[i][2]; nzs=((pughGH->neighbors[i][ZDM]<0) && !(octant) ? nzs-1 : nzs-GH->cctk_nghostzones[2]); nzs=((pughGH->neighbors[i][ZDP]<0) ? nzs-1 : nzs-GH->cctk_nghostzones[2]); @@ -234,14 +234,14 @@ void petsc_flat(cGH *GH, int FieldIndex, int MIndex, int NIndex, as well as the column for the stencil of the neighbors (workspace->data[DATINDEX(GH,i+1,j,k)] etc...). So onwards */ - nxs = pughGH->nx-2; - nys = pughGH->ny-2; - nzs = pughGH->nz-2; + nxs = pughGH->nsize[0]-2; + nys = pughGH->nsize[1]-2; + nzs = pughGH->nsize[2]-2; #ifdef DEBUG if (debug) { printf("nxyzs %d %d %d \n",nxs,nys,nzs); - printf("lnxyz: %d %d %d \n",pughGH->lnx,pughGH->lny,pughGH->lnz); + printf("lnxyz: %d %d %d \n",pughGH->lnsize[0],pughGH->lnsize[1],pughGH->lnsize[2]); } #endif |