l2d unit cell area calculation
Former-commit-id: e714f4fb33669138cb45179f323893b3e996fd78
This commit is contained in:
parent
8ce2956911
commit
f3e1e70b62
|
@ -315,6 +315,7 @@ int l2d_cellCornersWS_arr(cart2_t i1, cart2_t i2, cart2_t *oarr, double rtol);
|
||||||
int l2d_reciprocalBasis1(cart2_t b1, cart2_t b2, cart2_t *rb1, cart2_t *rb2);
|
int l2d_reciprocalBasis1(cart2_t b1, cart2_t b2, cart2_t *rb1, cart2_t *rb2);
|
||||||
int l2d_reciprocalBasis2pi(cart2_t b1, cart2_t b2, cart2_t *rb1, cart2_t *rb2);
|
int l2d_reciprocalBasis2pi(cart2_t b1, cart2_t b2, cart2_t *rb1, cart2_t *rb2);
|
||||||
|
|
||||||
|
double l2d_unitcell_area(cart2_t b1, cart2_t b2);
|
||||||
|
|
||||||
// returns the radius of inscribed circle of a hexagon (or rectangle/square if applicable) created by the shortest base triple
|
// returns the radius of inscribed circle of a hexagon (or rectangle/square if applicable) created by the shortest base triple
|
||||||
double l2d_hexWebInCircleRadius(cart2_t b1, cart2_t b2);
|
double l2d_hexWebInCircleRadius(cart2_t b1, cart2_t b2);
|
||||||
|
|
|
@ -827,5 +827,11 @@ double l2d_hexWebInCircleRadius(cart2_t i1, cart2_t i2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
double l2d_unitcell_area(cart2_t b1, cart2_t b2) {
|
||||||
|
l2d_reduceBasis(b1, b2, &b1, &b2);
|
||||||
|
const double det = b1.x * b2.y - b1.y * b2.x;
|
||||||
|
return fabs(det);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue