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

Comparing trunk/src/integrators/LDForceManager.cpp (file contents):
Revision 983 by gezelter, Tue Jun 6 17:43:28 2006 UTC vs.
Revision 1126 by gezelter, Fri Apr 6 21:53:43 2007 UTC

# Line 39 | Line 39
39   * such damages.
40   */
41   #include <fstream>
42 + #include <iostream>
43   #include "integrators/LDForceManager.hpp"
44   #include "math/CholeskyDecomposition.hpp"
45   #include "utils/OOPSEConstant.hpp"
# Line 246 | Line 247 | namespace oopse {
247      return props;
248    }
249    
250 <  void LDForceManager::postCalculation() {
250 >  void LDForceManager::postCalculation(bool needStress){
251      SimInfo::MoleculeIterator i;
252      Molecule::IntegrableObjectIterator  j;
253      Molecule* mol;
# Line 263 | Line 264 | namespace oopse {
264      bool doLangevinForces;
265      bool freezeMolecule;
266      int fdf;
267 <
267 >    int nIntegrated;
268 >    int nFrozen;
269  
270      fdf = 0;
271 +
272      for (mol = info_->beginMolecule(i); mol != NULL; mol = info_->nextMolecule(i)) {
273  
274        doLangevinForces = true;          
# Line 275 | Line 278 | namespace oopse {
278          
279          Vector3d molPos = mol->getCom();
280          RealType molRad = molPos.length();
281 <        
281 >
282          doLangevinForces = false;
283          
284          if (molRad > langevinBufferRadius_) {
# Line 294 | Line 297 | namespace oopse {
297          if (freezeMolecule)
298            fdf += integrableObject->freeze();
299          
300 <        if (doLangevinForces) {          
300 >        if (doLangevinForces) {  
301            vel =integrableObject->getVel();
302            if (integrableObject->isDirectional()){
303              //calculate angular velocity in lab frame
# Line 352 | Line 355 | namespace oopse {
355      
356        }
357      }    
355    info_->setFdf(fdf);
358  
359 +    info_->setFdf(fdf);
360      veloMunge->removeComDrift();
361      // Remove angular drift if we are not using periodic boundary conditions.
362      if(!simParams->getUsePeriodicBoundaryConditions())
363        veloMunge->removeAngularDrift();
364  
365 <    ForceManager::postCalculation();  
365 >    ForceManager::postCalculation(needStress);  
366    }
367  
368   void LDForceManager::genRandomForceAndTorque(Vector3d& force, Vector3d& torque, unsigned int index, RealType variance) {
# Line 367 | Line 370 | void LDForceManager::genRandomForceAndTorque(Vector3d&
370  
371      Vector<RealType, 6> Z;
372      Vector<RealType, 6> generalForce;
370
373          
374      Z[0] = randNumGen_.randNorm(0, variance);
375      Z[1] = randNumGen_.randNorm(0, variance);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines