diff options
author | schnetter <schnetter@d60812e6-3970-4df4-986e-c251b06effeb> | 2003-10-13 18:07:50 +0000 |
---|---|---|
committer | schnetter <schnetter@d60812e6-3970-4df4-986e-c251b06effeb> | 2003-10-13 18:07:50 +0000 |
commit | 5dbbb70bb9834ed7e67470fe0938df813e756071 (patch) | |
tree | 7b87fb64a643047ff518d4f542d7f3cc6c1e66ca | |
parent | a9bea8d978aec10560ababf0911b26ccb9603fcd (diff) |
Introduce the new Cactus variable type CCTK_INT1.
Extend routines to handle the new type.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHReduce/trunk@44 d60812e6-3970-4df4-986e-c251b06effeb
-rw-r--r-- | src/Reduction.c | 12 | ||||
-rw-r--r-- | src/ReductionAvg.c | 8 | ||||
-rw-r--r-- | src/ReductionMax.c | 8 | ||||
-rw-r--r-- | src/ReductionMin.c | 8 | ||||
-rw-r--r-- | src/ReductionNorm1.c | 8 | ||||
-rw-r--r-- | src/ReductionNorm2.c | 8 | ||||
-rw-r--r-- | src/ReductionNorm3.c | 8 | ||||
-rw-r--r-- | src/ReductionNorm4.c | 8 | ||||
-rw-r--r-- | src/ReductionNormInf.c | 8 | ||||
-rw-r--r-- | src/ReductionSum.c | 8 |
10 files changed, 84 insertions, 0 deletions
diff --git a/src/Reduction.c b/src/Reduction.c index 30ddfd5..7ca59a0 100644 --- a/src/Reduction.c +++ b/src/Reduction.c @@ -569,6 +569,18 @@ static int copy_real_to_outtype (int num_elems, _outarray[i] = (CCTK_INT) inarray[i]; } } +#ifdef CCTK_INT1 + else if (outtype == CCTK_VARIABLE_INT1) + { + CCTK_INT1 *_outarray = (CCTK_INT1 *) outarray; + + + for (i = 0; i < num_elems; i++) + { + _outarray[i] = (CCTK_INT1) inarray[i]; + } + } +#endif #ifdef CCTK_INT2 else if (outtype == CCTK_VARIABLE_INT2) { diff --git a/src/ReductionAvg.c b/src/ReductionAvg.c index a2bc35d..07f2968 100644 --- a/src/ReductionAvg.c +++ b/src/ReductionAvg.c @@ -246,6 +246,14 @@ static int ReductionAvg (const cGH *GH, CCTK_INT, outvals, num_outvals, total_outvals); break; +#ifdef CCTK_INT1 + case CCTK_VARIABLE_INT1: + ITERATE_ARRAY (CCTK_INT1, num_dims, inarrays[i], + from, to, iterator, points_per_dim, + CCTK_INT1, outvals, num_outvals, total_outvals); + break; +#endif + #ifdef CCTK_INT2 case CCTK_VARIABLE_INT2: ITERATE_ARRAY (CCTK_INT2, num_dims, inarrays[i], diff --git a/src/ReductionMax.c b/src/ReductionMax.c index a1fceb8..2ae7e48 100644 --- a/src/ReductionMax.c +++ b/src/ReductionMax.c @@ -247,6 +247,14 @@ static int ReductionMaxVal (const cGH *GH, CCTK_INT, outvals, num_outvals, total_outvals); break; +#ifdef CCTK_INT1 + case CCTK_VARIABLE_INT1: + ITERATE_ARRAY (CCTK_INT1, num_dims, inarrays[i], + from, to, iterator, points_per_dim, + CCTK_INT1, outvals, num_outvals, total_outvals); + break; +#endif + #ifdef CCTK_INT2 case CCTK_VARIABLE_INT2: ITERATE_ARRAY (CCTK_INT2, num_dims, inarrays[i], diff --git a/src/ReductionMin.c b/src/ReductionMin.c index ab76dfc..001e00d 100644 --- a/src/ReductionMin.c +++ b/src/ReductionMin.c @@ -248,6 +248,14 @@ static int ReductionMinVal (const cGH *GH, CCTK_INT, outvals, num_outvals, total_outvals); break; +#ifdef CCTK_INT1 + case CCTK_VARIABLE_INT1: + ITERATE_ARRAY (CCTK_INT1, num_dims, inarrays[i], + from, to, iterator, points_per_dim, + CCTK_INT1, outvals, num_outvals, total_outvals); + break; +#endif + #ifdef CCTK_INT2 case CCTK_VARIABLE_INT2: ITERATE_ARRAY (CCTK_INT2, num_dims, inarrays[i], diff --git a/src/ReductionNorm1.c b/src/ReductionNorm1.c index 1394a4a..8aa4d72 100644 --- a/src/ReductionNorm1.c +++ b/src/ReductionNorm1.c @@ -251,6 +251,14 @@ static int ReductionNorm1 (const cGH *GH, CCTK_INT, outvals, num_outvals, total_outvals); break; +#ifdef CCTK_INT1 + case CCTK_VARIABLE_INT1: + ITERATE_ARRAY (CCTK_INT1, num_dims, inarrays[i], + from, to, iterator, points_per_dim, + CCTK_INT1, outvals, num_outvals, total_outvals); + break; +#endif + #ifdef CCTK_INT2 case CCTK_VARIABLE_INT2: ITERATE_ARRAY (CCTK_INT2, num_dims, inarrays[i], diff --git a/src/ReductionNorm2.c b/src/ReductionNorm2.c index 35d65f8..eaf3cc9 100644 --- a/src/ReductionNorm2.c +++ b/src/ReductionNorm2.c @@ -250,6 +250,14 @@ static int ReductionNorm2 (const cGH *GH, CCTK_INT, outvals, num_outvals, total_outvals); break; +#ifdef CCTK_INT1 + case CCTK_VARIABLE_INT1: + ITERATE_ARRAY (CCTK_INT1, num_dims, inarrays[i], + from, to, iterator, points_per_dim, + CCTK_INT1, outvals, num_outvals, total_outvals); + break; +#endif + #ifdef CCTK_INT2 case CCTK_VARIABLE_INT2: ITERATE_ARRAY (CCTK_INT2, num_dims, inarrays[i], diff --git a/src/ReductionNorm3.c b/src/ReductionNorm3.c index f5036af..56b53b0 100644 --- a/src/ReductionNorm3.c +++ b/src/ReductionNorm3.c @@ -249,6 +249,14 @@ static int ReductionNorm3 (const cGH *GH, CCTK_INT, outvals, num_outvals, total_outvals); break; +#ifdef CCTK_INT1 + case CCTK_VARIABLE_INT1: + ITERATE_ARRAY (CCTK_INT1, num_dims, inarrays[i], + from, to, iterator, points_per_dim, + CCTK_INT1, outvals, num_outvals, total_outvals); + break; +#endif + #ifdef CCTK_INT2 case CCTK_VARIABLE_INT2: ITERATE_ARRAY (CCTK_INT2, num_dims, inarrays[i], diff --git a/src/ReductionNorm4.c b/src/ReductionNorm4.c index 8132aa2..331b67e 100644 --- a/src/ReductionNorm4.c +++ b/src/ReductionNorm4.c @@ -247,6 +247,14 @@ static int ReductionNorm4 (const cGH *GH, CCTK_INT, outvals, num_outvals, total_outvals); break; +#ifdef CCTK_INT1 + case CCTK_VARIABLE_INT1: + ITERATE_ARRAY (CCTK_INT1, num_dims, inarrays[i], + from, to, iterator, points_per_dim, + CCTK_INT1, outvals, num_outvals, total_outvals); + break; +#endif + #ifdef CCTK_INT2 case CCTK_VARIABLE_INT2: ITERATE_ARRAY (CCTK_INT2, num_dims, inarrays[i], diff --git a/src/ReductionNormInf.c b/src/ReductionNormInf.c index fa4ea97..906070d 100644 --- a/src/ReductionNormInf.c +++ b/src/ReductionNormInf.c @@ -263,6 +263,14 @@ static int ReductionNormInf (const cGH *GH, CCTK_INT, outvals, num_outvals, total_outvals); break; +#ifdef CCTK_INT1 + case CCTK_VARIABLE_INT1: + ITERATE_ARRAY (CCTK_INT1, num_dims, inarrays[i], + from, to, iterator, points_per_dim, + CCTK_INT1, outvals, num_outvals, total_outvals); + break; +#endif + #ifdef CCTK_INT2 case CCTK_VARIABLE_INT2: ITERATE_ARRAY (CCTK_INT2, num_dims, inarrays[i], diff --git a/src/ReductionSum.c b/src/ReductionSum.c index 1610f35..ce21d71 100644 --- a/src/ReductionSum.c +++ b/src/ReductionSum.c @@ -246,6 +246,14 @@ static int ReductionSum (const cGH *GH, CCTK_INT, outvals, num_outvals, total_outvals); break; +#ifdef CCTK_INT1 + case CCTK_VARIABLE_INT1: + ITERATE_ARRAY (CCTK_INT1, num_dims, inarrays[i], + from, to, iterator, points_per_dim, + CCTK_INT1, outvals, num_outvals, total_outvals); + break; +#endif + #ifdef CCTK_INT2 case CCTK_VARIABLE_INT2: ITERATE_ARRAY (CCTK_INT2, num_dims, inarrays[i], |