diff options
author | allen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2000-01-13 13:08:02 +0000 |
---|---|---|
committer | allen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2000-01-13 13:08:02 +0000 |
commit | e9f2c18d9497fddaf932455fe8b3616734fb89d4 (patch) | |
tree | eebbf1f0936979c4c3681f4a2c29810d8a1cea7c /src/Comm.c | |
parent | 1242039813b24bcdd2b7ca44b4610fb82c25ee87 (diff) |
New specification for CCTK_GroupData
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@147 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/Comm.c')
-rw-r--r-- | src/Comm.c | 84 |
1 files changed, 42 insertions, 42 deletions
@@ -83,7 +83,7 @@ void SetGFComm(pGH *GH, pGF *res, int docomm); int pugh_SyncGroup (cGH *GH, const char *groupname) { - cGroup *pgroup; /* pointer to group information */ + cGroup pgroup; /* pointer to group information */ int group; /* group index */ int timelevel; /* timelevel to be synchronized */ int rc; /* return code */ @@ -101,16 +101,16 @@ int pugh_SyncGroup (cGH *GH, const char *groupname) } /* get the group info from its index */ - pgroup=CCTK_GroupData (group); + CCTK_GroupData (group,&pgroup); /* Compute the timelevel to synchronize */ - if (pgroup->numtimelevels > 1) - timelevel = pgroup->numtimelevels - 2; + if (pgroup.numtimelevels > 1) + timelevel = pgroup.numtimelevels - 2; else - timelevel = pgroup->numtimelevels - 1; + timelevel = pgroup.numtimelevels - 1; /* branch to synchronization function according to group type */ - switch (pgroup->grouptype) { + switch (pgroup.grouptype) { case GROUP_SCALAR : rc = 0; break; @@ -118,8 +118,8 @@ int pugh_SyncGroup (cGH *GH, const char *groupname) case GROUP_ARRAY : rc = pugh_SyncGroupArray (GH, group, - pgroup->variabletype, - pgroup->numvariables, + pgroup.vartype, + pgroup.numvars, timelevel); rc = 1; break; @@ -127,8 +127,8 @@ int pugh_SyncGroup (cGH *GH, const char *groupname) case GROUP_GF : rc = pugh_SyncGroupGF (GH, group, - pgroup->variabletype, - pgroup->numvariables, + pgroup.vartype, + pgroup.numvars, timelevel); break; @@ -375,7 +375,7 @@ int pugh_QueryGroupStorage(cGH *GH, int group, const char *groupname) int pugh_EnableGroupStorage(cGH *GH, const char *groupname) { int group; /* group index */ - cGroup *pgroup; /* pointer to group information */ + cGroup pgroup; /* pointer to group information */ int rc; /* return code */ @@ -397,10 +397,10 @@ int pugh_EnableGroupStorage(cGH *GH, const char *groupname) } /* get the group info from its index */ - pgroup=CCTK_GroupData (group); + CCTK_GroupData (group, &pgroup); /* branch to "enable storage" function according to group type */ - switch (pgroup->grouptype) { + switch (pgroup.grouptype) { case GROUP_SCALAR : rc = 1; break; @@ -408,19 +408,19 @@ int pugh_EnableGroupStorage(cGH *GH, const char *groupname) case GROUP_ARRAY : rc = pugh_EnableArrayGroupStorage (GH, group, - pgroup->variabletype, - pgroup->dim, - pgroup->numvariables, - pgroup->numtimelevels); + pgroup.vartype, + pgroup.dim, + pgroup.numvars, + pgroup.numtimelevels); break; case GROUP_GF : rc = pugh_EnableGFGroupStorage (GH, group, - pgroup->variabletype, - pgroup->dim, - pgroup->numvariables, - pgroup->numtimelevels); + pgroup.vartype, + pgroup.dim, + pgroup.numvars, + pgroup.numtimelevels); break; default : @@ -460,7 +460,7 @@ int pugh_EnableGroupStorage(cGH *GH, const char *groupname) int pugh_DisableGroupStorage(cGH *GH, const char *groupname) { int group; /* group index */ - cGroup *pgroup; /* pointer to group information */ + cGroup pgroup; /* pointer to group information */ int rc; /* return code */ #ifdef DEBUG_PUGH @@ -481,10 +481,10 @@ int pugh_DisableGroupStorage(cGH *GH, const char *groupname) } /* get the group info from its index */ - pgroup=CCTK_GroupData (group); + CCTK_GroupData (group,&pgroup); /* branch to "disable storage" function according to group type */ - switch (pgroup->grouptype) { + switch (pgroup.grouptype) { case GROUP_SCALAR : rc = 1; break; @@ -492,19 +492,19 @@ int pugh_DisableGroupStorage(cGH *GH, const char *groupname) case GROUP_ARRAY : rc = pugh_DisableArrayGroupStorage (GH, group, - pgroup->variabletype, - pgroup->dim, - pgroup->numvariables, - pgroup->numtimelevels); + pgroup.vartype, + pgroup.dim, + pgroup.numvars, + pgroup.numtimelevels); break; case GROUP_GF : rc = pugh_DisableGFGroupStorage (GH, group, - pgroup->variabletype, - pgroup->dim, - pgroup->numvariables, - pgroup->numtimelevels); + pgroup.vartype, + pgroup.dim, + pgroup.numvars, + pgroup.numtimelevels); break; default : @@ -542,7 +542,7 @@ int pugh_DisableGroupStorage(cGH *GH, const char *groupname) int pugh_EnableGroupComm (cGH *GH, const char *groupname) { - cGroup *pgroup; /* pointer to group information */ + cGroup pgroup; /* pointer to group information */ int group; /* group index */ pGH *pughGH; /* PUGH extension reference */ int var, level; /* loop variables */ @@ -563,7 +563,7 @@ int pugh_EnableGroupComm (cGH *GH, const char *groupname) } /* get the group info from its index */ - pgroup=CCTK_GroupData (group); + CCTK_GroupData (group,&pgroup); /* get global index of first variable in group */ first_var = CCTK_FirstVarIndexI (group); @@ -572,7 +572,7 @@ int pugh_EnableGroupComm (cGH *GH, const char *groupname) pughGH = (pGH *) GH->extensions [PUGH_GHExtension]; /* branch to "enable comm" function according to group type */ - switch (pgroup->grouptype) { + switch (pgroup.grouptype) { case GROUP_SCALAR : rc = 1; break; @@ -583,8 +583,8 @@ int pugh_EnableGroupComm (cGH *GH, const char *groupname) break; case GROUP_GF : - for (var = first_var; var < first_var+pgroup->numvariables; var++) - for (level = 0; level < pgroup->numtimelevels; level++) + for (var = first_var; var < first_var+pgroup.numvars; var++) + for (level = 0; level < pgroup.numtimelevels; level++) SetGFComm (pughGH, (pGF *)(pughGH->variables[var][level]), PUGH_ALLCOMM); rc = 1; break; @@ -625,7 +625,7 @@ int pugh_EnableGroupComm (cGH *GH, const char *groupname) int pugh_DisableGroupComm(cGH *GH, const char *groupname) { int group; /* group index */ - cGroup *pgroup; /* pointer to group information */ + cGroup pgroup; /* pointer to group information */ pGH *pughGH; /* PUGH extension reference */ int var, level; /* loop variables */ int first_var; /* global index of first variable in group */ @@ -644,7 +644,7 @@ int pugh_DisableGroupComm(cGH *GH, const char *groupname) } /* get the group info from its index */ - pgroup=CCTK_GroupData (group); + CCTK_GroupData (group,&pgroup); /* get global index of first variable in group */ first_var = CCTK_FirstVarIndexI (group); @@ -653,7 +653,7 @@ int pugh_DisableGroupComm(cGH *GH, const char *groupname) pughGH = (pGH *) GH->extensions [PUGH_GHExtension]; /* branch to "disable comm" function according to group type */ - switch (pgroup->grouptype) { + switch (pgroup.grouptype) { case GROUP_SCALAR : rc = 1; break; @@ -664,8 +664,8 @@ int pugh_DisableGroupComm(cGH *GH, const char *groupname) break; case GROUP_GF : - for (var = first_var; var < first_var+pgroup->numvariables; var++) - for (level = 0; level < pgroup->numtimelevels; level++) + for (var = first_var; var < first_var+pgroup.numvars; var++) + for (level = 0; level < pgroup.numtimelevels; level++) SetGFComm (pughGH, (pGF *)(pughGH->variables[var][level]), PUGH_NOCOMM); rc = 1; break; |