aboutsummaryrefslogtreecommitdiff
path: root/src/Overloadables.c
diff options
context:
space:
mode:
authorschnetter <schnetter@b61c5cb5-eaca-4651-9a7a-d64986f99364>2003-11-21 15:27:24 +0000
committerschnetter <schnetter@b61c5cb5-eaca-4651-9a7a-d64986f99364>2003-11-21 15:27:24 +0000
commitf6a8262ccb22d44d19707bf25b39ebbe30f6c66a (patch)
tree6c0df81c905a58122e1f250fb0cc71938107c901 /src/Overloadables.c
parentd61946959b3663d95b31677378c0681a0eec303a (diff)
Allow vector groups of scalars.
Allow vector groups with more than one declared variable. Much of this patch consists of removing special case code for scalars. Scalars are now almost everywhere treated as rank 0 arrays. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@423 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/Overloadables.c')
-rw-r--r--src/Overloadables.c39
1 files changed, 15 insertions, 24 deletions
diff --git a/src/Overloadables.c b/src/Overloadables.c
index ebb2551..ac70e9a 100644
--- a/src/Overloadables.c
+++ b/src/Overloadables.c
@@ -22,7 +22,6 @@ CCTK_FILEVERSION(CactusPUGH_PUGH_Overloadables_c)
@date 2000/06/22
@desc
Returns the driver's internal data for a given group
- of CCTK_GF or CCTK_ARRAY variables
@enddesc
@calls CCTK_GroupTypeI
CCTK_FirstVarIndexI
@@ -47,7 +46,6 @@ CCTK_FILEVERSION(CactusPUGH_PUGH_Overloadables_c)
@returndesc
0 for success <BR>
-1 if given pointer to data structure is NULL <BR>
- -2 if given group is not of type CCTK_GF or CCTK_ARRAY <BR>
-3 if given GH pointer is invalid
@endreturndesc
@@*/
@@ -62,34 +60,27 @@ int PUGH_GroupDynamicData (const cGH *GH, int group, cGroupDynamicData *data)
if (data)
{
gtype = CCTK_GroupTypeI (group);
- if (gtype == CCTK_GF || gtype == CCTK_ARRAY)
- {
- /* Get the first variable in the group */
- var = CCTK_FirstVarIndexI (group);
+ /* Get the first variable in the group */
+ var = CCTK_FirstVarIndexI (group);
- pughGH = PUGH_pGH (GH);
- if (pughGH)
- {
- extras = ((pGA ***) pughGH->variables)[var][0]->extras;
+ pughGH = PUGH_pGH (GH);
+ if (pughGH)
+ {
+ extras = ((pGA ***) pughGH->variables)[var][0]->extras;
- data->dim = extras->dim;
- data->lsh = extras->lnsize;
- data->gsh = extras->nsize;
- data->lbnd = extras->lb[pughGH->myproc];
- data->ubnd = extras->ub[pughGH->myproc];
- data->nghostzones = extras->nghostzones;
- data->bbox = extras->bbox;
+ data->dim = extras->dim;
+ data->lsh = extras->lnsize;
+ data->gsh = extras->nsize;
+ data->lbnd = extras->lb[pughGH->myproc];
+ data->ubnd = extras->ub[pughGH->myproc];
+ data->nghostzones = extras->nghostzones;
+ data->bbox = extras->bbox;
- retval = 0;
- }
- else
- {
- retval = -3;
- }
+ retval = 0;
}
else
{
- retval = -2;
+ retval = -3;
}
}
else