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

Comparing branches/development/src/brains/DataStorage.hpp (file contents):
Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC vs.
Revision 1540 by gezelter, Mon Jan 17 21:34:36 2011 UTC

# Line 73 | Line 73 | namespace OpenMD {
73        dslZAngle = 32,
74        dslForce = 64,
75        dslTorque = 128,
76 <      dslParticlePot = 256
76 >      dslParticlePot = 256,
77 >      dslDensity = 512,
78 >      dslFunctional = 1024,
79 >      dslFunctionalDerivative = 2048,
80 >      dslElectricField = 4096
81      };
82  
83  
84      DataStorage();
85 <    DataStorage(int size, int storageLayout = 511);
85 >    DataStorage(int size, int storageLayout = 8191);
86      /** return the size of this DataStorage. */
87      int getSize();
88      /**
# Line 87 | Line 91 | namespace OpenMD {
91       */
92      void resize(int newSize);
93      /**
94 <     * Reallocates memory manually. The main reason for using reserve() is efficiency
95 <     * if you know the capacity to which your std::vector must eventually grow, then it is usually more
96 <     * efficient to allocate that memory all at once.
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,
98 >     * then it is usually more efficient to allocate that memory all
99 >     * at once.
100       */
101      void reserve(int size);
102      /**
103       * Copies data inside DataStorage class.
104 <     * Copy function actually call std::copy for every std::vector in DataStorage class.
105 <     * One Precondition of std::copy is that target is not within the range [soruce, soruce + num]
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]
108 >     *
109       * @param souce
110       * @param num number of element to be moved
111       * @param target
# Line 108 | Line 118 | namespace OpenMD {
118      /** Returns the pointer of internal array */
119      RealType *getArrayPointer(int whichArray);
120  
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 (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 */
129 <    std::vector<RealType> particlePot;         /** pair potential arrray */
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*/
127 >    std::vector<RealType> zAngle;          /** z-angle array */        
128 >    std::vector<Vector3d> force;           /** force array */
129 >    std::vector<Vector3d> torque;          /** torque array */
130 >    std::vector<RealType> particlePot;     /** particle potential arrray */
131 >    std::vector<RealType> density;         /** electron density */
132 >    std::vector<RealType> functional;      /** density functional */
133 >    std::vector<RealType> functionalDerivative; /** derivative of functional */
134 >    std::vector<Vector3d> electricField;   /** local electric field */
135  
136      static int getBytesPerStuntDouble(int layout);
137  
138    private:
139  
140 <    RealType* internalGetArrayPointer(std::vector<Vector3d>& v);
126 <            
140 >    RealType* internalGetArrayPointer(std::vector<Vector3d>& v);            
141      RealType* internalGetArrayPointer(std::vector<RotMat3x3d>& v);
142      RealType* internalGetArrayPointer(std::vector<RealType>& v);
143  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines