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

Comparing branches/development/src/brains/ForceManager.cpp (file contents):
Revision 1502 by gezelter, Tue Aug 10 18:34:59 2010 UTC vs.
Revision 1503 by gezelter, Sat Oct 2 19:54:41 2010 UTC

# Line 62 | Line 62 | namespace OpenMD {
62    
63    ForceManager::ForceManager(SimInfo * info) : info_(info),
64                                                 NBforcesInitialized_(false) {
65    lj_ = LJ::Instance();
66    lj_->setForceField(info_->getForceField());
67
68    gb_ = GB::Instance();
69    gb_->setForceField(info_->getForceField());
70
71    sticky_ = Sticky::Instance();
72    sticky_->setForceField(info_->getForceField());
73
74    eam_ = EAM::Instance();
75    eam_->setForceField(info_->getForceField());
76
77    sc_ = SC::Instance();
78    sc_->setForceField(info_->getForceField());
65    }
66  
67    void ForceManager::calcForces() {
# Line 294 | Line 280 | namespace OpenMD {
280      //initialize data before passing to fortran
281      RealType longRangePotential[LR_POT_TYPES];
282      RealType lrPot = 0.0;
297    Vector3d totalDipole;
283      int isError = 0;
284  
285      for (int i=0; i<LR_POT_TYPES;i++){
# Line 321 | Line 306 | namespace OpenMD {
306      for (int i=0; i<LR_POT_TYPES;i++){
307        lrPot += longRangePotential[i]; //Quick hack
308      }
309 <    
325 <    // grab the simulation box dipole moment if specified
326 <    if (info_->getCalcBoxDipole()){
327 <      getAccumulatedBoxDipole(totalDipole.getArrayPointer());
328 <      
329 <      curSnapshot->statData[Stats::BOX_DIPOLE_X] = totalDipole(0);
330 <      curSnapshot->statData[Stats::BOX_DIPOLE_Y] = totalDipole(1);
331 <      curSnapshot->statData[Stats::BOX_DIPOLE_Z] = totalDipole(2);
332 <    }
333 <    
309 >        
310      //store the tau and long range potential    
311      curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL] = lrPot;
312      curSnapshot->statData[Stats::VANDERWAALS_POTENTIAL] = longRangePotential[VDW_POT];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines