--- branches/development/src/nonbonded/SwitchingFunction.cpp 2011/11/22 20:38:56 1665 +++ trunk/src/nonbonded/SwitchingFunction.cpp 2015/03/07 21:41:51 2071 @@ -35,7 +35,7 @@ * * [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). + * [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). */ @@ -50,8 +50,9 @@ namespace OpenMD { using namespace std; namespace OpenMD { - SwitchingFunction::SwitchingFunction() : np_(150), haveSpline_(false), - isCubic_(true), functionType_(cubic) { + SwitchingFunction::SwitchingFunction() : functionType_(cubic), + haveSpline_(false), isCubic_(true), + np_(150) { switchSpline_ = new CubicSpline(); } @@ -159,9 +160,7 @@ namespace OpenMD { } else { in_switching_region = true; r = sqrt(r2); - pair result = switchSpline_->getValueAndDerivativeAt(r); - sw = result.first; - dswdr = result.second; + switchSpline_->getValueAndDerivativeAt(r, sw, dswdr); } } return in_switching_region;