リビジョン | e00c76dd877f81dac82d6216fdb9a3d8203d14a1 (tree) |
---|---|
日時 | 2012-12-05 16:55:14 |
作者 | Katsuhiko Nishimra <ktns.87@gmai...> |
コミッター | Katsuhiko Nishimra |
Comment out raw/shifted eigenvalues output codes. #28764
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@1180 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -472,27 +472,27 @@ void BFGS::ShiftHessianRedundantMode(double** matrixHessian, | ||
472 | 472 | MolDS_wrappers::Blas::GetInstance()->Dsyr(dimension, -1.0/normSquare, vectorProjectedRedundantMode, matrixProjection); |
473 | 473 | } |
474 | 474 | |
475 | - // Diagonalize hessian | |
476 | - MallocerFreer::GetInstance()->Malloc(&vectorHessianEigenValues, dimension); | |
477 | - MallocerFreer::GetInstance()->Malloc(&vectorsHessianModes, dimension, dimension); | |
478 | - MolDS_wrappers::Blas::GetInstance()->Dcopy(dimension*dimension, &matrixHessian[0][0], &vectorsHessianModes[0][0]); | |
479 | - bool calcEigenVectors = true; | |
480 | - MolDS_wrappers::Lapack::GetInstance()->Dsyevd(&vectorsHessianModes[0], | |
481 | - &vectorHessianEigenValues[0], | |
482 | - dimension, | |
483 | - calcEigenVectors); | |
484 | - | |
485 | - // Output eigenvalues of the raw Hessian to the log | |
486 | - this->OutputLog(this->messageRawHessianEigenvalues); | |
487 | - for(int i=0;i<dimension;i++){ | |
488 | - if((i%6) == 0){ | |
489 | - this->OutputLog(boost::format("\n%e")%vectorHessianEigenValues[i]); | |
490 | - } | |
491 | - else{ | |
492 | - this->OutputLog(boost::format(",\t%e")%vectorHessianEigenValues[i]); | |
493 | - } | |
494 | - } | |
495 | - this->OutputLog("\n"); | |
475 | + //// Diagonalize hessian | |
476 | + //MallocerFreer::GetInstance()->Malloc(&vectorHessianEigenValues, dimension); | |
477 | + //MallocerFreer::GetInstance()->Malloc(&vectorsHessianModes, dimension, dimension); | |
478 | + //MolDS_wrappers::Blas::GetInstance()->Dcopy(dimension*dimension, &matrixHessian[0][0], &vectorsHessianModes[0][0]); | |
479 | + //bool calcEigenVectors = true; | |
480 | + //MolDS_wrappers::Lapack::GetInstance()->Dsyevd(&vectorsHessianModes[0], | |
481 | + // &vectorHessianEigenValues[0], | |
482 | + // dimension, | |
483 | + // calcEigenVectors); | |
484 | + // | |
485 | + //// Output eigenvalues of the raw Hessian to the log | |
486 | + //this->OutputLog(this->messageRawHessianEigenvalues); | |
487 | + //for(int i=0;i<dimension;i++){ | |
488 | + // if((i%6) == 0){ | |
489 | + // this->OutputLog(boost::format("\n%e")%vectorHessianEigenValues[i]); | |
490 | + // } | |
491 | + // else{ | |
492 | + // this->OutputLog(boost::format(",\t%e")%vectorHessianEigenValues[i]); | |
493 | + // } | |
494 | + //} | |
495 | + //this->OutputLog("\n"); | |
496 | 496 | |
497 | 497 | // Project Hessian H' = P H P |
498 | 498 | MallocerFreer::GetInstance()->Malloc(&matrixShiftedHessianBuffer, dimension, dimension); |
@@ -506,25 +506,25 @@ void BFGS::ShiftHessianRedundantMode(double** matrixHessian, | ||
506 | 506 | MolDS_wrappers::Blas::GetInstance()->Daxpy(dimension, -1, &one, 0, &matrixProjection[0][0], dimension + 1); // (P - I) |
507 | 507 | MolDS_wrappers::Blas::GetInstance()->Daxpy(dimension*dimension, -largeEigenvalue, &matrixProjection[0][0], &matrixHessian[0][0]); |
508 | 508 | |
509 | - // Diagonalize shifted hessian | |
510 | - MolDS_wrappers::Blas::GetInstance()->Dcopy(dimension*dimension, &matrixHessian[0][0], &vectorsHessianModes[0][0]); | |
511 | - calcEigenVectors = true; | |
512 | - MolDS_wrappers::Lapack::GetInstance()->Dsyevd(&vectorsHessianModes[0], | |
513 | - &vectorHessianEigenValues[0], | |
514 | - dimension, | |
515 | - calcEigenVectors); | |
516 | - | |
517 | - // Output eigenvalues of the shifted Hessian to the log | |
518 | - this->OutputLog(this->messageShiftedHessianEigenvalues); | |
519 | - for(int i=0;i<dimension;i++){ | |
520 | - if((i%6) == 0){ | |
521 | - this->OutputLog(boost::format("\n%e")%vectorHessianEigenValues[i]); | |
522 | - } | |
523 | - else{ | |
524 | - this->OutputLog(boost::format(",\t%e")%vectorHessianEigenValues[i]); | |
525 | - } | |
526 | - } | |
527 | - this->OutputLog("\n"); | |
509 | + //// Diagonalize shifted hessian | |
510 | + //MolDS_wrappers::Blas::GetInstance()->Dcopy(dimension*dimension, &matrixHessian[0][0], &vectorsHessianModes[0][0]); | |
511 | + //calcEigenVectors = true; | |
512 | + //MolDS_wrappers::Lapack::GetInstance()->Dsyevd(&vectorsHessianModes[0], | |
513 | + // &vectorHessianEigenValues[0], | |
514 | + // dimension, | |
515 | + // calcEigenVectors); | |
516 | + // | |
517 | + //// Output eigenvalues of the shifted Hessian to the log | |
518 | + //this->OutputLog(this->messageShiftedHessianEigenvalues); | |
519 | + //for(int i=0;i<dimension;i++){ | |
520 | + // if((i%6) == 0){ | |
521 | + // this->OutputLog(boost::format("\n%e")%vectorHessianEigenValues[i]); | |
522 | + // } | |
523 | + // else{ | |
524 | + // this->OutputLog(boost::format(",\t%e")%vectorHessianEigenValues[i]); | |
525 | + // } | |
526 | + //} | |
527 | + //this->OutputLog("\n"); | |
528 | 528 | } |
529 | 529 | catch(MolDSException ex) |
530 | 530 | { |