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 1723 by gezelter, Thu May 24 20:59:54 2012 UTC vs.
Revision 1749 by gezelter, Thu Jun 7 02:47:21 2012 UTC

# Line 475 | Line 475 | namespace OpenMD {
475      // Zero out the stress tensor
476      stressTensor *= 0.0;
477      // Zero out the heatFlux
478 <    fDecomp_->setHeatFlux( V3Zero );    
478 >    fDecomp_->setHeatFlux( Vector3d(0.0) );    
479    }
480    
481    void ForceManager::shortRangeInteractions() {
# Line 644 | Line 644 | namespace OpenMD {
644      RealType mf;
645      RealType lrPot;
646      RealType vpair;
647 +    RealType dVdFQ1(0.0);
648 +    RealType dVdFQ2(0.0);
649      potVec longRangePotential(0.0);
650      potVec workPot(0.0);
651      vector<int>::iterator ia, jb;
# Line 655 | Line 657 | namespace OpenMD {
657      idat.pot = &workPot;
658      sdat.pot = fDecomp_->getEmbeddingPotential();
659      idat.vpair = &vpair;
660 +    idat.dVdFQ1 = &dVdFQ1;
661 +    idat.dVdFQ2 = &dVdFQ2;
662      idat.f1 = &f1;
663      idat.sw = &sw;
664      idat.shiftedPot = (cutoffMethod_ == SHIFTED_POTENTIAL) ? true : false;
# Line 668 | Line 672 | namespace OpenMD {
672      } else {
673        loopStart = PAIR_LOOP;
674      }
671  
675      for (int iLoop = loopStart; iLoop <= loopEnd; iLoop++) {
676      
677        if (iLoop == loopStart) {
# Line 700 | Line 703 | namespace OpenMD {
703            
704            in_switching_region = switcher_->getSwitch(rgrpsq, sw, dswdr,
705                                                       rgrp);
703          
706            atomListRow = fDecomp_->getAtomsInGroupRow(cg1);
707            atomListColumn = fDecomp_->getAtomsInGroupColumn(cg2);
708  
709            if (doHeatFlux_)
710              gvel2 = fDecomp_->getGroupVelocityColumn(cg2);
711 <        
711 >
712            for (ia = atomListRow.begin();
713                 ia != atomListRow.end(); ++ia) {            
714              atom1 = (*ia);
715 <            
715 >
716              for (jb = atomListColumn.begin();
717                   jb != atomListColumn.end(); ++jb) {              
718                atom2 = (*jb);
# Line 719 | Line 721 | namespace OpenMD {
721                  vpair = 0.0;
722                  workPot = 0.0;
723                  f1 = V3Zero;
724 +                dVdFQ1 = 0.0;
725 +                dVdFQ2 = 0.0;
726  
727                  fDecomp_->fillInteractionData(idat, atom1, atom2);
728 <                
728 >
729                  topoDist = fDecomp_->getTopologicalDistance(atom1, atom2);
730                  vdwMult = vdwScale_[topoDist];
731                  electroMult = electrostaticScale_[topoDist];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines