ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/integrators/NPrT.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/integrators/NPrT.cpp (file contents):
Revision 2233 by tim, Thu May 19 04:28:26 2005 UTC vs.
Revision 2234 by tim, Thu May 19 15:49:53 2005 UTC

# Line 50 | Line 50 | namespace oopse {
50   namespace oopse {
51    NPrT::NPrT(SimInfo* info) : NPT(info) {
52      Globals* simParams = info_->getSimParams();
53 <    if (!simParams->haveTargetStress())
53 >    if (!simParams->haveTargetStress()) {
54        sprintf(painCave.errMsg,
55                "If you use the NPT integrator, you must set tauBarostat.\n");
56        painCave.severity = OOPSE_ERROR;
# Line 62 | Line 62 | namespace oopse {
62  
63    }
64    void NPrT::evolveEtaA() {
65 +    Mat3x3d hmat = currentSnapshot_->getHmat();
66 +    double hz = hmat(2, 2);
67 +    double Axy = hmat(0,0) * hmat(1, 1);
68      double sx = -hz * (press(0, 0) - targetPressure/OOPSEConstant::pressureConvert);
69      double sy = -hz * (press(1, 1) - targetPressure/OOPSEConstant::pressureConvert);
70      eta(0,0) -= Axy * (sx - targetStress) / (NkBT*tb2);
# Line 71 | Line 74 | namespace oopse {
74    }
75  
76    void NPrT::evolveEtaB() {
77 <
77 >    Mat3x3d hmat = currentSnapshot_->getHmat();
78 >    double hz = hmat(2, 2);
79 >    double Axy = hmat(0,0) * hmat(1, 1);
80      prevEta = eta;
81      double sx = -hz * (press(0, 0) - targetPressure/OOPSEConstant::pressureConvert);
82      double sy = -hz * (press(1, 1) - targetPressure/OOPSEConstant::pressureConvert);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines