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

Comparing branches/development/src/parallel/ForceDecomposition.cpp (file contents):
Revision 1576 by gezelter, Wed Jun 8 16:05:07 2011 UTC vs.
Revision 1629 by gezelter, Wed Sep 14 21:15:17 2011 UTC

# Line 47 | Line 47 | namespace OpenMD {
47   using namespace std;
48   namespace OpenMD {
49  
50 <  ForceDecomposition::ForceDecomposition(SimInfo* info) : info_(info) {
50 >  ForceDecomposition::ForceDecomposition(SimInfo* info, InteractionManager* iMan) : info_(info), interactionMan_(iMan) {
51      sman_ = info_->getSnapshotManager();
52      storageLayout_ = sman_->getStorageLayout();
53      ff_ = info_->getForceField();
# Line 87 | Line 87 | namespace OpenMD {
87      cellOffsets_.push_back( Vector3i(1, -1,1) );
88    }
89  
90 <  SelfData ForceDecomposition::fillSelfData(int atom1) {
91 <    SelfData sdat;
92 <    // Still Missing atype, skippedCharge, potVec pot,
90 >  void ForceDecomposition::fillSelfData(SelfData &sdat, int atom1) {
91 >
92 >    sdat.atype = atypesLocal[atom1];
93 >
94 >    sdat.pot = &embeddingPot;
95 >
96      if (storageLayout_ & DataStorage::dslElectroFrame) {
97        sdat.eFrame = &(snap_->atomData.electroFrame[atom1]);
98      }
# Line 110 | Line 113 | namespace OpenMD {
113        sdat.dfrhodrho = &(snap_->atomData.functionalDerivative[atom1]);
114      }
115  
116 +    if (storageLayout_ & DataStorage::dslSkippedCharge) {
117 +      sdat.skippedCharge = &(snap_->atomData.skippedCharge[atom1]);
118 +    }
119 +
120      if (storageLayout_ & DataStorage::dslParticlePot) {
121        sdat.particlePot = &(snap_->atomData.particlePot[atom1]);
122      }
116
117    return sdat;    
123    }
124  
125    bool ForceDecomposition::checkNeighborList() {
# Line 142 | Line 147 | namespace OpenMD {
147      // a conservative test of list skin crossings
148      dispmax = 2.0 * sqrt (3.0 * dispmax * dispmax);
149  
150 <    return (dispmax > skinThickness_);    
150 >
151 >    if (dispmax > skinThickness_)
152 >      return (dispmax > skinThickness_);  
153 >
154 >    return false;
155    }
156   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines