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

Comparing branches/development/src/brains/DataStorage.hpp (file contents):
Revision 1540 by gezelter, Mon Jan 17 21:34:36 2011 UTC vs.
Revision 1584 by gezelter, Fri Jun 17 20:16:35 2011 UTC

# Line 58 | Line 58 | namespace OpenMD {
58     * @class DataStorage
59     * @warning do not try to insert element into (or ease element from) private member data
60     * of DataStorage directly.
61 <   * @todo DataStorage may need refactoring. Every std::vector can inherit from the same base class
61 >   * @todo DataStorage may need refactoring. Every vector can inherit from the same base class
62     * which will make it easy to maintain
63     */
64    class DataStorage {
# Line 77 | Line 77 | namespace OpenMD {
77        dslDensity = 512,
78        dslFunctional = 1024,
79        dslFunctionalDerivative = 2048,
80 <      dslElectricField = 4096
80 >      dslElectricField = 4096,
81 >      dslSkippedCharge = 8192
82      };
83  
83
84      DataStorage();
85 <    DataStorage(int size, int storageLayout = 8191);
85 >    DataStorage(int size, int storageLayout = 16383);
86      /** return the size of this DataStorage. */
87      int getSize();
88      /**
# Line 94 | Line 94 | namespace OpenMD {
94       * Reallocates memory manually.
95       *
96       * The main reason for using reserve() is efficiency if you know
97 <     * the capacity to which your std::vector must eventually grow,
97 >     * the capacity to which your vector must eventually grow,
98       * then it is usually more efficient to allocate that memory all
99       * at once.
100       */
# Line 102 | Line 102 | namespace OpenMD {
102      /**
103       * Copies data inside DataStorage class.
104       *
105 <     * Copy function actually call std::copy for every std::vector in
106 <     * DataStorage class.  One Precondition of std::copy is that
107 <     * target is not within the range [soruce, soruce + num]
105 >     * Copy function actually call copy for every vector in
106 >     * DataStorage class.  One Precondition of copy is that
107 >     * target is not within the range [source, soruce + num]
108       *
109       * @param souce
110       * @param num number of element to be moved
# Line 121 | Line 121 | namespace OpenMD {
121      std::vector<Vector3d> position;        /** position array */
122      std::vector<Vector3d> velocity;        /** velocity array */
123      std::vector<RotMat3x3d> aMat;          /** rotation matrix array */
124 <    std::vector<Vector3d> angularMomentum; /** angular momentum array
125 <                                               (body-fixed) */
126 <    std::vector<Mat3x3d> electroFrame;     /** the lab frame unit vector array*/
124 >    std::vector<Vector3d> angularMomentum; /** angular momentum array (body-fixed) */
125 >    std::vector<Mat3x3d> electroFrame;     /** the lab frame unit std::vector array*/
126      std::vector<RealType> zAngle;          /** z-angle array */        
127      std::vector<Vector3d> force;           /** force array */
128      std::vector<Vector3d> torque;          /** torque array */
# Line 132 | Line 131 | namespace OpenMD {
131      std::vector<RealType> functional;      /** density functional */
132      std::vector<RealType> functionalDerivative; /** derivative of functional */
133      std::vector<Vector3d> electricField;   /** local electric field */
134 +    std::vector<RealType> skippedCharge;   /** charge skipped during normal pairwise calculation */
135  
136      static int getBytesPerStuntDouble(int layout);
137  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines