--- trunk/src/integrators/NPAT.cpp 2006/05/17 19:54:27 962 +++ trunk/src/integrators/NPAT.cpp 2006/05/17 21:51:42 963 @@ -86,7 +86,7 @@ namespace oopse { void NPAT::getPosScale(const Vector3d& pos, const Vector3d& COM, int index, Vector3d& sc) { /**@todo */ - Vector3d rj = (oldPos[index] + pos)/2.0 -COM; + Vector3d rj = (oldPos[index] + pos)/(RealType)2.0 -COM; sc = eta * rj; } @@ -110,7 +110,7 @@ namespace oopse { bool NPAT::etaConverged() { int i; - double diffEta, sumEta; + RealType diffEta, sumEta; sumEta = 0; for(i = 0; i < 3; i++) { @@ -122,7 +122,7 @@ namespace oopse { return ( diffEta <= etaTolerance ); } - double NPAT::calcConservedQuantity(){ + RealType NPAT::calcConservedQuantity(){ chi= currentSnapshot_->getChi(); integralOfChidt = currentSnapshot_->getIntegralOfChiDt(); @@ -138,13 +138,13 @@ namespace oopse { // of freedom). fkBT = info_->getNdf()*OOPSEConstant::kB *targetTemp; - double conservedQuantity; - double totalEnergy; - double thermostat_kinetic; - double thermostat_potential; - double barostat_kinetic; - double barostat_potential; - double trEta; + RealType conservedQuantity; + RealType totalEnergy; + RealType thermostat_kinetic; + RealType thermostat_potential; + RealType barostat_kinetic; + RealType barostat_potential; + RealType trEta; totalEnergy = thermo.getTotalE(); @@ -152,7 +152,7 @@ namespace oopse { thermostat_potential = fkBT* integralOfChidt / OOPSEConstant::energyConvert; - SquareMatrix tmp = eta.transpose() * eta; + SquareMatrix tmp = eta.transpose() * eta; trEta = tmp.trace(); barostat_kinetic = NkBT * tb2 * trEta /(2.0 * OOPSEConstant::energyConvert);