| 39 |
|
} |
| 40 |
|
} |
| 41 |
|
|
| 42 |
– |
// retrieve eta array from simInfo if it exists |
| 43 |
– |
data = info->getProperty(ETAVALUE_ID); |
| 44 |
– |
if(data){ |
| 45 |
– |
etaValue = dynamic_cast<DoubleArrayData*>(data); |
| 42 |
|
|
| 43 |
< |
if(etaValue){ |
| 48 |
< |
etaArray = etaValue->getData(); |
| 43 |
> |
if( theInfo->useInitXSstate ){ |
| 44 |
|
|
| 45 |
< |
for(i = 0; i < 3; i++){ |
| 46 |
< |
for (j = 0; j < 3; j++){ |
| 47 |
< |
eta[i][j] = etaArray[3*i+j]; |
| 48 |
< |
oldEta[i][j] = eta[i][j]; |
| 49 |
< |
} |
| 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 |
> |
|
| 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 |
> |
} |
| 59 |
|
} |
| 60 |
|
} |
| 61 |
|
} |
| 58 |
– |
|
| 62 |
|
} |
| 63 |
|
|
| 64 |
|
template<typename T> NPTxyz<T>::~NPTxyz() { |
| 116 |
|
} |
| 117 |
|
} |
| 118 |
|
|
| 119 |
< |
template<typename T> void NPTxyz<T>::getVelScaleA(double sc[3], double vel[3]) { |
| 119 |
> |
template<typename T> void NPTxyz<T>::calcVelScale(void) { |
| 120 |
|
int i,j; |
| 118 |
– |
double vScale[3][3]; |
| 121 |
|
|
| 122 |
|
for (i = 0; i < 3; i++ ) { |
| 123 |
|
for (j = 0; j < 3; j++ ) { |
| 128 |
|
} |
| 129 |
|
} |
| 130 |
|
} |
| 131 |
+ |
} |
| 132 |
|
|
| 133 |
+ |
template<typename T> void NPTxyz<T>::getVelScaleA(double sc[3], double vel[3]) { |
| 134 |
|
info->matVecMul3( vScale, vel, sc ); |
| 135 |
|
} |
| 136 |
|
|
| 137 |
|
template<typename T> void NPTxyz<T>::getVelScaleB(double sc[3], int index ){ |
| 138 |
< |
int i,j; |
| 138 |
> |
int j; |
| 139 |
|
double myVel[3]; |
| 136 |
– |
double vScale[3][3]; |
| 140 |
|
|
| 138 |
– |
for (i = 0; i < 3; i++ ) { |
| 139 |
– |
for (j = 0; j < 3; j++ ) { |
| 140 |
– |
vScale[i][j] = eta[i][j]; |
| 141 |
– |
|
| 142 |
– |
if (i == j) { |
| 143 |
– |
vScale[i][j] += chi; |
| 144 |
– |
} |
| 145 |
– |
} |
| 146 |
– |
} |
| 147 |
– |
|
| 141 |
|
for (j = 0; j < 3; j++) |
| 142 |
|
myVel[j] = oldVel[3*index + j]; |
| 143 |
|
|