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; |
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); |
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); |