aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetInterp
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2005-11-28 04:27:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2005-11-28 04:27:00 +0000
commit6f1c95f853935389f0d76230be39bf109029ae2f (patch)
treea2a7e5b942fba50636d7a3277f9e15770173ac4b /Carpet/CarpetInterp
parent3185de79d05baf2a0d929a65446df7dd237897bd (diff)
CarpetInterp: Correct logic error with time_deriv_order
Correct logic error in handling the optional argument time_deriv_order. darcs-hash:20051128042731-dae7b-353b2943aeb4819500f773415490040ea14b0654.gz
Diffstat (limited to 'Carpet/CarpetInterp')
-rw-r--r--Carpet/CarpetInterp/src/interp.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/Carpet/CarpetInterp/src/interp.cc b/Carpet/CarpetInterp/src/interp.cc
index 14755a421..b50b1bf3c 100644
--- a/Carpet/CarpetInterp/src/interp.cc
+++ b/Carpet/CarpetInterp/src/interp.cc
@@ -743,15 +743,15 @@ namespace CarpetInterp {
iret = Util_TableGetIntArray (param_table_handle, N_output_arrays,
&time_deriv_order.front(), "time_deriv_order");
- if (iret != UTIL_ERROR_TABLE_NO_SUCH_KEY) {
+ if (iret == UTIL_ERROR_TABLE_NO_SUCH_KEY) {
time_deriv_order.assign (time_deriv_order.size(), 0);
num_time_derivs = 0;
- for (int m = 0; m < N_output_arrays; ++m) {
- num_time_derivs = max (num_time_derivs, time_deriv_order[m]);
- }
} else {
assert (iret == N_output_arrays);
num_time_derivs = 0;
+ for (int m = 0; m < N_output_arrays; ++m) {
+ num_time_derivs = max (num_time_derivs, time_deriv_order[m]);
+ }
}
// Find output variable indices