diff options
Diffstat (limited to 'tests/centering_check.c')
-rw-r--r-- | tests/centering_check.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/centering_check.c b/tests/centering_check.c index 887311dd..cc553dd0 100644 --- a/tests/centering_check.c +++ b/tests/centering_check.c @@ -61,7 +61,8 @@ static int check_centering(double a, double b, double c, { UnitCell *cell, *cref; UnitCell *n; - UnitCellTransformation *t; + IntegerMatrix *C; + RationalMatrix *Ci; int fail = 0; int i; double asx, asy, asz; @@ -86,14 +87,19 @@ static int check_centering(double a, double b, double c, cell_free(cref); check_cell(cell, "Input"); - n = uncenter_cell(cell, &t); + n = uncenter_cell(cell, &C, &Ci); if ( n != NULL ) { - STATUS("Transformation was:\n"); - tfn_print(t); + STATUS("The back transformation is:\n"); + intmat_print(C); if ( check_cell(n, "Output") ) fail = 1; - if ( !fail ) cell_print(n); + if ( intmat_is_identity(C) && ((cen=='P') || (cen=='R')) ) { + STATUS("Identity, as expected.\n"); + } else { + cell_print(n); + } } else { - fail = 1; + STATUS("************* Could not uncenter.\n"); + return 1; } cell_get_reciprocal(cell, &asx, &asy, &asz, @@ -299,10 +305,6 @@ int main(int argc, char *argv[]) fail += check_centering(20e-10, 20e-10, 40e-10, 90.0, 90.0, 120.0, L_HEXAGONAL, 'H', 'c', rng); - /* Cubic P */ - fail += check_centering(30e-10, 30e-10, 30e-10, 90.0, 90.0, 90.0, - L_CUBIC, 'P', '*', rng); - /* Cubic I */ fail += check_centering(30e-10, 30e-10, 30e-10, 90.0, 90.0, 90.0, L_CUBIC, 'I', '*', rng); |