ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/primitives/RigidBody.cpp
(Generate patch)

Comparing trunk/src/primitives/RigidBody.cpp (file contents):
Revision 642 by tim, Mon Oct 3 15:54:23 2005 UTC vs.
Revision 648 by tim, Wed Oct 5 19:35:28 2005 UTC

# Line 173 | Line 173 | namespace oopse {
173        IAtom(0, 0) += mtmp * r2;
174        IAtom(1, 1) += mtmp * r2;
175        IAtom(2, 2) += mtmp * r2;
176 +      Itmp += IAtom;
177  
178        //project the inertial moment of directional atoms into this rigid body
179        if (atoms_[i]->isDirectional()) {
179        IAtom += atoms_[i]->getI();
180        Itmp += refOrients_[i].transpose() * IAtom * refOrients_[i];
181      } else {
180          Itmp += IAtom;
181 <      }
181 >        Itmp += refOrients_[i].transpose() * atoms_[i]->getI() * refOrients_[i];
182 >      }
183      }
184  
185      //diagonalize

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines