--- trunk/OOPSE/libmdtools/NPTf.cpp 2003/11/06 22:01:37 855 +++ trunk/OOPSE/libmdtools/NPTf.cpp 2003/11/07 17:09:48 857 @@ -1,4 +1,5 @@ #include + #include "Atom.hpp" #include "SRI.hpp" #include "AbstractClasses.hpp" @@ -116,9 +117,8 @@ template void NPTf::getVelScaleA(double } } -template void NPTf::getVelScaleA(double sc[3], double vel[3]) { +template void NPTf::calcVelScale(void){ int i,j; - double vScale[3][3]; for (i = 0; i < 3; i++ ) { for (j = 0; j < 3; j++ ) { @@ -129,25 +129,18 @@ template void NPTf::getVelScaleA(double } } } +} +template void NPTf::getVelScaleA(double sc[3], double vel[3]) { + info->matVecMul3( vScale, vel, sc ); } template void NPTf::getVelScaleB(double sc[3], int index ){ - int i,j; + int j; double myVel[3]; double vScale[3][3]; - for (i = 0; i < 3; i++ ) { - for (j = 0; j < 3; j++ ) { - vScale[i][j] = eta[i][j]; - - if (i == j) { - vScale[i][j] += chi; - } - } - } - for (j = 0; j < 3; j++) myVel[j] = oldVel[3*index + j];