| 86 |  | void NPAT::getPosScale(const Vector3d& pos, const Vector3d& COM, int index, Vector3d& sc) { | 
| 87 |  |  | 
| 88 |  | /**@todo */ | 
| 89 | < | Vector3d rj = (oldPos[index] + pos)/2.0 -COM; | 
| 89 | > | Vector3d rj = (oldPos[index] + pos)/(RealType)2.0 -COM; | 
| 90 |  | sc = eta * rj; | 
| 91 |  | } | 
| 92 |  |  | 
| 110 |  |  | 
| 111 |  | bool NPAT::etaConverged() { | 
| 112 |  | int i; | 
| 113 | < | double diffEta, sumEta; | 
| 113 | > | RealType diffEta, sumEta; | 
| 114 |  |  | 
| 115 |  | sumEta = 0; | 
| 116 |  | for(i = 0; i < 3; i++) { | 
| 122 |  | return ( diffEta <= etaTolerance ); | 
| 123 |  | } | 
| 124 |  |  | 
| 125 | < | double NPAT::calcConservedQuantity(){ | 
| 125 | > | RealType NPAT::calcConservedQuantity(){ | 
| 126 |  |  | 
| 127 |  | chi= currentSnapshot_->getChi(); | 
| 128 |  | integralOfChidt = currentSnapshot_->getIntegralOfChiDt(); | 
| 138 |  | // of freedom). | 
| 139 |  | fkBT = info_->getNdf()*OOPSEConstant::kB *targetTemp; | 
| 140 |  |  | 
| 141 | < | double conservedQuantity; | 
| 142 | < | double totalEnergy; | 
| 143 | < | double thermostat_kinetic; | 
| 144 | < | double thermostat_potential; | 
| 145 | < | double barostat_kinetic; | 
| 146 | < | double barostat_potential; | 
| 147 | < | double trEta; | 
| 141 | > | RealType conservedQuantity; | 
| 142 | > | RealType totalEnergy; | 
| 143 | > | RealType thermostat_kinetic; | 
| 144 | > | RealType thermostat_potential; | 
| 145 | > | RealType barostat_kinetic; | 
| 146 | > | RealType barostat_potential; | 
| 147 | > | RealType trEta; | 
| 148 |  |  | 
| 149 |  | totalEnergy = thermo.getTotalE(); | 
| 150 |  |  | 
| 152 |  |  | 
| 153 |  | thermostat_potential = fkBT* integralOfChidt / OOPSEConstant::energyConvert; | 
| 154 |  |  | 
| 155 | < | SquareMatrix<double, 3> tmp = eta.transpose() * eta; | 
| 155 | > | SquareMatrix<RealType, 3> tmp = eta.transpose() * eta; | 
| 156 |  | trEta = tmp.trace(); | 
| 157 |  |  | 
| 158 |  | barostat_kinetic = NkBT * tb2 * trEta /(2.0 * OOPSEConstant::energyConvert); |