aboutsummaryrefslogtreecommitdiff
path: root/src/post-refinement.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/post-refinement.c')
-rw-r--r--src/post-refinement.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c
index 318d1733..da3f6683 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -294,6 +294,11 @@ static double residual_f(const gsl_vector *v, void *pp)
struct image im;
Crystal *cr;
double res;
+ int i;
+
+ for ( i=0; i<v->size; i++ ) {
+ if ( gsl_vector_get(v, i) > 100.0 ) return INFINITY;
+ }
cr = crystal_copy(pv->cr);
im = *crystal_get_image(cr);