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

Comparing branches/development/src/brains/Snapshot.cpp (file contents):
Revision 1838 by gezelter, Tue Jan 22 16:20:11 2013 UTC vs.
Revision 1868 by gezelter, Tue Apr 30 15:56:54 2013 UTC

# Line 35 | Line 35
35   *                                                                      
36   * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
37   * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
38 < * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
38 > * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).          
39   * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40   * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
# Line 94 | Line 94 | namespace OpenMD {
94      frameData.id = -1;                  
95      frameData.currentTime = 0;    
96      frameData.hmat = Mat3x3d(0.0);            
97 <    frameData.invHmat = Mat3x3d(0.0);          
97 >    frameData.invHmat = Mat3x3d(0.0);      
98 >    frameData.bBox = Mat3x3d(0.0);            
99 >    frameData.invBbox = Mat3x3d(0.0);
100      frameData.orthoRhombic = false;        
101      frameData.bondPotential = 0.0;      
102      frameData.bendPotential = 0.0;      
# Line 131 | Line 133 | namespace OpenMD {
133      frameData.electronicTemperature = 0.0;
134      frameData.COM = V3Zero;            
135      frameData.COMvel = V3Zero;          
136 <    frameData.COMw = V3Zero;            
136 >    frameData.COMw = V3Zero;  
137  
138      hasTotalEnergy = false;        
139      hasTranslationalKineticEnergy = false;      
# Line 155 | Line 157 | namespace OpenMD {
157      hasGyrationalVolume = false;  
158      hasHullVolume = false;
159      hasConservedQuantity = false;
160 +    hasBoundingBox = false;
161    }
162  
163    /** Returns the id of this Snapshot */
# Line 252 | Line 255 | namespace OpenMD {
255    /** Returns the inverse H-Matrix */
256    Mat3x3d Snapshot::getInvHmat() {
257      return frameData.invHmat;
258 +  }
259 +
260 +  /** Returns the Bounding Box */
261 +  Mat3x3d Snapshot::getBoundingBox() {
262 +    return frameData.bBox;
263 +  }
264 +
265 +  /** Sets the Bounding Box */  
266 +  void Snapshot::setBoundingBox(const Mat3x3d& m) {
267 +    frameData.bBox = m;
268 +    frameData.invBbox = frameData.bBox.inverse();
269 +    hasBoundingBox = true;
270    }
271  
272 +  /** Returns the inverse Bounding Box */
273 +  Mat3x3d Snapshot::getInvBoundingBox() {
274 +    return frameData.invBbox;
275 +  }
276 +
277    RealType Snapshot::getXYarea() {
278      if (!hasXYarea) {
279        Vector3d x = frameData.hmat.getColumn(0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines