diff options
author | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2001-06-12 22:14:24 +0000 |
---|---|---|
committer | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2001-06-12 22:14:24 +0000 |
commit | dac533161647369d074064828e5589f591a57594 (patch) | |
tree | 444c332047cc3f61b66d39d6467a3ca37c455bce /src/SetupPGV.c | |
parent | 2d75ab0c672dc5d1268fa630c1af6cfa54902016 (diff) |
The pGExtras->hyper_volume[] array is counted by number of elements now,
not by number of bytes anymore.
This fixes PR CactusPUGH-PUGH/689.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@333 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/SetupPGV.c')
-rw-r--r-- | src/SetupPGV.c | 58 |
1 files changed, 23 insertions, 35 deletions
diff --git a/src/SetupPGV.c b/src/SetupPGV.c index 507250f..ba8496b 100644 --- a/src/SetupPGV.c +++ b/src/SetupPGV.c @@ -1376,11 +1376,12 @@ pComm *PUGH_SetupGArrayGroupComm(pGH *pughGH, /* Now set the hyper_volume vector in the extras structure which is used to copy the ghostzones from/to the comm buffers. - NOTE: Sizes are already in bytes here. hyper_volume[0] is unused. + NOTE: Sizes are counted in 'number of elements' here. + hyper_volume[0] is unused. */ if(this) { - extras->hyper_volume[0] = CCTK_VarTypeSize(vartype); + extras->hyper_volume[0] = 1; for (i = 1; i < extras->dim; i++) { extras->hyper_volume[i] = extras->hyper_volume[i-1] * extras->lnsize[i-1]; @@ -1618,47 +1619,34 @@ static int PUGH_IntegerRoot(int number, int invpower) return root; } + /*@@ @routine IntSort @date Tue Jan 30 17:08:47 2001 @author Tom Goodale - @desc - Sorts two integers for the qsort routine. - @enddesc - @calls - @calledby - @history - - @endhistory - @var a - @vdesc First variable to compare - @vtype const void * - @vio in - @vcomment - This should be a pointer to an integer. - @endvar - @var b - @vdesc Second variable to compare - @vtype const void * - @vio in - @vcomment - This should be a pointer to an integer. - @endvar + @desc + Sorts two integers for the qsort routine. + @enddesc + + @var a + @vdesc Pointer to first integer to compare + @vtype const void * + @vio in + @endvar + @var b + @vdesc Pointer to second integer to compare + @vtype const void * + @vio in + @endvar @returntype int @returndesc - -ve if b is greater than a. - +ve if a is greater than b. - 0 if a is equal to b. + -ve if b is greater than a.<BR> + +ve if a is greater than b.<BR> + 0 if a is equal to b. @endreturndesc @@*/ -static int IntSort(const void *a, const void *b) +static int IntSort (const void *a, const void *b) { - int reala,realb; - - reala = *(int *)a; - realb = *(int *)b; - - return reala - realb; - + return (*(const int *) a - *(const int *) b); } |