33 |
|
eta = 0.0; |
34 |
|
oldEta = 0.0; |
35 |
|
|
36 |
< |
// retrieve eta from simInfo if |
37 |
< |
data = info->getProperty(ETAVALUE_ID); |
38 |
< |
if(data){ |
39 |
< |
etaValue = dynamic_cast<DoubleArrayData*>(data); |
40 |
< |
|
41 |
< |
if(etaValue){ |
42 |
< |
etaArray = etaValue->getData(); |
43 |
< |
eta = etaArray[0]; |
44 |
< |
oldEta = eta; |
36 |
> |
if( theInfo->useInitXSstate ){ |
37 |
> |
// retrieve eta from simInfo if |
38 |
> |
data = info->getProperty(ETAVALUE_ID); |
39 |
> |
if(data){ |
40 |
> |
etaValue = dynamic_cast<DoubleArrayData*>(data); |
41 |
> |
|
42 |
> |
if(etaValue){ |
43 |
> |
etaArray = etaValue->getData(); |
44 |
> |
eta = etaArray[0]; |
45 |
> |
oldEta = eta; |
46 |
> |
} |
47 |
|
} |
48 |
|
} |
47 |
– |
|
49 |
|
} |
50 |
|
|
51 |
|
template<typename T> NPTi<T>::~NPTi() { |
70 |
|
(p_convert*NkBT*tb2)); |
71 |
|
} |
72 |
|
|
73 |
+ |
template<typename T> void NPTi<T>::calcVelScale(void) { |
74 |
+ |
vScale = chi + eta; |
75 |
+ |
} |
76 |
+ |
|
77 |
|
template<typename T> void NPTi<T>::getVelScaleA(double sc[3], double vel[3]) { |
78 |
|
int i; |
79 |
|
|
80 |
< |
for(i=0; i<3; i++) sc[i] = vel[i] * ( chi + eta ); |
80 |
> |
for(i=0; i<3; i++) sc[i] = vel[i] * vScale; |
81 |
|
} |
82 |
|
|
83 |
|
template<typename T> void NPTi<T>::getVelScaleB(double sc[3], int index ){ |
84 |
|
int i; |
85 |
|
|
86 |
< |
for(i=0; i<3; i++) sc[i] = oldVel[index*3 + i] * ( chi + eta ); |
86 |
> |
for(i=0; i<3; i++) sc[i] = oldVel[index*3 + i] * vScale; |
87 |
|
} |
88 |
|
|
89 |
|
|
163 |
|
const int BUFFERSIZE = 2000; // size of the read buffer |
164 |
|
char buffer[BUFFERSIZE]; |
165 |
|
|
166 |
< |
sprintf(buffer,"\t%lf\t%lf;", chi, integralOfChidt); |
166 |
> |
sprintf(buffer,"\t%G\t%G;", chi, integralOfChidt); |
167 |
|
parameters += buffer; |
168 |
|
|
169 |
< |
sprintf(buffer,"\t%lf\t0\t0;", eta); |
169 |
> |
sprintf(buffer,"\t%G\t0\t0;", eta); |
170 |
|
parameters += buffer; |
171 |
|
|
172 |
< |
sprintf(buffer,"\t0\t%lf\t0;", eta); |
172 |
> |
sprintf(buffer,"\t0\t%G\t0;", eta); |
173 |
|
parameters += buffer; |
174 |
|
|
175 |
< |
sprintf(buffer,"\t0\t0\t%lf;", eta); |
175 |
> |
sprintf(buffer,"\t0\t0\t%G;", eta); |
176 |
|
parameters += buffer; |
177 |
|
|
178 |
|
return parameters; |