aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/cell-utils.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-08-16 10:22:59 +0200
committerThomas White <taw@physics.org>2019-08-22 17:03:28 +0200
commit5ab96056a6d1972a248abb154ea5df0ffda44d06 (patch)
tree6109f459ec7395a182ff78edfa95f298d54f8c28 /libcrystfel/src/cell-utils.c
parent29cce73cf8b97dc7e58ebc94e5ddc42a70c98233 (diff)
Clean up / debug
Diffstat (limited to 'libcrystfel/src/cell-utils.c')
-rw-r--r--libcrystfel/src/cell-utils.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c
index 5937a9c6..097ee463 100644
--- a/libcrystfel/src/cell-utils.c
+++ b/libcrystfel/src/cell-utils.c
@@ -2358,7 +2358,7 @@ IntegerMatrix *reduce_g6(struct g6 g, double epsrel)
g.D = -2*s*g.B + g.D;
g.E = g.E - s*g.F;
- STATUS("R5\n");
+ STATUS("step 5\n");
} else if ( GT(fabs(g.E), g.A)
|| (EQ(g.A, g.E) && LT(2.0*g.D, g.F))
@@ -2377,7 +2377,7 @@ IntegerMatrix *reduce_g6(struct g6 g, double epsrel)
g.D = g.D - s*g.F;
g.E = -2*s*g.A + g.E;
- STATUS("R6\n");
+ STATUS("step 6\n");
} else if ( GT(fabs(g.F), g.A)
|| (EQ(g.A, g.F) && LT(2.0*g.D, g.E))
@@ -2396,7 +2396,7 @@ IntegerMatrix *reduce_g6(struct g6 g, double epsrel)
g.D = g.D - s*g.E;
g.F = -2*s*g.A + g.F;
- STATUS("R7\n");
+ STATUS("step 7\n");
} else if ( LT(g.A+g.B+g.C+g.D+g.E+g.F, 0.0)
|| ( (EQ(g.A+g.B+g.C+g.D+g.E+g.F, 0.0)
@@ -2413,7 +2413,7 @@ IntegerMatrix *reduce_g6(struct g6 g, double epsrel)
g.D = 2.0*g.B + g.D + g.F;
g.E = 2.0*g.A + g.E + g.F;
- STATUS("R8\n");
+ STATUS("step 8\n");
} else {
finished = 1;
@@ -2423,6 +2423,9 @@ IntegerMatrix *reduce_g6(struct g6 g, double epsrel)
debug_lattice(g, eps);
+ assert(is_burger(g, eps));
+ assert(is_niggli(g, eps));
+
intmat_free(M);
return T;
}
@@ -2458,7 +2461,6 @@ int compare_lattices(UnitCell *cell_in, UnitCell *reference_in,
RationalMatrix *CB;
IntegerMatrix *Mcell;
IntegerMatrix *Mref;
- double eps;
struct g6 g6cell;
struct g6 g6ref;
@@ -2481,6 +2483,7 @@ int compare_lattices(UnitCell *cell_in, UnitCell *reference_in,
/* Compare cells (including nearby ones, possibly permuting
* axes if close to equality) */
+ STATUS("Reduced cell:\n");
intmat_free(Mcell);
intmat_free(Mref);