more Voigt clarifications
This commit is contained in:
@ -539,7 +539,7 @@ void AtomVecTri::data_atom_bonus(int m, char **values)
|
|||||||
double area = 0.5 * MathExtra::len3(norm);
|
double area = 0.5 * MathExtra::len3(norm);
|
||||||
rmass[m] *= area;
|
rmass[m] *= area;
|
||||||
|
|
||||||
// inertia = inertia tensor of triangle as 6-vector in Voigt notation
|
// inertia = inertia tensor of triangle as 6-vector in Voigt ordering
|
||||||
|
|
||||||
double inertia[6];
|
double inertia[6];
|
||||||
MathExtra::inertia_triangle(c1,c2,c3,rmass[m],inertia);
|
MathExtra::inertia_triangle(c1,c2,c3,rmass[m],inertia);
|
||||||
|
|||||||
@ -75,7 +75,7 @@ class Domain : protected Pointers {
|
|||||||
|
|
||||||
// triclinic box
|
// triclinic box
|
||||||
double xy,xz,yz; // 3 tilt factors
|
double xy,xz,yz; // 3 tilt factors
|
||||||
double h[6],h_inv[6]; // shape matrix in Voigt notation
|
double h[6],h_inv[6]; // shape matrix in Voigt ordering
|
||||||
// Voigt = xx,yy,zz,yz,xz,xy
|
// Voigt = xx,yy,zz,yz,xz,xy
|
||||||
double h_rate[6],h_ratelo[3]; // rate of box size/shape change
|
double h_rate[6],h_ratelo[3]; // rate of box size/shape change
|
||||||
|
|
||||||
|
|||||||
@ -396,7 +396,7 @@ void quat_to_mat_trans(const double *quat, double mat[3][3])
|
|||||||
compute space-frame inertia tensor of an ellipsoid
|
compute space-frame inertia tensor of an ellipsoid
|
||||||
radii = 3 radii of ellipsoid
|
radii = 3 radii of ellipsoid
|
||||||
quat = orientiation quaternion of ellipsoid
|
quat = orientiation quaternion of ellipsoid
|
||||||
return symmetric inertia tensor as 6-vector in Voigt notation
|
return symmetric inertia tensor as 6-vector in Voigt ordering
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void inertia_ellipsoid(double *radii, double *quat, double mass,
|
void inertia_ellipsoid(double *radii, double *quat, double mass,
|
||||||
@ -424,7 +424,7 @@ void inertia_ellipsoid(double *radii, double *quat, double mass,
|
|||||||
compute space-frame inertia tensor of a line segment in 2d
|
compute space-frame inertia tensor of a line segment in 2d
|
||||||
length = length of line
|
length = length of line
|
||||||
theta = orientiation of line
|
theta = orientiation of line
|
||||||
return symmetric inertia tensor as 6-vector in Voigt notation
|
return symmetric inertia tensor as 6-vector in Voigt ordering
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void inertia_line(double length, double theta, double mass, double *inertia)
|
void inertia_line(double length, double theta, double mass, double *inertia)
|
||||||
@ -462,7 +462,7 @@ void inertia_line(double length, double theta, double mass, double *inertia)
|
|||||||
S = 1/24 [2 1 1]
|
S = 1/24 [2 1 1]
|
||||||
[1 2 1]
|
[1 2 1]
|
||||||
[1 1 2]
|
[1 1 2]
|
||||||
return symmetric inertia tensor as 6-vector in Voigt notation
|
return symmetric inertia tensor as 6-vector in Voigt ordering
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void inertia_triangle(double *v0, double *v1, double *v2,
|
void inertia_triangle(double *v0, double *v1, double *v2,
|
||||||
@ -503,7 +503,7 @@ void inertia_triangle(double *v0, double *v1, double *v2,
|
|||||||
compute space-frame inertia tensor of a triangle
|
compute space-frame inertia tensor of a triangle
|
||||||
idiag = previously computed diagonal inertia tensor
|
idiag = previously computed diagonal inertia tensor
|
||||||
quat = orientiation quaternion of triangle
|
quat = orientiation quaternion of triangle
|
||||||
return symmetric inertia tensor as 6-vector in Voigt notation
|
return symmetric inertia tensor as 6-vector in Voigt ordering
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void inertia_triangle(double *idiag, double *quat, double /*mass*/,
|
void inertia_triangle(double *idiag, double *quat, double /*mass*/,
|
||||||
|
|||||||
@ -95,7 +95,7 @@ namespace MathExtra {
|
|||||||
double dt);
|
double dt);
|
||||||
|
|
||||||
// shape matrix operations
|
// shape matrix operations
|
||||||
// upper-triangular 3x3 matrix stored in Voigt notation as 6-vector
|
// upper-triangular 3x3 matrix stored in Voigt ordering as 6-vector
|
||||||
|
|
||||||
inline void multiply_shape_shape(const double *one, const double *two,
|
inline void multiply_shape_shape(const double *one, const double *two,
|
||||||
double *ans);
|
double *ans);
|
||||||
@ -593,7 +593,7 @@ inline void MathExtra::scalar_times3(const double f, double m[3][3])
|
|||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
multiply 2 shape matrices
|
multiply 2 shape matrices
|
||||||
upper-triangular 3x3, stored as 6-vector in Voigt notation
|
upper-triangular 3x3, stored as 6-vector in Voigt ordering
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
inline void MathExtra::multiply_shape_shape(const double *one,
|
inline void MathExtra::multiply_shape_shape(const double *one,
|
||||||
|
|||||||
Reference in New Issue
Block a user