diff options
author | eschnett <eschnett@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2012-07-04 01:29:14 +0000 |
---|---|---|
committer | eschnett <eschnett@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2012-07-04 01:29:14 +0000 |
commit | c438704e6d1d796f42f78cd57917c60bd0e951fe (patch) | |
tree | 7444e4b0b01dbb171683e6197fd00e66b47e85b4 /src/SetupPGH.c | |
parent | decf9c65e304089e6bc0c0c32dc5998ae6329b6b (diff) |
Introduce cctk_ash, retire cctk_lssh
Introduce cctk_ash, describing the process-local array shape that has
been allocated. This may be larger than cctk_lsh, the process-local
shape that should be used.
Retire cctk_lssh and related infrastructure to handle staggered grid
functions.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@515 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/SetupPGH.c')
-rw-r--r-- | src/SetupPGH.c | 43 |
1 files changed, 14 insertions, 29 deletions
diff --git a/src/SetupPGH.c b/src/SetupPGH.c index cbccf71..5e81705 100644 --- a/src/SetupPGH.c +++ b/src/SetupPGH.c @@ -8,7 +8,7 @@ @version $Id$ @@*/ -/*#define DEBUG_PUGH*/ +/* #define DEBUG_PUGH 1 */ #include <stdio.h> #include <stdlib.h> @@ -84,11 +84,6 @@ static int topology_3d_z = 0; @vtype int * @vio in @endvar - @var staggertype - @vdesc staggering type for variables on this pGH - @vtype int - @vio in - @endvar @var perme @vdesc periodic boundary flags for every dimension @vtype int * @@ -104,7 +99,6 @@ pGH *PUGH_SetupPGH (void *callerid, int dim, int *nsize, int *nghostzones, - int staggertype, int *perme) { DECLARE_CCTK_PARAMETERS @@ -174,7 +168,7 @@ pGH *PUGH_SetupPGH (void *callerid, free(nprocs); pughGH->GFExtras[idim-1] = - PUGH_SetupPGExtras (1, idim, perme, staggertype, + PUGH_SetupPGExtras (1, idim, perme, nsize, nghostzones, pughGH->nprocs, pughGH->Connectivity[idim-1]->nprocs, @@ -652,40 +646,31 @@ int PUGH_nProcs (const cGH *GH) #if 0 void pGH_DumpInfo(pGH *GH) { - int i,j,k; + int j,k; printf("INFO: \n"); printf(" myproc: %d/%d \n",GH->myproc,GH->nprocs); printf(" ownership: \n"); - for (i=0;i<PUGH_NSTAGGER;i++) + for (j=0;j<GH->dim;j++) { - for (j=0;j<GH->dim;j++) - { - printf(" GH->ownership[%d][0/1][%d]: %d %d \n", - i,j,GH->GFExtras[GH->dim-1]->ownership[i][0][j],GH->GFExtras[GH->dim-1]->ownership[i][1][j]); - } + printf(" GH->ownership[0/1][%d]: %d %d \n", + j,GH->GFExtras[GH->dim-1]->ownership[0][j],GH->GFExtras[GH->dim-1]->ownership[1][j]); } - for (i=0;i<PUGH_NSTAGGER;i++) + for (j=0;j<GH->dim;j++) { - for (j=0;j<GH->dim;j++) + for (k=0;k<2*GH->dim;k++) { - for (k=0;k<2*GH->dim;k++) - { - printf(" GH->GFExtras[GH->dim-1]->ghosts[%d][0/1][%d][%d]: %d %d \n", - i,k,j,GH->GFExtras[GH->dim-1]->ghosts[i][0][k][j],GH->GFExtras[GH->dim-1]->ghosts[i][1][k][j]); - } + printf(" GH->GFExtras[GH->dim-1]->ghosts[0/1][%d][%d]: %d %d \n", + k,j,GH->GFExtras[GH->dim-1]->ghosts[0][k][j],GH->GFExtras[GH->dim-1]->ghosts[1][k][j]); } } - for (i=0;i<PUGH_NSTAGGER;i++) + for (j=0;j<GH->dim;j++) { - for (j=0;j<GH->dim;j++) + for (k=0;k<2*GH->dim;k++) { - for (k=0;k<2*GH->dim;k++) - { - printf(" GH->GFExtras[GH->dim-1]->overlap[%d][0/1][%d][%d]: %d %d \n", - i,k,j,GH->GFExtras[GH->dim-1]->overlap[i][0][j][k],GH->GFExtras[GH->dim-1]->overlap[i][1][k][j]); - } + printf(" GH->GFExtras[GH->dim-1]->overlap[0/1][%d][%d]: %d %d \n", + k,j,GH->GFExtras[GH->dim-1]->overlap[0][j][k],GH->GFExtras[GH->dim-1]->overlap[1][k][j]); } } } |