diff options
author | Tom White <weiss@jade.(none)> | 2008-09-24 21:04:02 +0100 |
---|---|---|
committer | Thomas White <taw27@cam.ac.uk> | 2008-10-02 17:54:49 +0100 |
commit | 346b9adf9a5f7dc8338bdf206042deb2816c255f (patch) | |
tree | 9684aed9878bfce10139d89aab24bc3bca805c40 | |
parent | 45cbdd538f68bc90814f0f2ba51c1026b2b29dc0 (diff) |
Debugging stuff
-rw-r--r-- | src/refine.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/refine.c b/src/refine.c index 599202b..20da997 100644 --- a/src/refine.c +++ b/src/refine.c @@ -36,7 +36,7 @@ #define NUM_PARAMS 9 /* Refine debug */ -#define REFINE_DEBUG 0 +#define REFINE_DEBUG 1 typedef struct { signed int h; signed int k; signed int l; @@ -247,6 +247,7 @@ double refine_do_cell(ControlContext *ctx) { devcell_try_best = malloc(sizeof(Basis)); for ( it=1; it<=10000; it++ ) { int found = 0; + if ( REFINE_DEBUG ) printf("Iteration %i starts at dev %14.12f\n", it, mean_dev/DISPFACTOR); for ( comp=0; comp<18; comp++ ) { memcpy(devcell_try, devcell, sizeof(Basis)); switch ( comp ) { @@ -270,6 +271,8 @@ double refine_do_cell(ControlContext *ctx) { case 17 : devcell_try->c.z -= 0.0001e9; break; } mean_dev_try = refine_mean_dev(d, nf, devcell_try); + if ( REFINE_DEBUG ) printf("Direction %2i, new dev=%14.12f (%+14.12f)\n", + comp, mean_dev_try/DISPFACTOR, (mean_dev_try-mean_dev)/DISPFACTOR); if ( mean_dev_try < mean_dev ) { mean_dev = mean_dev_try; memcpy(devcell_try_best, devcell_try, sizeof(Basis)); |