ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/primitives/Molecule.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/primitives/Molecule.cpp (file contents):
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
Revision 2759 by tim, Wed May 17 21:51:42 2006 UTC

# Line 166 | Line 166 | namespace oopse {
166      //integrableObjects_.insert(integrableObjects_.end(), rigidBodies_.begin(), rigidBodies_.end());
167    }
168  
169 <  double Molecule::getMass() {
169 >  RealType Molecule::getMass() {
170      StuntDouble* sd;
171      std::vector<StuntDouble*>::iterator i;
172 <    double mass = 0.0;
172 >    RealType mass = 0.0;
173  
174      for (sd = beginIntegrableObject(i); sd != NULL; sd = nextIntegrableObject(i)){
175        mass += sd->getMass();
# Line 183 | Line 183 | namespace oopse {
183      StuntDouble* sd;
184      std::vector<StuntDouble*>::iterator i;
185      Vector3d com;
186 <    double totalMass = 0;
187 <    double mass;
186 >    RealType totalMass = 0;
187 >    RealType mass;
188      
189      for (sd = beginIntegrableObject(i); sd != NULL; sd = nextIntegrableObject(i)){
190        mass = sd->getMass();
# Line 211 | Line 211 | namespace oopse {
211      StuntDouble* sd;
212      std::vector<StuntDouble*>::iterator i;
213      Vector3d velCom;
214 <    double totalMass = 0;
215 <    double mass;
214 >    RealType totalMass = 0;
215 >    RealType mass;
216      
217      for (sd = beginIntegrableObject(i); sd != NULL; sd = nextIntegrableObject(i)){
218        mass = sd->getMass();
# Line 225 | Line 225 | namespace oopse {
225      return velCom;
226    }
227  
228 <  double Molecule::getPotential() {
228 >  RealType Molecule::getPotential() {
229  
230      Bond* bond;
231      Bend* bend;
# Line 234 | Line 234 | namespace oopse {
234      Molecule::BendIterator  bendIter;
235      Molecule::TorsionIterator  torsionIter;
236  
237 <    double potential = 0.0;
237 >    RealType potential = 0.0;
238  
239      for (bond = beginBond(bondIter); bond != NULL; bond = nextBond(bondIter)) {
240        potential += bond->getPotential();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines