From 2d3209e0ad03ea6bc72a91f0bf34c7d5a3ba3732 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 8 Mar 2013 15:05:52 +0100 Subject: pr_gradient_check: Make sure list index keeps step with reflection list --- tests/pr_gradient_check.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') 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, " -- cgit v1.2.3