diff options
author | Thomas White <taw@physics.org> | 2010-08-17 18:14:59 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:26:55 +0100 |
commit | 93aa7b124f6f971f253326f347d5104d96f14d6e (patch) | |
tree | 32744f1e4262e4e18cf826fe78ef9cb94310726f /src | |
parent | 0dcc9e2e1ea4fcbd37db5ab7ac74146098c2f4d7 (diff) |
Remove extraneous calculations and show cell representation in cell_print()
Diffstat (limited to 'src')
-rw-r--r-- | src/cell.c | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -462,12 +462,26 @@ const char *cell_get_pointgroup(UnitCell *cell) /********************************* Utilities **********************************/ +static const char *cell_rep(UnitCell *cell) +{ + switch ( cell->rep ) { + case CELL_REP_CRYST: + return "crystallographic, direct space"; + case CELL_REP_CART: + return "cartesian, direct space"; + case CELL_REP_RECIP: + return "cartesian, reciprocal space"; + } + + return "unknown"; +} + + void cell_print(UnitCell *cell) { double asx, asy, asz; double bsx, bsy, bsz; double csx, csy, csz; - double angles[3]; double a, b, c, alpha, beta, gamma; double ax, ay, az, bx, by, bz, cx, cy, cz; @@ -495,9 +509,7 @@ void cell_print(UnitCell *cell) STATUS("cstar = %10.3e %10.3e %10.3e m^-1 (modulus = %10.3e m^-1)\n", csx, csy, csz, modulus(csx, csy, csz)); - angles[0] = angle_between(bsx, bsy, bsz, csx, csy, csz); - angles[1] = angle_between(asx, asy, asz, csx, csy, csz); - angles[2] = angle_between(asx, asy, asz, bsx, bsy, bsz); + STATUS("Cell representation is %s.\n", cell_rep(cell)); } |