101 |
|
//error |
102 |
|
std::cerr << "size does not match"<< std::endl; |
103 |
|
} |
104 |
< |
|
104 |
> |
if (storageLayout_ & dslParticlePot && particlePot.size() != size_) { |
105 |
> |
//error |
106 |
> |
std::cerr << "size does not match"<< std::endl; |
107 |
> |
} |
108 |
> |
|
109 |
|
return size_; |
110 |
|
|
111 |
|
} |
144 |
|
internalResize(torque, newSize); |
145 |
|
} |
146 |
|
|
147 |
+ |
if (storageLayout_ & dslParticlePot) { |
148 |
+ |
internalResize(particlePot, newSize); |
149 |
+ |
} |
150 |
+ |
|
151 |
|
size_ = newSize; |
152 |
|
} |
153 |
|
|
183 |
|
if (storageLayout_ & dslTorque) { |
184 |
|
torque.reserve(size); |
185 |
|
} |
186 |
+ |
|
187 |
+ |
if (storageLayout_ & dslParticlePot) { |
188 |
+ |
particlePot.reserve(size); |
189 |
+ |
} |
190 |
|
|
191 |
|
} |
192 |
|
|
226 |
|
if (storageLayout_ & dslTorque) { |
227 |
|
internalCopy(torque, source, num, target); |
228 |
|
} |
229 |
+ |
|
230 |
+ |
if (storageLayout_ & dslParticlePot) { |
231 |
+ |
internalCopy(particlePot, source, num, target); |
232 |
+ |
} |
233 |
|
|
234 |
|
|
235 |
|
} |
277 |
|
case dslTorque: |
278 |
|
return internalGetArrayPointer(torque); |
279 |
|
break; |
280 |
+ |
|
281 |
+ |
case dslParticlePot: |
282 |
+ |
return internalGetArrayPointer(particlePot); |
283 |
+ |
break; |
284 |
|
|
285 |
|
default: |
286 |
|
//error message |
358 |
|
bytes += sizeof(Vector3d); |
359 |
|
} |
360 |
|
if (layout & dslAmat) { |
361 |
< |
bytes += sizeof(Mat3x3d); |
361 |
> |
bytes += sizeof(RotMat3x3d); |
362 |
|
} |
363 |
|
if (layout & dslAngularMomentum) { |
364 |
|
bytes += sizeof(Vector3d); |
367 |
|
bytes += sizeof(Mat3x3d); |
368 |
|
} |
369 |
|
if (layout & dslZAngle) { |
370 |
< |
bytes += sizeof(Vector3d); |
370 |
> |
bytes += sizeof(RealType); |
371 |
|
} |
372 |
|
if (layout & dslForce) { |
373 |
|
bytes += sizeof(Vector3d); |
375 |
|
if (layout & dslTorque) { |
376 |
|
bytes += sizeof(Vector3d); |
377 |
|
} |
378 |
+ |
if (layout & dslParticlePot) { |
379 |
+ |
bytes += sizeof(RealType); |
380 |
+ |
} |
381 |
|
return bytes; |
382 |
|
} |
383 |
|
|