aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-08-21 12:23:39 +0200
committerThomas White <taw@physics.org>2019-08-22 17:03:28 +0200
commit0b1db945a12c0e68491412baf322b761511eb016 (patch)
treec725147e0e1a68814c2eb24754847c2181402064 /src
parent5ab96056a6d1972a248abb154ea5df0ffda44d06 (diff)
Tidy up comparison function definitions
Especially, remove the last ltl/atl tolerance values.
Diffstat (limited to 'src')
-rw-r--r--src/cell_tool.c2
-rw-r--r--src/whirligig.c8
2 files changed, 7 insertions, 3 deletions
diff --git a/src/cell_tool.c b/src/cell_tool.c
index a1755f42..0942ca15 100644
--- a/src/cell_tool.c
+++ b/src/cell_tool.c
@@ -99,7 +99,7 @@ static int comparecells(UnitCell *cell, const char *comparecell,
tolerance[5] = atl;
STATUS("------------------> The comparison results:\n");
- if ( !compare_reindexed_cell_parameters(cell, cell2, tolerance, csl, &m) ) {
+ if ( !compare_derivative_cell_parameters(cell, cell2, tolerance, csl, &m) ) {
STATUS("No relationship found between lattices.\n");
return 0;
} else {
diff --git a/src/whirligig.c b/src/whirligig.c
index a144e769..fd94a0f2 100644
--- a/src/whirligig.c
+++ b/src/whirligig.c
@@ -297,6 +297,8 @@ static IntegerMatrix *try_all(struct window *win, int n1, int n2,
IntegerMatrix *m;
struct image *i1;
struct image *i2;
+ const double tols[] = {0.1, 0.1, 0.1,
+ deg2rad(5.0), deg2rad(5.0), deg2rad(5.0)};
assert(n1 >= 0);
assert(n2 >= 0);
@@ -311,7 +313,7 @@ static IntegerMatrix *try_all(struct window *win, int n1, int n2,
if ( compare_permuted_cell_parameters_and_orientation(crystal_get_cell(i1->crystals[i]),
crystal_get_cell(i2->crystals[j]),
- 0.1, deg2rad(5.0), &m) )
+ tols, &m) )
{
if ( !crystal_used(win, n1, i)
&& !crystal_used(win, n2, j) )
@@ -365,6 +367,8 @@ static int try_join(struct window *win, int sn)
Crystal *cr;
UnitCell *ref;
const int sp = win->join_ptr - 1;
+ const double tols[] = {0.1, 0.1, 0.1,
+ deg2rad(5.0), deg2rad(5.0), deg2rad(5.0)};
/* Get the appropriately transformed cell from the last crystal in this
* series */
@@ -375,7 +379,7 @@ static int try_join(struct window *win, int sn)
Crystal *cr2;
cr2 = win->img[win->join_ptr].crystals[j];
if ( compare_permuted_cell_parameters_and_orientation(ref, crystal_get_cell(cr2),
- 0.1, deg2rad(5.0),
+ tols,
&win->mat[sn][win->join_ptr]) )
{
win->ser[sn][win->join_ptr] = j;