| 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(); | 
| 87 |  | cellOffsets_.push_back( Vector3i(1, -1,1) ); | 
| 88 |  | } | 
| 89 |  |  | 
| 90 | < | SelfData ForceDecomposition::fillSelfData(int atom1) { | 
| 91 | < | SelfData sdat; | 
| 90 | > | void ForceDecomposition::fillSelfData(SelfData &sdat, int atom1) { | 
| 91 | > |  | 
| 92 |  | // Still Missing atype, skippedCharge, potVec pot, | 
| 93 |  | if (storageLayout_ & DataStorage::dslElectroFrame) { | 
| 94 |  | sdat.eFrame = &(snap_->atomData.electroFrame[atom1]); | 
| 113 |  | if (storageLayout_ & DataStorage::dslParticlePot) { | 
| 114 |  | sdat.particlePot = &(snap_->atomData.particlePot[atom1]); | 
| 115 |  | } | 
| 116 | – |  | 
| 117 | – | return sdat; | 
| 116 |  | } | 
| 117 |  |  | 
| 118 |  | bool ForceDecomposition::checkNeighborList() { | 
| 122 |  | // if we have changed the group identities or haven't set up the | 
| 123 |  | // saved positions we automatically will need a neighbor list update: | 
| 124 |  |  | 
| 125 | < | if ( saved_CG_positions_.size() != nGroups ) return true; | 
| 125 | > | if ( saved_CG_positions_.size() != nGroups ) { | 
| 126 | > | cerr << "build because size\n"; | 
| 127 | > | return true; | 
| 128 | > | } | 
| 129 |  |  | 
| 130 |  | RealType dispmax = 0.0; | 
| 131 |  | Vector3d disp; | 
| 143 |  | // a conservative test of list skin crossings | 
| 144 |  | dispmax = 2.0 * sqrt (3.0 * dispmax * dispmax); | 
| 145 |  |  | 
| 146 | < | return (dispmax > skinThickness_); | 
| 146 | > |  | 
| 147 | > | if (dispmax > skinThickness_) { | 
| 148 | > | cerr << "build because movement\n"; | 
| 149 | > | return (dispmax > skinThickness_); | 
| 150 | > | } | 
| 151 | > | return false; | 
| 152 |  | } | 
| 153 |  | } |