64 |
|
nCutoffGroups_ += mol->getNCutoffGroups(); |
65 |
|
nConstraints_ += mol->getNConstraints(); |
66 |
|
|
67 |
+ |
globalIndexToMol_.insert(make_pair(mol->getGlobalIndex(), mol)); |
68 |
|
return true; |
69 |
|
} else { |
70 |
|
return false; |
86 |
|
nCutoffGroups_ -= mol->getNCutoffGroups(); |
87 |
|
nConstraints_ -= mol->getNConstraints(); |
88 |
|
|
89 |
+ |
globalIndexToMol_.erase(mol->getGlobalIndex()); |
90 |
|
return true; |
91 |
|
} else { |
92 |
|
return false; |
107 |
|
} |
108 |
|
|
109 |
|
|
110 |
< |
void SimInfo::calcNDF() { |
110 |
> |
void SimInfo::calcNdf() { |
111 |
|
int ndf_local; |
112 |
|
std::vector<Molecule*>::iterator i; |
113 |
|
std::vector<StuntDouble*>::iterator j; |
148 |
|
|
149 |
|
} |
150 |
|
|
151 |
< |
void SimInfo::calcNDFRaw() { |
151 |
> |
void SimInfo::calcNdfRaw() { |
152 |
|
int ndfRaw_local; |
153 |
|
|
154 |
|
std::vector<Molecule*>::iterator i; |
183 |
|
#endif |
184 |
|
} |
185 |
|
|
186 |
< |
void SimInfo::calcNDFTrans() { |
186 |
> |
void SimInfo::calcNdfTrans() { |
187 |
|
int ndfTrans_local; |
188 |
|
|
189 |
|
ndfTrans_local = 3 * nIntegrableObjects_ - nConstraints_; |
289 |
|
} |
290 |
|
|
291 |
|
|
292 |
+ |
void SimInfo::addMoleculeStamp(MoleculeStamp* molStamp, int nmol) { |
293 |
+ |
int curStampId; |
294 |
+ |
|
295 |
+ |
//index from 0 |
296 |
+ |
curStampId = molStampIds_.size(); |
297 |
+ |
|
298 |
+ |
moleculeStamps_.push_back(molStamp); |
299 |
+ |
molStampIds_.insert(molStampIds_.end(), nmol, curStampId) |
300 |
+ |
} |
301 |
+ |
|
302 |
+ |
std::ostream& operator <<(ostream& o, SimInfo& info) { |
303 |
+ |
|
304 |
+ |
return o; |
305 |
+ |
} |
306 |
+ |
|
307 |
|
}//end namespace oopse |