aboutsummaryrefslogtreecommitdiff
path: root/src/GHExtension.c
diff options
context:
space:
mode:
authorgoodale <goodale@b61c5cb5-eaca-4651-9a7a-d64986f99364>2000-02-17 17:38:50 +0000
committergoodale <goodale@b61c5cb5-eaca-4651-9a7a-d64986f99364>2000-02-17 17:38:50 +0000
commitc06576a3bcd5cace72592c6041e6fb2827ffbff6 (patch)
tree5565cc938c0841bcf8372b15496b72b6b98b221f /src/GHExtension.c
parent539cd2636da010382f41c9ff1ba237ec080e5341 (diff)
Untabified.
Got rid of redundant file. Did some formatting changes in line with the coding guidelines. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@164 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/GHExtension.c')
-rw-r--r--src/GHExtension.c128
1 files changed, 61 insertions, 67 deletions
diff --git a/src/GHExtension.c b/src/GHExtension.c
index 203a2c2..393deae 100644
--- a/src/GHExtension.c
+++ b/src/GHExtension.c
@@ -43,7 +43,6 @@ void *pugh_SetupGH(tFleshConfig *config,
int convergence_level,
cGH *GH)
{
-
DECLARE_CCTK_PARAMETERS
int group;
@@ -101,7 +100,7 @@ void *pugh_SetupGH(tFleshConfig *config,
groupsize = (int *)malloc(pgroup.dim*sizeof(int));
for (i=0;i<pgroup.dim;i++)
{
- groupsize[i]=*size[i];
+ groupsize[i]=*size[i];
}
}
else
@@ -117,7 +116,7 @@ void *pugh_SetupGH(tFleshConfig *config,
groupghostsize = (int *)malloc(pgroup.dim*sizeof(int));
for (i=0;i<pgroup.dim;i++)
{
- groupghostsize[i]=*size[i];
+ groupghostsize[i]=*size[i];
}
}
else if (pgroup.grouptype == CCTK_ARRAY)
@@ -125,7 +124,7 @@ void *pugh_SetupGH(tFleshConfig *config,
groupghostsize = (int *)malloc(pgroup.dim*sizeof(int));
for (i=0;i<pgroup.dim;i++)
{
- groupghostsize[i]=0;
+ groupghostsize[i]=0;
}
}
else
@@ -134,14 +133,14 @@ void *pugh_SetupGH(tFleshConfig *config,
}
PUGH_SetupGroup(newGH,
- groupsize,
- groupghostsize,
- pgroup.grouptype,
- pgroup.vartype,
- pgroup.dim,
- pgroup.numvars,
- pgroup.stagtype,
- pgroup.numtimelevels);
+ groupsize,
+ groupghostsize,
+ pgroup.grouptype,
+ pgroup.vartype,
+ pgroup.dim,
+ pgroup.numvars,
+ pgroup.stagtype,
+ pgroup.numtimelevels);
if (groupsize) free(groupsize);
if (groupghostsize) free(groupghostsize);
@@ -223,24 +222,23 @@ int pugh_ScheduleTraverseGH(cGH *GH,
for (istag=0;istag<CCTK_NSTAGGER;istag++)
{
GH->cctk_lssh[CCTK_LSSH_IDX(istag,idir)] =
- (mypGH->ownership[istag][1][idir]);
+ (mypGH->ownership[istag][1][idir]);
if (GH->cctk_bbox[2*idir+1]==0)
- GH->cctk_lssh[CCTK_LSSH_IDX(istag,idir)]+= GH->cctk_nghostzones[idir];
+ GH->cctk_lssh[CCTK_LSSH_IDX(istag,idir)]+= GH->cctk_nghostzones[idir];
}
}
/*$for (istag=0;istag<3;istag++) {
for (idir=0;idir<GH->cctk_dim;idir++)
printf("GHEx: LSSH[%d][%d] (%d): %d OSoben: %d \n",
- istag,idir,CCTK_LSSH_IDX(istag,idir),
- GH->cctk_lssh[CCTK_LSSH_IDX(istag,idir)],
- mypGH->ownership[istag][1][idir]);
+ istag,idir,CCTK_LSSH_IDX(istag,idir),
+ GH->cctk_lssh[CCTK_LSSH_IDX(istag,idir)],
+ mypGH->ownership[istag][1][idir]);
} $*/
for(var = 0; var < mypGH->nvariables; var++)
{
-
gtype = CCTK_GroupTypeFromVarI(var);
ntimelevels = CCTK_NumTimeLevelsFromVarI(var);
@@ -248,19 +246,19 @@ int pugh_ScheduleTraverseGH(cGH *GH,
{
switch(gtype)
{
- case CCTK_SCALAR :
- GH->data[var][level] = mypGH->variables[var][level];
- break;
- case CCTK_GF :
- GH->data[var][level] =
- ((pGF ***)(mypGH->variables))[var][level]->data;
- break;
- case CCTK_ARRAY :
- GH->data[var][level] =
- ((pGA ***)(mypGH->variables))[var][level]->data;
- break;
- default:
- CCTK_WARN(1,"Unknown group type in pugh_ScheduleTraverse");
+ case CCTK_SCALAR :
+ GH->data[var][level] = mypGH->variables[var][level];
+ break;
+ case CCTK_GF :
+ GH->data[var][level] =
+ ((pGF ***)(mypGH->variables))[var][level]->data;
+ break;
+ case CCTK_ARRAY :
+ GH->data[var][level] =
+ ((pGA ***)(mypGH->variables))[var][level]->data;
+ break;
+ default:
+ CCTK_WARN(1,"Unknown group type in pugh_ScheduleTraverse");
}
}
}
@@ -272,7 +270,6 @@ int pugh_ScheduleTraverseGH(cGH *GH,
int pugh_GFSize(int dim, int *nsize)
{
-
DECLARE_CCTK_PARAMETERS
int dir;
@@ -290,51 +287,49 @@ int pugh_GFSize(int dim, int *nsize)
{
for (dir=0;dir<dim;dir++)
{
- nsize[dir] = -local_nsize;
+ nsize[dir] = -local_nsize;
}
}
else
{
if (dim>0)
{
- if (local_nx > 0)
- {
- nsize[0] = -local_nx;
- }
- else
- {
- nsize[0] = global_nx;
- }
+ if (local_nx > 0)
+ {
+ nsize[0] = -local_nx;
+ }
+ else
+ {
+ nsize[0] = global_nx;
+ }
}
if (dim>1)
{
- if (local_ny > 0)
- {
- nsize[1] = -local_ny;
- }
- else
- {
- nsize[1] = global_ny;
- }
+ if (local_ny > 0)
+ {
+ nsize[1] = -local_ny;
+ }
+ else
+ {
+ nsize[1] = global_ny;
+ }
}
if (dim>2)
{
- if (local_nz > 0)
- {
- nsize[2] = -local_nz;
- }
- else
- {
- nsize[2] = global_nz;
- }
+ if (local_nz > 0)
+ {
+ nsize[2] = -local_nz;
+ }
+ else
+ {
+ nsize[2] = global_nz;
+ }
}
}
}
- ;
-
return 0;
}
@@ -357,19 +352,18 @@ int pugh_GFGhostsize(int dim, int *ghostsize)
switch(dim)
{
case 3:
- ghostsize[2] = ghost_size_z;
- ghostsize[1] = ghost_size_y;
- ghostsize[0] = ghost_size_x;
+ ghostsize[2] = ghost_size_z;
+ ghostsize[1] = ghost_size_y;
+ ghostsize[0] = ghost_size_x;
case 2:
- ghostsize[1] = ghost_size_y;
- ghostsize[0] = ghost_size_x;
+ ghostsize[1] = ghost_size_y;
+ ghostsize[0] = ghost_size_x;
case 1:
- ghostsize[0] = ghost_size_x;
+ ghostsize[0] = ghost_size_x;
default:
- ghostsize = NULL;
+ ghostsize = NULL;
}
}
- ;
return 0;
}