diff options
author | Thomas White <taw@physics.org> | 2019-03-11 11:53:59 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-03-11 16:49:37 +0100 |
commit | c04d93ef0e6faf50ad243932da158239f83cc619 (patch) | |
tree | 1b2c758107e9ff6077fb0e76eefdf578ada3076a /libcrystfel/src/cell.c | |
parent | cb51ba0e53425ae663db313d730c1df644e4f76b (diff) |
Get rid of cell_transform_gsl_reciprocal()
It's confusing to have matrices acting on both real and reciprocal
vectors. Let's standardise instead on transformations always applying
to real-space cells.
It was only used in one place.
Diffstat (limited to 'libcrystfel/src/cell.c')
-rw-r--r-- | libcrystfel/src/cell.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/libcrystfel/src/cell.c b/libcrystfel/src/cell.c index 5e00ac9c..9ae77a6d 100644 --- a/libcrystfel/src/cell.c +++ b/libcrystfel/src/cell.c @@ -659,49 +659,6 @@ UnitCell *cell_transform_gsl_direct(UnitCell *in, gsl_matrix *m) } -UnitCell *cell_transform_gsl_reciprocal(UnitCell *in, gsl_matrix *m) -{ - gsl_matrix *c; - double asx, asy, asz; - double bsx, bsy, bsz; - double csx, csy, csz; - gsl_matrix *res; - UnitCell *out; - - cell_get_reciprocal(in, &asx, &asy, &asz, &bsx, &bsy, - &bsz, &csx, &csy, &csz); - - c = gsl_matrix_alloc(3, 3); - gsl_matrix_set(c, 0, 0, asx); - gsl_matrix_set(c, 1, 0, asy); - gsl_matrix_set(c, 2, 0, asz); - gsl_matrix_set(c, 0, 1, bsx); - gsl_matrix_set(c, 1, 1, bsy); - gsl_matrix_set(c, 2, 1, bsz); - gsl_matrix_set(c, 0, 2, csx); - gsl_matrix_set(c, 1, 2, csy); - gsl_matrix_set(c, 2, 2, csz); - - res = gsl_matrix_calloc(3, 3); - gsl_blas_dgemm(CblasNoTrans, CblasNoTrans, 1.0, c, m, 0.0, res); - - out = cell_new_from_cell(in); - cell_set_reciprocal(out, gsl_matrix_get(res, 0, 0), - gsl_matrix_get(res, 1, 0), - gsl_matrix_get(res, 2, 0), - gsl_matrix_get(res, 0, 1), - gsl_matrix_get(res, 1, 1), - gsl_matrix_get(res, 2, 1), - gsl_matrix_get(res, 0, 2), - gsl_matrix_get(res, 1, 2), - gsl_matrix_get(res, 2, 2)); - - gsl_matrix_free(res); - gsl_matrix_free(c); - return out; -} - - static int centering_has_point(char cen, Rational *p) { /* First, put the point into the range 0..1 */ |