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

Comparing trunk/src/brains/Snapshot.cpp (file contents):
Revision 1896 by gezelter, Tue Jul 2 20:02:31 2013 UTC vs.
Revision 2022 by gezelter, Fri Sep 26 22:22:28 2014 UTC

# Line 70 | Line 70 | namespace OpenMD {
70      frameData.torsionPotential = 0.0;  
71      frameData.inversionPotential = 0.0;
72      frameData.lrPotentials = potVec(0.0);
73 +    frameData.reciprocalPotential = 0.0;
74      frameData.excludedPotentials = potVec(0.0);
75      frameData.restraintPotential = 0.0;
76      frameData.rawPotential = 0.0;  
# Line 103 | Line 104 | namespace OpenMD {
104      frameData.torsionPotential = 0.0;  
105      frameData.inversionPotential = 0.0;
106      frameData.lrPotentials = potVec(0.0);
107 +    frameData.reciprocalPotential = 0.0;
108      frameData.excludedPotentials = potVec(0.0);
109      frameData.restraintPotential = 0.0;
110      frameData.rawPotential = 0.0;      
# Line 128 | Line 130 | namespace OpenMD {
130      frameData.pressure = 0.0;        
131      frameData.temperature = 0.0;
132      frameData.pressureTensor = Mat3x3d(0.0);  
133 <    frameData.systemDipole = Vector3d(0.0);            
133 >    frameData.systemDipole = Vector3d(0.0);
134 >    frameData.systemQuadrupole = Mat3x3d(0.0);
135      frameData.convectiveHeatFlux = Vector3d(0.0, 0.0, 0.0);
136      frameData.electronicTemperature = 0.0;
137      frameData.COM = V3Zero;            
# Line 152 | Line 155 | namespace OpenMD {
155      hasCOMw = false;
156      hasPressureTensor = false;    
157      hasSystemDipole = false;      
158 +    hasSystemQuadrupole = false;
159      hasConvectiveHeatFlux = false;  
160      hasInertiaTensor = false;
161      hasGyrationalVolume = false;  
# Line 187 | Line 191 | namespace OpenMD {
191    /** Returns the number of rigid bodies */
192    int Snapshot::getNumberOfCutoffGroups() {
193      return cgData.getSize();
194 +  }
195 +
196 +    /** Returns the number of bytes in a FrameData structure */
197 +  int Snapshot::getFrameDataSize() {
198 +    return sizeof(FrameData);
199    }
200    
201    /** Returns the H-Matrix */
# Line 414 | Line 423 | namespace OpenMD {
423      return frameData.shortRangePotential;
424    }
425  
426 +  void Snapshot::setReciprocalPotential(RealType rp){
427 +    frameData.reciprocalPotential = rp;
428 +  }
429 +
430 +  RealType Snapshot::getReciprocalPotential() {
431 +    return frameData.reciprocalPotential;
432 +  }
433 +
434    void Snapshot::setLongRangePotential(potVec lrPot) {
435      frameData.lrPotentials = lrPot;
436    }
# Line 423 | Line 440 | namespace OpenMD {
440        for (int i = 0; i < N_INTERACTION_FAMILIES; i++) {
441          frameData.longRangePotential += frameData.lrPotentials[i];
442        }
443 +      frameData.longRangePotential += frameData.reciprocalPotential;
444        hasLongRangePotential = true;
445      }  
446      return frameData.longRangePotential;
# Line 586 | Line 604 | namespace OpenMD {
604      frameData.systemDipole = bd;
605    }
606  
607 +  Mat3x3d Snapshot::getSystemQuadrupole() {
608 +    return frameData.systemQuadrupole;
609 +  }
610 +
611 +  void Snapshot::setSystemQuadrupole(const Mat3x3d& bq) {    
612 +    hasSystemQuadrupole = true;
613 +    frameData.systemQuadrupole = bq;
614 +  }
615 +
616    void Snapshot::setThermostat(const pair<RealType, RealType>& thermostat) {
617      frameData.thermostat = thermostat;
618    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines