146 |
|
//error |
147 |
|
cerr << "size does not match"<< endl; |
148 |
|
} |
149 |
+ |
|
150 |
+ |
if (storageLayout_ & dslSitePotential && sitePotential.size() != size_) { |
151 |
+ |
//error |
152 |
+ |
cerr << "size does not match"<< endl; |
153 |
+ |
} |
154 |
|
|
155 |
|
return size_; |
156 |
|
|
226 |
|
internalResize(flucQFrc, newSize); |
227 |
|
} |
228 |
|
|
229 |
+ |
if (storageLayout_ & dslSitePotential) { |
230 |
+ |
internalResize(sitePotential, newSize); |
231 |
+ |
} |
232 |
+ |
|
233 |
|
size_ = newSize; |
234 |
|
} |
235 |
|
|
301 |
|
if (storageLayout_ & dslFlucQForce) { |
302 |
|
flucQFrc.reserve(size); |
303 |
|
} |
304 |
+ |
|
305 |
+ |
if (storageLayout_ & dslSitePotential) { |
306 |
+ |
sitePotential.reserve(size); |
307 |
+ |
} |
308 |
|
} |
309 |
|
|
310 |
|
void DataStorage::copy(int source, int num, int target) { |
378 |
|
if (storageLayout_ & dslFlucQForce) { |
379 |
|
internalCopy(flucQFrc, source, num, target); |
380 |
|
} |
381 |
+ |
|
382 |
+ |
if (storageLayout_ & dslSitePotential) { |
383 |
+ |
internalCopy(sitePotential, source, num, target); |
384 |
+ |
} |
385 |
|
} |
386 |
|
|
387 |
|
int DataStorage::getStorageLayout() { |
447 |
|
case dslFlucQForce: |
448 |
|
return internalGetArrayPointer(flucQFrc); |
449 |
|
|
450 |
+ |
case dslSitePotential: |
451 |
+ |
return internalGetArrayPointer(sitePotential); |
452 |
+ |
|
453 |
|
default: |
454 |
|
//error message |
455 |
|
return NULL; |
569 |
|
if (layout & dslFlucQForce) { |
570 |
|
bytes += sizeof(RealType); |
571 |
|
} |
572 |
+ |
if (layout & dslSitePotential) { |
573 |
+ |
bytes += sizeof(RealType); |
574 |
+ |
} |
575 |
|
|
576 |
|
return bytes; |
577 |
|
} |