aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-08-16 10:21:30 +0200
committerThomas White <taw@physics.org>2019-08-22 17:03:28 +0200
commit29cce73cf8b97dc7e58ebc94e5ddc42a70c98233 (patch)
treee8e0d980287eddd4ce38f071d31983964c7827de /tests
parent0b8430c5401803690c8ca659b533d0b1d3b022e0 (diff)
Determine cell reduction tolerance automatically
Diffstat (limited to 'tests')
-rw-r--r--tests/cellcompare_check.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/cellcompare_check.c b/tests/cellcompare_check.c
index d0f51da5..f5787753 100644
--- a/tests/cellcompare_check.c
+++ b/tests/cellcompare_check.c
@@ -207,7 +207,7 @@ static void yaro_test()
}
-extern IntegerMatrix *reduce_g6(struct g6 g, double eps);
+extern IntegerMatrix *reduce_g6(struct g6 g, double epsrel);
int main(int argc, char *argv[])
{
@@ -232,12 +232,9 @@ int main(int argc, char *argv[])
cell_print(cref);
struct g6 g;
g = cell_get_G6(cref);
- double eps = pow(cell_get_volume(cref), 1.0/3.0) * 1e-5;
- eps = eps*eps;
- //eps *= 100;
- //g.A = 9.0e-20; g.B = 27.0e-20; g.C = 4.0e-20;
- //g.D = -5.0e-20; g.E = -4.0e-20; g.F = -22.0e-20;
- IntegerMatrix *M = reduce_g6(g, eps);
+ g.A = 9.0e-20; g.B = 27.0e-20; g.C = 4.0e-20;
+ g.D = -5.0e-20; g.E = -4.0e-20; g.F = -22.0e-20;
+ IntegerMatrix *M = reduce_g6(g, 1e-5);
STATUS("The transformation to reduce:\n");
intmat_print(M);
STATUS("The reduced cell:\n");