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 899 by tim, Wed Mar 15 17:35:12 2006 UTC vs.
Revision 963 by tim, Wed May 17 21:51:42 2006 UTC

# Line 87 | Line 87 | namespace oopse {
87      return inertiaTensor_;
88    }    
89  
90 <  std::vector<double> RigidBody::getGrad() {
91 <    std::vector<double> grad(6, 0.0);
90 >  std::vector<RealType> RigidBody::getGrad() {
91 >    std::vector<RealType> grad(6, 0.0);
92      Vector3d force;
93      Vector3d torque;
94      Vector3d myEuler;
95 <    double phi, theta, psi;
96 <    double cphi, sphi, ctheta, stheta;
95 >    RealType phi, theta, psi;
96 >    RealType cphi, sphi, ctheta, stheta;
97      Vector3d ephi;
98      Vector3d etheta;
99      Vector3d epsi;
# Line 146 | Line 146 | namespace oopse {
146  
147    /**@todo need modification */
148    void  RigidBody::calcRefCoords() {
149 <    double mtmp;
149 >    RealType mtmp;
150      Vector3d refCOM(0.0);
151      mass_ = 0.0;
152      for (std::size_t i = 0; i < atoms_.size(); ++i) {
# Line 167 | Line 167 | namespace oopse {
167        Mat3x3d IAtom(0.0);  
168        mtmp = atoms_[i]->getMass();
169        IAtom -= outProduct(refCoords_[i], refCoords_[i]) * mtmp;
170 <      double r2 = refCoords_[i].lengthSquare();
170 >      RealType r2 = refCoords_[i].lengthSquare();
171        IAtom(0, 0) += mtmp * r2;
172        IAtom(1, 1) += mtmp * r2;
173        IAtom(2, 2) += mtmp * r2;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines