ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/brains/DataStorage.cpp
(Generate patch)

Comparing trunk/src/brains/DataStorage.cpp (file contents):
Revision 963 by tim, Wed May 17 21:51:42 2006 UTC vs.
Revision 1245 by chuckv, Tue May 27 16:39:06 2008 UTC

# Line 101 | Line 101 | namespace oopse {
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    }
# Line 140 | Line 144 | namespace oopse {
144        internalResize(torque, newSize);
145      }
146  
147 +    if (storageLayout_ & dslParticlePot) {
148 +      internalResize(particlePot, newSize);
149 +    }
150 +
151      size_ = newSize;
152    }
153  
# Line 175 | Line 183 | namespace oopse {
183      if (storageLayout_ & dslTorque) {
184        torque.reserve(size);
185      }
186 +    
187 +    if (storageLayout_ & dslParticlePot) {
188 +      particlePot.reserve(size);
189 +    }
190  
191    }
192  
# Line 214 | Line 226 | namespace oopse {
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    }
# Line 260 | Line 276 | namespace oopse {
276  
277      case dslTorque:
278        return internalGetArrayPointer(torque);
279 <      break;  
279 >      break;
280 >
281 >    case dslParticlePot:
282 >      return internalGetArrayPointer(particlePot);
283 >      break;
284              
285      default:
286        //error message
# Line 338 | Line 358 | namespace oopse {
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);
# Line 347 | Line 367 | namespace oopse {
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);
# Line 355 | Line 375 | namespace oopse {
375      if (layout & dslTorque) {
376        bytes += sizeof(Vector3d);
377      }
378 +    if (layout & dslParticlePot) {
379 +      bytes += sizeof(RealType);
380 +    }
381      return bytes;
382    }
383  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines