aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-02-23 17:21:13 +0100
committerThomas White <taw@physics.org>2018-02-27 17:12:41 +0100
commitdf2d5a6e4cb888b81c0a0869e7927e8db9b3621d (patch)
tree2a37f83eb4fab73f34612e6019ac2d7e92c7d9fd
parentaf6049b9a7f51835d8ad2b1cbb4576f2cb6f0adc (diff)
Record residuals before and after refinement
-rw-r--r--src/post-refinement.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c
index ef8ae844..9369cfe9 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -365,11 +365,14 @@ static void do_pr_refine(Crystal *cr, const RefList *full,
int n_iter = 0;
int status;
double ang1, ang2;
+ double residual_start, residual_free_start;
+
+ residual_start = residual(cr, full, 0, NULL, NULL);
+ residual_free_start = residual(cr, full, 1, NULL, NULL);
if ( verbose ) {
STATUS("\nPR initial: dev = %10.5e, free dev = %10.5e\n",
- residual(cr, full, 0, NULL, NULL),
- residual(cr, full, 1, NULL, NULL));
+ residual_start, residual_free_start);
}
/* The parameters to be refined */