aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@082bdb00-0f4f-0410-b49e-b1835e5f2039>2006-08-16 20:20:57 +0000
committerschnetter <schnetter@082bdb00-0f4f-0410-b49e-b1835e5f2039>2006-08-16 20:20:57 +0000
commit5a8ce52b66b414734ac739d294efa201e2b19599 (patch)
tree3b665743176c4ef6fd96bc4b7f4bafad473e16c7
parentdfd66166ce24407420e3a7d58bdaba0659234c4d (diff)
When interpolating, ignore input variable indices which are set to -1.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/ReflectionSymmetry/trunk@15 082bdb00-0f4f-0410-b49e-b1835e5f2039
-rw-r--r--src/interpolate.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/interpolate.c b/src/interpolate.c
index d8cdcee..9d52c9a 100644
--- a/src/interpolate.c
+++ b/src/interpolate.c
@@ -159,8 +159,9 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_,
for (m=0; m<N_output_arrays; ++m) {
assert (operand_indices[m]>=0 && operand_indices[m]<N_input_arrays);
output_array_indices[m] = input_array_indices[operand_indices[m]];
- assert (output_array_indices[m]>=0
- && output_array_indices[m]<CCTK_NumVars());
+ assert (output_array_indices[m]==-1
+ || (output_array_indices[m]>=0
+ && output_array_indices[m]<CCTK_NumVars()));
}
@@ -168,6 +169,8 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_,
/* Unfold tensor types */
for (m=0; m<N_output_arrays; ++m)
{
+ if (output_array_indices[m]!=-1)
+ {
int vi, gi;
int numvars, firstvar;
@@ -360,6 +363,7 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_,
}
}
+ }
} /* for m */