diff options
author | Thomas White <taw@physics.org> | 2013-03-08 15:05:52 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2013-04-17 17:33:48 +0200 |
commit | 2d3209e0ad03ea6bc72a91f0bf34c7d5a3ba3732 (patch) | |
tree | 4a8133901c29c2894f4a29d80a33b2ad282d6959 | |
parent | 803336b21468042f64c27ca262248755e5ea77b9 (diff) |
pr_gradient_check: Make sure list index keeps step with reflection list
-rw-r--r-- | tests/pr_gradient_check.c | 4 |
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, " |