aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/pr_gradient_check.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/pr_gradient_check.c b/tests/pr_gradient_check.c
index 0dd5466b..1ca3a424 100644
--- a/tests/pr_gradient_check.c
+++ b/tests/pr_gradient_check.c
@@ -295,6 +295,7 @@ static double test_gradients(Crystal *cr, double incr_val, int refine,
if ( !valid[i] ) {
n_invalid++;
+ i++;
} else {
double r1, r2, p;
@@ -303,6 +304,7 @@ static double test_gradients(Crystal *cr, double incr_val, int refine,
grad1 = (vals[1][i] - vals[0][i]) / incr_val;
grad2 = (vals[2][i] - vals[1][i]) / incr_val;
grad = (grad1 + grad2) / 2.0;
+ i++;
cgrad = gradient(cr, refine, refl, pmodel);
@@ -350,8 +352,6 @@ static double test_gradients(Crystal *cr, double incr_val, int refine,
}
- i++;
-
}
STATUS("%3s: %3i within 5%%, %3i outside, %3i nan, %3i invalid, "