--- trunk/src/applications/hydrodynamics/ApproximationModel.cpp 2010/05/10 17:28:26 1442 +++ trunk/src/applications/hydrodynamics/ApproximationModel.cpp 2013/06/16 15:15:42 1879 @@ -35,8 +35,9 @@ * * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). - * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). - * [4] Vardeman & Gezelter, in progress (2009). + * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). + * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). + * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ #include "applications/hydrodynamics/ApproximationModel.hpp" @@ -71,7 +72,6 @@ namespace OpenMD { bool ApproximationModel::calcHydroProps(Shape* shape, RealType viscosity, RealType temperature) { - bool ret = true; HydroProp* cr = new HydroProp(); HydroProp* cd = new HydroProp(); calcHydroPropsAtCR(beads_, viscosity, temperature, cr); @@ -83,7 +83,7 @@ namespace OpenMD { bool ApproximationModel::calcHydroPropsAtCR(std::vector& beads, RealType viscosity, RealType temperature, HydroProp* cr) { - int nbeads = beads.size(); + unsigned int nbeads = beads.size(); DynamicRectMatrix B(3*nbeads, 3*nbeads); DynamicRectMatrix C(3*nbeads, 3*nbeads); Mat3x3d I; @@ -120,7 +120,7 @@ namespace OpenMD { //prepare U Matrix relative to arbitrary origin O(0.0, 0.0, 0.0) std::vector U; - for (int i = 0; i < nbeads; ++i) { + for (unsigned int i = 0; i < nbeads; ++i) { Mat3x3d currU; currU.setupSkewMat(beads[i].pos); U.push_back(currU); @@ -151,7 +151,7 @@ namespace OpenMD { } // add the volume correction - Xiorr += (6.0 * viscosity * volume) * I; + Xiorr += (RealType(6.0) * viscosity * volume) * I; Xiott *= PhysicalConstants::viscoConvert; Xiotr *= PhysicalConstants::viscoConvert; @@ -256,7 +256,7 @@ namespace OpenMD { bool ApproximationModel::calcHydroPropsAtCD(std::vector& beads, RealType viscosity, RealType temperature, HydroProp* cd) { - int nbeads = beads.size(); + unsigned int nbeads = beads.size(); DynamicRectMatrix B(3*nbeads, 3*nbeads); DynamicRectMatrix C(3*nbeads, 3*nbeads); Mat3x3d I; @@ -293,7 +293,7 @@ namespace OpenMD { //prepare U Matrix relative to arbitrary origin O(0.0, 0.0, 0.0) std::vector U; - for (int i = 0; i < nbeads; ++i) { + for (unsigned int i = 0; i < nbeads; ++i) { Mat3x3d currU; currU.setupSkewMat(beads[i].pos); U.push_back(currU); @@ -323,7 +323,7 @@ namespace OpenMD { } } // add the volume correction here: - Xirr += (6.0 * viscosity * volume) * I; + Xirr += (RealType(6.0) * viscosity * volume) * I; Xitt *= PhysicalConstants::viscoConvert; Xitr *= PhysicalConstants::viscoConvert;