| 23 |
|
// |
| 24 |
|
// Hoover, W. G., 1986, Phys. Rev. A, 34, 2499. |
| 25 |
|
|
| 26 |
< |
template<typename T> NPTxyz<T>::NPTxyz ( SimInfo *theInfo, ForceFields* the_ff): |
| 27 |
< |
T( theInfo, the_ff ) |
| 26 |
> |
NPTxyz::NPTxyz ( SimInfo *theInfo, ForceFields* the_ff): |
| 27 |
> |
Integrator( theInfo, the_ff ) |
| 28 |
|
{ |
| 29 |
|
GenericData* data; |
| 30 |
|
DoubleArrayData * etaValue; |
| 58 |
|
|
| 59 |
|
} |
| 60 |
|
|
| 61 |
< |
template<typename T> NPTxyz<T>::~NPTxyz() { |
| 61 |
> |
NPTxyz::~NPTxyz() { |
| 62 |
|
|
| 63 |
|
// empty for now |
| 64 |
|
} |
| 65 |
|
|
| 66 |
< |
template<typename T> void NPTxyz<T>::resetIntegrator() { |
| 66 |
> |
void NPTxyz::resetIntegrator() { |
| 67 |
|
|
| 68 |
|
int i, j; |
| 69 |
|
|
| 71 |
|
for (j = 0; j < 3; j++) |
| 72 |
|
eta[i][j] = 0.0; |
| 73 |
|
|
| 74 |
< |
T::resetIntegrator(); |
| 74 |
> |
Integrator::resetIntegrator(); |
| 75 |
|
} |
| 76 |
|
|
| 77 |
< |
template<typename T> void NPTxyz<T>::evolveEtaA() { |
| 77 |
> |
void NPTxyz::evolveEtaA() { |
| 78 |
|
|
| 79 |
|
int i, j; |
| 80 |
|
|
| 93 |
|
oldEta[i][j] = eta[i][j]; |
| 94 |
|
} |
| 95 |
|
|
| 96 |
< |
template<typename T> void NPTxyz<T>::evolveEtaB() { |
| 96 |
> |
void NPTxyz::evolveEtaB() { |
| 97 |
|
|
| 98 |
|
int i,j; |
| 99 |
|
|
| 113 |
|
} |
| 114 |
|
} |
| 115 |
|
|
| 116 |
< |
template<typename T> void NPTxyz<T>::getVelScaleA(double sc[3], double vel[3]) { |
| 116 |
> |
void NPTxyz::getVelScaleA(double sc[3], double vel[3]) { |
| 117 |
|
int i,j; |
| 118 |
|
double vScale[3][3]; |
| 119 |
|
|
| 130 |
|
info->matVecMul3( vScale, vel, sc ); |
| 131 |
|
} |
| 132 |
|
|
| 133 |
< |
template<typename T> void NPTxyz<T>::getVelScaleB(double sc[3], int index ){ |
| 133 |
> |
void NPTxyz::getVelScaleB(double sc[3], int index ){ |
| 134 |
|
int i,j; |
| 135 |
|
double myVel[3]; |
| 136 |
|
double vScale[3][3]; |
| 151 |
|
info->matVecMul3( vScale, myVel, sc ); |
| 152 |
|
} |
| 153 |
|
|
| 154 |
< |
template<typename T> void NPTxyz<T>::getPosScale(double pos[3], double COM[3], |
| 154 |
> |
void NPTxyz::getPosScale(double pos[3], double COM[3], |
| 155 |
|
int index, double sc[3]){ |
| 156 |
|
int j; |
| 157 |
|
double rj[3]; |
| 162 |
|
info->matVecMul3( eta, rj, sc ); |
| 163 |
|
} |
| 164 |
|
|
| 165 |
< |
template<typename T> void NPTxyz<T>::scaleSimBox( void ){ |
| 165 |
> |
void NPTxyz::scaleSimBox( void ){ |
| 166 |
|
|
| 167 |
|
int i,j,k; |
| 168 |
|
double scaleMat[3][3]; |
| 245 |
|
} |
| 246 |
|
} |
| 247 |
|
|
| 248 |
< |
template<typename T> bool NPTxyz<T>::etaConverged() { |
| 248 |
> |
bool NPTxyz::etaConverged() { |
| 249 |
|
int i; |
| 250 |
|
double diffEta, sumEta; |
| 251 |
|
|
| 258 |
|
return ( diffEta <= etaTolerance ); |
| 259 |
|
} |
| 260 |
|
|
| 261 |
< |
template<typename T> double NPTxyz<T>::getConservedQuantity(void){ |
| 261 |
> |
double NPTxyz::getConservedQuantity(void){ |
| 262 |
|
|
| 263 |
|
double conservedQuantity; |
| 264 |
|
double totalEnergy; |
| 300 |
|
|
| 301 |
|
} |
| 302 |
|
|
| 303 |
< |
template<typename T> string NPTxyz<T>::getAdditionalParameters(void){ |
| 303 |
> |
string NPTxyz::getAdditionalParameters(void){ |
| 304 |
|
string parameters; |
| 305 |
|
const int BUFFERSIZE = 2000; // size of the read buffer |
| 306 |
|
char buffer[BUFFERSIZE]; |