git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15559 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -1665,7 +1665,6 @@ void Group::inertia(int igroup, double *cm, double itensor[3][3], int iregion)
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
compute angular velocity omega from L and I
|
||||
diagonalize I instead of inverting it, to allow for a singular matrix
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Group::omega(double *angmom, double inertia[3][3], double *w)
|
||||
@ -1684,7 +1683,7 @@ void Group::omega(double *angmom, double inertia[3][3], double *w)
|
||||
|
||||
// non-singular I matrix
|
||||
// use L = Iw, inverting I to solve for w
|
||||
// this should give exact zeroing of omega by velocity command
|
||||
// this should give exact zeroing of angular momentum by velocity command
|
||||
|
||||
if (determinant > EPSILON) {
|
||||
|
||||
@ -1718,6 +1717,7 @@ void Group::omega(double *angmom, double inertia[3][3], double *w)
|
||||
// handle (nearly) singular I matrix
|
||||
// typically due to 2-atom group or linear molecule
|
||||
// use jacobi() and angmom_to_omega() to calculate valid omega
|
||||
// less exact answer than matrix inversion, due to iterative Jacobi method
|
||||
|
||||
} else {
|
||||
int ierror = MathExtra::jacobi(inertia,idiag,evectors);
|
||||
|
||||
Reference in New Issue
Block a user