ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-2.0/src/primitives/RigidBody.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-2.0/src/primitives/RigidBody.cpp (file contents):
Revision 1869 by tim, Thu Dec 2 05:04:20 2004 UTC vs.
Revision 1870 by tim, Thu Dec 9 15:45:21 2004 UTC

# Line 192 | Line 192 | void  RigidBody::calcForcesAndTorques() {
192   }
193  
194   void  RigidBody::calcForcesAndTorques() {
195    unsigned int i;
196    unsigned int j;
195      Vector3d afrc;
196      Vector3d atrq;
197 +    Vector3d apos;
198      Vector3d rpos;
199 <    Vector3d frc;
200 <    Vector3d trq;
201 <
202 <
204 <    zeroForces();
205 <    
206 <    frc = getFrc();
207 <    trq = getTrq();
199 >    Vector3d frc(0.0);
200 >    Vector3d trq(0.0);
201 >    Vector3d pos = this->getPos();
202 >    for (int i = 0; i < atoms_.size(); i++) {
203  
209    for (i = 0; i < atoms_.size(); i++) {
210
204          afrc = atoms_[i]->getFrc();
205 <
206 <        rpos = refCoords_[i];
205 >        apos = atoms_[i]->getPos();
206 >        rpos = apos - pos;
207          
208          frc += afrc;
209  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines