修訂 | 7b4e4865b52eb3d4673428d091114e60875ac19a (tree) |
---|---|
時間 | 2012-11-08 12:22:08 |
作者 | Katsuhiko Nishimra <ktns.87@gmai...> |
Commiter | Katsuhiko Nishimra |
Description for NaN error
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@1109 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -63,7 +63,7 @@ void BFGS::SetMessages(){ | ||
63 | 63 | this->errorMessageGeometyrOptimizationNotConverged |
64 | 64 | = "Error in optimization::BFGS::Optimize: Optimization did not met convergence criterion.\n"; |
65 | 65 | this->errorMessageNaNInRFOStep |
66 | - = "Error in optimization::BFGS::Optimize: RFO step has gone NaN.\n"; | |
66 | + = "Error in optimization::BFGS::Optimize: RFO step has gone NaN. (lambda * s[%d] = %e, lambda = %e, alpha = %e)\n"; | |
67 | 67 | this->messageStartBFGSStep = "\n========== START: BFGS step "; |
68 | 68 | } |
69 | 69 |
@@ -305,7 +305,8 @@ void BFGS::CalcRFOStep(double* vectorStep, | ||
305 | 305 | // See Eq. (4) in [EPW_1997]. |
306 | 306 | vectorStep[i] = matrixAugmentedHessian[0][i] / matrixAugmentedHessian[0][dimension] / alpha; |
307 | 307 | if(isnan(vectorStep[i])){ |
308 | - throw MolDSException(this->errorMessageNaNInRFOStep); | |
308 | + throw MolDSException(boost::format(this->errorMessageNaNInRFOStep) | |
309 | + % i % matrixAugmentedHessian[0][i] % matrixAugmentedHessian[0][dimension] % alpha); | |
309 | 310 | } |
310 | 311 | } |
311 | 312 | // |