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 507 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
Revision 641 by tim, Mon Oct 3 14:31:31 2005 UTC

# Line 178 | Line 178 | namespace oopse {
178      //project the inertial moment of directional atoms into this rigid body
179      for (std::size_t i = 0; i < atoms_.size(); i++) {
180        if (atoms_[i]->isDirectional()) {
181 <        RectMatrix<double, 3, 3> Iproject = refOrients_[i].transpose() * atoms_[i]->getI();
182 <        Itmp(0, 0) += Iproject(0, 0);
183 <        Itmp(1, 1) += Iproject(1, 1);
184 <        Itmp(2, 2) += Iproject(2, 2);
181 >            Itmp += refOrients_[i].transpose() * atoms_[i]->getI() * refOrients_[i];
182        }
183      }
184  
# Line 273 | Line 270 | namespace oopse {
270        if (atoms_[i]->isDirectional()) {
271            
272          dAtom = (DirectionalAtom *) atoms_[i];
273 <        dAtom->setA(a * refOrients_[i]);
277 <        //dAtom->rotateBy( A );      
273 >        dAtom->setA(refOrients_[i] * a);
274        }
275  
276      }
# Line 301 | Line 297 | namespace oopse {
297        if (atoms_[i]->isDirectional()) {
298            
299          dAtom = (DirectionalAtom *) atoms_[i];
300 <        dAtom->setA(a * refOrients_[i], frame);
300 >        dAtom->setA(refOrients_[i] * a, frame);
301        }
302  
303      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines