ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/devel_omp/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.
branches/devel_omp/src/parallel/ForceDecomposition.cpp (file contents), Revision 1595 by chuckv, Tue Jul 19 18:50:04 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 85 | Line 85 | namespace OpenMD {
85      cellOffsets_.push_back( Vector3i(-1,-1,1) );
86      cellOffsets_.push_back( Vector3i(0, -1,1) );
87      cellOffsets_.push_back( Vector3i(1, -1,1) );
88 +
89 +    // cellAllOffsets are the full space for the cell lists used in
90 +        // constructing the neighbor lists
91 +        cellAllOffsets_.clear();
92 +        cellAllOffsets_.push_back( Vector3i(0, 0, 0) );
93 +
94 +        cellAllOffsets_.push_back( Vector3i(-1, -1, -1) );
95 +        cellAllOffsets_.push_back( Vector3i(0, -1, -1) );
96 +        cellAllOffsets_.push_back( Vector3i(1, -1, -1) );
97 +        cellAllOffsets_.push_back( Vector3i(-1, 0, -1) );
98 +        cellAllOffsets_.push_back( Vector3i(0, 0, -1) );
99 +        cellAllOffsets_.push_back( Vector3i(1, 0, -1) );
100 +        cellAllOffsets_.push_back( Vector3i(-1, 1, -1) );
101 +        cellAllOffsets_.push_back( Vector3i(0, 1, -1) );
102 +        cellAllOffsets_.push_back( Vector3i(1, 1, -1) );
103 +
104 +        cellAllOffsets_.push_back( Vector3i(-1, -1, 0) );
105 +        cellAllOffsets_.push_back( Vector3i(0, -1, 0) );
106 +        cellAllOffsets_.push_back( Vector3i(1, -1, 0) );
107 +        cellAllOffsets_.push_back( Vector3i(-1, 0, 0) );
108 +        // cellAllOffsets_.push_back( Vector3i(0, 0, 0) );
109 +        cellAllOffsets_.push_back( Vector3i(1, 0, 0) );
110 +        cellAllOffsets_.push_back( Vector3i(-1, 1, 0) );
111 +        cellAllOffsets_.push_back( Vector3i(0, 1, 0) );
112 +        cellAllOffsets_.push_back( Vector3i(1, 1, 0) );
113 +
114 +        cellAllOffsets_.push_back( Vector3i(-1, -1, 1) );
115 +        cellAllOffsets_.push_back( Vector3i(0, -1, 1) );
116 +        cellAllOffsets_.push_back( Vector3i(1, -1, 1) );
117 +        cellAllOffsets_.push_back( Vector3i(-1, 0, 1) );
118 +        cellAllOffsets_.push_back( Vector3i(0, 0, 1) );
119 +        cellAllOffsets_.push_back( Vector3i(1, 0, 1) );
120 +        cellAllOffsets_.push_back( Vector3i(-1, 1, 1) );
121 +        cellAllOffsets_.push_back( Vector3i(0, 1, 1) );
122 +        cellAllOffsets_.push_back( Vector3i(1, 1, 1) );
123    }
124  
125 <  SelfData ForceDecomposition::fillSelfData(int atom1) {
126 <    SelfData sdat;
127 <    // Still Missing atype, skippedCharge, potVec pot,
125 >  void ForceDecomposition::fillSelfData(SelfData &sdat, int atom1) {
126 >
127 >    sdat.atype = atypesLocal[atom1];
128 >        
129 >    // Still Missing skippedCharge
130      if (storageLayout_ & DataStorage::dslElectroFrame) {
131        sdat.eFrame = &(snap_->atomData.electroFrame[atom1]);
132      }
# Line 110 | Line 147 | namespace OpenMD {
147        sdat.dfrhodrho = &(snap_->atomData.functionalDerivative[atom1]);
148      }
149  
150 +    if (storageLayout_ & DataStorage::dslSkippedCharge) {
151 +      sdat.skippedCharge = &(snap_->atomData.skippedCharge[atom1]);
152 +    }
153 +
154      if (storageLayout_ & DataStorage::dslParticlePot) {
155        sdat.particlePot = &(snap_->atomData.particlePot[atom1]);
156      }
116
117    return sdat;    
157    }
158  
159    bool ForceDecomposition::checkNeighborList() {
# Line 142 | Line 181 | namespace OpenMD {
181      // a conservative test of list skin crossings
182      dispmax = 2.0 * sqrt (3.0 * dispmax * dispmax);
183  
184 <    return (dispmax > skinThickness_);    
184 >
185 >    if (dispmax > skinThickness_)
186 >      return (dispmax > skinThickness_);  
187 >
188 >    return false;
189    }
190   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines