1 |
|
#include <math.h> |
2 |
+ |
|
3 |
|
#include "Atom.hpp" |
4 |
|
#include "SRI.hpp" |
5 |
|
#include "AbstractClasses.hpp" |
40 |
|
} |
41 |
|
} |
42 |
|
|
43 |
+ |
|
44 |
+ |
if( theInfo->useInitXSstate ){ |
45 |
|
// retrieve eta array from simInfo if it exists |
46 |
|
data = info->getProperty(ETAVALUE_ID); |
47 |
|
if(data){ |
48 |
|
etaValue = dynamic_cast<DoubleArrayData*>(data); |
49 |
< |
|
49 |
> |
|
50 |
|
if(etaValue){ |
51 |
< |
etaArray = etaValue->getData(); |
52 |
< |
|
53 |
< |
for(i = 0; i < 3; i++){ |
54 |
< |
for (j = 0; j < 3; j++){ |
55 |
< |
eta[i][j] = etaArray[3*i+j]; |
56 |
< |
oldEta[i][j] = eta[i][j]; |
57 |
< |
} |
58 |
< |
} |
56 |
< |
|
51 |
> |
etaArray = etaValue->getData(); |
52 |
> |
|
53 |
> |
for(i = 0; i < 3; i++){ |
54 |
> |
for (j = 0; j < 3; j++){ |
55 |
> |
eta[i][j] = etaArray[3*i+j]; |
56 |
> |
oldEta[i][j] = eta[i][j]; |
57 |
> |
} |
58 |
> |
} |
59 |
|
} |
60 |
|
} |
61 |
+ |
} |
62 |
|
|
63 |
|
} |
64 |
|
|
117 |
|
} |
118 |
|
} |
119 |
|
|
120 |
< |
template<typename T> void NPTf<T>::getVelScaleA(double sc[3], double vel[3]) { |
120 |
> |
template<typename T> void NPTf<T>::calcVelScale(void){ |
121 |
|
int i,j; |
119 |
– |
double vScale[3][3]; |
122 |
|
|
123 |
|
for (i = 0; i < 3; i++ ) { |
124 |
|
for (j = 0; j < 3; j++ ) { |
129 |
|
} |
130 |
|
} |
131 |
|
} |
132 |
+ |
} |
133 |
|
|
134 |
+ |
template<typename T> void NPTf<T>::getVelScaleA(double sc[3], double vel[3]) { |
135 |
+ |
|
136 |
|
info->matVecMul3( vScale, vel, sc ); |
137 |
|
} |
138 |
|
|
139 |
|
template<typename T> void NPTf<T>::getVelScaleB(double sc[3], int index ){ |
140 |
< |
int i,j; |
140 |
> |
int j; |
141 |
|
double myVel[3]; |
142 |
|
double vScale[3][3]; |
143 |
|
|
139 |
– |
for (i = 0; i < 3; i++ ) { |
140 |
– |
for (j = 0; j < 3; j++ ) { |
141 |
– |
vScale[i][j] = eta[i][j]; |
142 |
– |
|
143 |
– |
if (i == j) { |
144 |
– |
vScale[i][j] += chi; |
145 |
– |
} |
146 |
– |
} |
147 |
– |
} |
148 |
– |
|
144 |
|
for (j = 0; j < 3; j++) |
145 |
|
myVel[j] = oldVel[3*index + j]; |
146 |
|
|