ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/brains/ForceManager.cpp
(Generate patch)

Comparing trunk/src/brains/ForceManager.cpp (file contents):
Revision 963 by tim, Wed May 17 21:51:42 2006 UTC vs.
Revision 998 by chrisfen, Mon Jul 3 13:18:43 2006 UTC

# Line 274 | Line 274 | namespace oopse {
274      //initialize data before passing to fortran
275      RealType longRangePotential[LR_POT_TYPES];
276      RealType lrPot = 0.0;
277 <    
277 >    Vector3d totalDipole;
278      Mat3x3d tau;
279      short int passedCalcPot = needPotential;
280      short int passedCalcStress = needStress;
# Line 305 | Line 305 | namespace oopse {
305      for (int i=0; i<LR_POT_TYPES;i++){
306        lrPot += longRangePotential[i]; //Quick hack
307      }
308 +
309 +    // grab the simulation box dipole moment if specified
310 +    if (info_->getCalcBoxDipole()){
311 +      getAccumulatedBoxDipole(totalDipole.getArrayPointer());
312  
313 +      curSnapshot->statData[Stats::BOX_DIPOLE_X] = totalDipole(0);
314 +      curSnapshot->statData[Stats::BOX_DIPOLE_Y] = totalDipole(1);
315 +      curSnapshot->statData[Stats::BOX_DIPOLE_Z] = totalDipole(2);
316 +    }
317 +
318      //store the tau and long range potential    
319      curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL] = lrPot;
320      curSnapshot->statData[Stats::VANDERWAALS_POTENTIAL] = longRangePotential[VDW_POT];
# Line 326 | Line 335 | namespace oopse {
335        for (rb = mol->beginRigidBody(rbIter); rb != NULL; rb = mol->nextRigidBody(rbIter)) {
336          rb->calcForcesAndTorques();
337        }
338 <    }
338 >    }    
339  
340    }
341  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines