aboutsummaryrefslogtreecommitdiff
path: root/src/post-refinement.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-08-09 17:52:36 +0200
committerThomas White <taw@physics.org>2013-08-12 10:38:19 +0200
commitecfe23ca70540e2f8ee6efb600c7b577d95f236f (patch)
tree28392b1652b7939c5c385a3d057a1f5d31f05024 /src/post-refinement.c
parent9f48b5952cd894ae44cff93a2451963418cd15d3 (diff)
Improve show_matrix_eqn()
Diffstat (limited to 'src/post-refinement.c')
-rw-r--r--src/post-refinement.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c
index 628e33d2..94c8a816 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -361,7 +361,8 @@ static int check_eigen(gsl_vector *e_val)
}
-static gsl_vector *solve_svd(gsl_vector *v, gsl_matrix *M, int *n_filt)
+static gsl_vector *solve_svd(gsl_vector *v, gsl_matrix *M, int *n_filt,
+ int verbose)
{
gsl_matrix *s_vec;
gsl_vector *s_val;
@@ -452,6 +453,7 @@ static double pr_iterate(Crystal *cr, const RefList *full,
RefList *reflections;
double max_shift;
int nref = 0;
+ const int verbose = 1;
reflections = crystal_get_reflections(cr);
@@ -533,7 +535,7 @@ static double pr_iterate(Crystal *cr, const RefList *full,
nref++;
}
- //show_matrix_eqn(M, v, NUM_PARAMS);
+ if ( verbose ) show_matrix_eqn(M, v);
//STATUS("%i reflections went into the equations.\n", nref);
if ( nref == 0 ) {
@@ -544,7 +546,7 @@ static double pr_iterate(Crystal *cr, const RefList *full,
}
max_shift = 0.0;
- shifts = solve_svd(v, M, &prdata->n_filtered);
+ shifts = solve_svd(v, M, &prdata->n_filtered, verbose);
if ( shifts != NULL ) {
for ( param=0; param<NUM_PARAMS; param++ ) {