Revisão | 5b80953455c3f79d4c484c39ac7b0d37dae3e1e8 (tree) |
---|---|
Hora | 2013-10-16 09:41:14 |
Autor | Mikiya Fujii <mikiya.fujii@gmai...> |
Commiter | Mikiya Fujii |
tmpBC is renamed to tmpVectorBC. #32299
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@1546 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -188,8 +188,8 @@ void Cndo2::SetMessages(){ | ||
188 | 188 | = "Error in cndo::Cndo2::RotateDiatmicOverlapAOsToSpaceFrame: tmpOldDiatomicOverlapAOs is NULL.\n"; |
189 | 189 | this->errorMessageRotDiaOverlapAOsToSpaceFrameNullTmpMatrixBC |
190 | 190 | = "Error in cndo::Cndo2::RotateDiatmicOverlapAOsToSpaceFrame: tmpMatrixBC is NULL.\n"; |
191 | - this->errorMessageRotDiaOverlapAOsToSpaceFrameNullTmpBC | |
192 | - = "Error in cndo::Cndo2::RotateDiatmicOverlapAOsToSpaceFrame: tmpBC is NULL.\n"; | |
191 | + this->errorMessageRotDiaOverlapAOsToSpaceFrameNullTmpVectorBC | |
192 | + = "Error in cndo::Cndo2::RotateDiatmicOverlapAOsToSpaceFrame: tmpVectorBC is NULL.\n"; | |
193 | 193 | this->errorMessageSetOverlapAOsElementNullDiaMatrix |
194 | 194 | = "Error in cndo::Cndo2::SetOverlapAOsElement: diatomicOverlapAOs is NULL.\n"; |
195 | 195 | this->errorMessageCalcElectronicTransitionDipoleMomentBadState |
@@ -3932,7 +3932,7 @@ void Cndo2::CalcOverlapAOs(double** overlapAOs, const Molecule& molecule) const{ | ||
3932 | 3932 | double* tmpDiatomicOverlapAOs = NULL; |
3933 | 3933 | double** tmpOldDiatomicOverlapAOs = NULL; |
3934 | 3934 | double** tmpMatrixBC = NULL; |
3935 | - double* tmpBC = NULL; | |
3935 | + double* tmpVectorBC = NULL; | |
3936 | 3936 | try{ |
3937 | 3937 | // malloc |
3938 | 3938 | MallocerFreer::GetInstance()->Malloc<double>(&diatomicOverlapAOs, |
@@ -3949,7 +3949,7 @@ void Cndo2::CalcOverlapAOs(double** overlapAOs, const Molecule& molecule) const{ | ||
3949 | 3949 | MallocerFreer::GetInstance()->Malloc<double>(&tmpMatrixBC, |
3950 | 3950 | OrbitalType_end, |
3951 | 3951 | OrbitalType_end); |
3952 | - MallocerFreer::GetInstance()->Malloc<double>(&tmpBC, | |
3952 | + MallocerFreer::GetInstance()->Malloc<double>(&tmpVectorBC, | |
3953 | 3953 | OrbitalType_end*OrbitalType_end); |
3954 | 3954 | bool symmetrize = false; |
3955 | 3955 | #pragma omp for schedule(auto) |
@@ -3957,7 +3957,7 @@ void Cndo2::CalcOverlapAOs(double** overlapAOs, const Molecule& molecule) const{ | ||
3957 | 3957 | const Atom& atomB = *molecule.GetAtom(B); |
3958 | 3958 | this->CalcDiatomicOverlapAOsInDiatomicFrame(diatomicOverlapAOs, atomA, atomB); |
3959 | 3959 | this->CalcRotatingMatrix(rotatingMatrix, atomA, atomB); |
3960 | - this->RotateDiatmicOverlapAOsToSpaceFrame(diatomicOverlapAOs, rotatingMatrix, tmpDiatomicOverlapAOs, tmpOldDiatomicOverlapAOs, tmpMatrixBC, tmpBC); | |
3960 | + this->RotateDiatmicOverlapAOsToSpaceFrame(diatomicOverlapAOs, rotatingMatrix, tmpDiatomicOverlapAOs, tmpOldDiatomicOverlapAOs, tmpMatrixBC, tmpVectorBC); | |
3961 | 3961 | this->SetOverlapAOsElement(overlapAOs, diatomicOverlapAOs, atomA, atomB, symmetrize); |
3962 | 3962 | } // end of loop B parallelized with openMP |
3963 | 3963 |
@@ -3975,7 +3975,7 @@ void Cndo2::CalcOverlapAOs(double** overlapAOs, const Molecule& molecule) const{ | ||
3975 | 3975 | MallocerFreer::GetInstance()->Free<double>(&tmpMatrixBC, |
3976 | 3976 | OrbitalType_end, |
3977 | 3977 | OrbitalType_end); |
3978 | - MallocerFreer::GetInstance()->Free<double>(&tmpBC, | |
3978 | + MallocerFreer::GetInstance()->Free<double>(&tmpVectorBC, | |
3979 | 3979 | OrbitalType_end*OrbitalType_end); |
3980 | 3980 | } // end of omp-parallelized region |
3981 | 3981 | // Exception throwing for omp-region |
@@ -5959,7 +5959,7 @@ void Cndo2::RotateDiatmicOverlapAOsToSpaceFrame(double** diatomicOve | ||
5959 | 5959 | double* tmpDiatomicOverlapAOs, |
5960 | 5960 | double** tmpOldDiatomicOverlapAOs, |
5961 | 5961 | double** tmpMatrixBC, |
5962 | - double* tmpBC) const{ | |
5962 | + double* tmpVectorBC) const{ | |
5963 | 5963 | #ifdef MOLDS_DBG |
5964 | 5964 | if(diatomicOverlapAOs==NULL){ |
5965 | 5965 | throw MolDSException(this->errorMessageRotDiaOverlapAOsToSpaceFrameNullDiaMatrix); |
@@ -5976,8 +5976,8 @@ void Cndo2::RotateDiatmicOverlapAOsToSpaceFrame(double** diatomicOve | ||
5976 | 5976 | if(tmpMatrixBC==NULL){ |
5977 | 5977 | throw MolDSException(this->errorMessageRotDiaOverlapAOsToSpaceFrameNullTmpMatrixBC); |
5978 | 5978 | } |
5979 | - if(tmpBC==NULL){ | |
5980 | - throw MolDSException(this->errorMessageRotDiaOverlapAOsToSpaceFrameNullTmpBC); | |
5979 | + if(tmpVectorBC==NULL){ | |
5980 | + throw MolDSException(this->errorMessageRotDiaOverlapAOsToSpaceFrameNullTmpVectorBC); | |
5981 | 5981 | } |
5982 | 5982 | #endif |
5983 | 5983 | for(int i=0; i<OrbitalType_end; i++){ |
@@ -6002,7 +6002,7 @@ void Cndo2::RotateDiatmicOverlapAOsToSpaceFrame(double** diatomicOve | ||
6002 | 6002 | diatomicOverlapAOs, |
6003 | 6003 | tmpDiatomicOverlapAOs, |
6004 | 6004 | tmpMatrixBC, |
6005 | - tmpBC); | |
6005 | + tmpVectorBC); | |
6006 | 6006 | /* |
6007 | 6007 | for(int i=0;i<OrbitalType_end;i++){ |
6008 | 6008 | for(int j=0;j<OrbitalType_end;j++){ |
@@ -283,7 +283,7 @@ private: | ||
283 | 283 | std::string errorMessageRotDiaOverlapAOsToSpaceFrameNullTmpDiaMatrix; |
284 | 284 | std::string errorMessageRotDiaOverlapAOsToSpaceFrameNullTmpOldDiaMatrix; |
285 | 285 | std::string errorMessageRotDiaOverlapAOsToSpaceFrameNullTmpMatrixBC; |
286 | - std::string errorMessageRotDiaOverlapAOsToSpaceFrameNullTmpBC; | |
286 | + std::string errorMessageRotDiaOverlapAOsToSpaceFrameNullTmpVectorBC; | |
287 | 287 | std::string errorMessageSetOverlapAOsElementNullDiaMatrix; |
288 | 288 | std::string errorMessageCalcOverlapAOsDifferentConfigurationsDiffAOs; |
289 | 289 | std::string errorMessageCalcOverlapAOsDifferentConfigurationsDiffAtoms; |
@@ -466,7 +466,7 @@ private: | ||
466 | 466 | double* tmpDiatomicOverlapAOs, |
467 | 467 | double** tmpOldDiatomicOverlapAOs, |
468 | 468 | double** tmpMatrixBC, |
469 | - double* tmpBC) const; | |
469 | + double* tmpVectorBC) const; | |
470 | 470 | void SetOverlapAOsElement(double** overlapAOs, |
471 | 471 | double const* const* diatomicOverlapAOs, |
472 | 472 | const MolDS_base_atoms::Atom& atomA, |
@@ -3467,13 +3467,13 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore, | ||
3467 | 3467 | double* tmpDiatomicTwoElecTwoCore = NULL; |
3468 | 3468 | double** tmpRotMat = NULL; |
3469 | 3469 | double** tmpMatrixBC = NULL; |
3470 | - double* tmpBC = NULL; | |
3470 | + double* tmpVectorBC = NULL; | |
3471 | 3471 | try{ |
3472 | 3472 | MallocerFreer::GetInstance()->Malloc<double>(&diatomicTwoElecTwoCore, dxy, dxy, dxy, dxy); |
3473 | 3473 | MallocerFreer::GetInstance()->Malloc<double>(&tmpDiatomicTwoElecTwoCore, dxy*dxy*dxy*dxy); |
3474 | 3474 | MallocerFreer::GetInstance()->Malloc<double>(&tmpRotMat, OrbitalType_end, OrbitalType_end); |
3475 | 3475 | MallocerFreer::GetInstance()->Malloc<double>(&tmpMatrixBC, dxy*dxy, dxy*dxy); |
3476 | - MallocerFreer::GetInstance()->Malloc<double>(&tmpBC, dxy*dxy*dxy*dxy); | |
3476 | + MallocerFreer::GetInstance()->Malloc<double>(&tmpVectorBC, dxy*dxy*dxy*dxy); | |
3477 | 3477 | // note that terms with condition a==b are not needed to calculate. |
3478 | 3478 | #pragma omp for schedule(auto) |
3479 | 3479 | for(int b=a+1; b<totalNumberAtoms; b++){ |
@@ -3481,7 +3481,7 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore, | ||
3481 | 3481 | tmpDiatomicTwoElecTwoCore, |
3482 | 3482 | tmpRotMat, |
3483 | 3483 | tmpMatrixBC, |
3484 | - tmpBC, | |
3484 | + tmpVectorBC, | |
3485 | 3485 | a, b); |
3486 | 3486 | |
3487 | 3487 | int i=0; |
@@ -3511,7 +3511,7 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore, | ||
3511 | 3511 | MallocerFreer::GetInstance()->Free<double>(&tmpDiatomicTwoElecTwoCore, dxy*dxy*dxy*dxy); |
3512 | 3512 | MallocerFreer::GetInstance()->Free<double>(&tmpRotMat, OrbitalType_end, OrbitalType_end); |
3513 | 3513 | MallocerFreer::GetInstance()->Free<double>(&tmpMatrixBC, dxy*dxy, dxy*dxy); |
3514 | - MallocerFreer::GetInstance()->Free<double>(&tmpBC, dxy*dxy*dxy*dxy); | |
3514 | + MallocerFreer::GetInstance()->Free<double>(&tmpVectorBC, dxy*dxy*dxy*dxy); | |
3515 | 3515 | } // end of omp-parallelized region |
3516 | 3516 | // Exception throwing for omp-region |
3517 | 3517 | if(!ompErrors.str().empty()){ |
@@ -3570,7 +3570,7 @@ void Mndo::CalcDiatomicTwoElecTwoCore(double**** matrix, | ||
3570 | 3570 | double* tmpVec, |
3571 | 3571 | double** tmpRotMat, |
3572 | 3572 | double** tmpMatrixBC, |
3573 | - double* tmpBC, | |
3573 | + double* tmpVectorBC, | |
3574 | 3574 | int indexAtomA, |
3575 | 3575 | int indexAtomB) const{ |
3576 | 3576 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
@@ -3614,7 +3614,7 @@ void Mndo::CalcDiatomicTwoElecTwoCore(double**** matrix, | ||
3614 | 3614 | } |
3615 | 3615 | // rotate matirix into the space frame |
3616 | 3616 | this->CalcRotatingMatrix(tmpRotMat, atomA, atomB); |
3617 | - this->RotateDiatomicTwoElecTwoCoreToSpaceFrame(matrix, tmpVec, tmpRotMat, tmpMatrixBC, tmpBC); | |
3617 | + this->RotateDiatomicTwoElecTwoCoreToSpaceFrame(matrix, tmpVec, tmpRotMat, tmpMatrixBC, tmpVectorBC); | |
3618 | 3618 | |
3619 | 3619 | /* |
3620 | 3620 | this->OutputLog("(mu, nu | lambda, sigma) matrix\n"); |
@@ -3816,7 +3816,7 @@ void Mndo::RotateDiatomicTwoElecTwoCoreToSpaceFrame(double**** matrix, | ||
3816 | 3816 | double* tmpVec, |
3817 | 3817 | double const* const* rotatingMatrix, |
3818 | 3818 | double** tmpMatrixBC, |
3819 | - double* tmpBC) const{ | |
3819 | + double* tmpVectorBC) const{ | |
3820 | 3820 | double oldMatrix[dxy][dxy][dxy][dxy]; |
3821 | 3821 | MolDS_wrappers::Blas::GetInstance()->Dcopy(dxy*dxy*dxy*dxy, &matrix[0][0][0][0], &oldMatrix[0][0][0][0]); |
3822 | 3822 |
@@ -3855,7 +3855,7 @@ void Mndo::RotateDiatomicTwoElecTwoCoreToSpaceFrame(double**** matrix, | ||
3855 | 3855 | &ptrMatrix[0], |
3856 | 3856 | tmpVec, |
3857 | 3857 | tmpMatrixBC, |
3858 | - tmpBC); | |
3858 | + tmpVectorBC); | |
3859 | 3859 | |
3860 | 3860 | /* |
3861 | 3861 | // rotate (slow algorithm) |
@@ -301,7 +301,7 @@ private: | ||
301 | 301 | double* tmpVec, |
302 | 302 | double** tmpRotMat, |
303 | 303 | double** tmpMatrixBC, |
304 | - double* tmpBC, | |
304 | + double* tmpVectorBC, | |
305 | 305 | int indexAtomA, |
306 | 306 | int indexAtomB) const; |
307 | 307 | void CalcDiatomicTwoElecTwoCore1stDerivatives(double***** matrix, |
@@ -322,7 +322,7 @@ private: | ||
322 | 322 | double* tmpVec, |
323 | 323 | double const* const* rotatingMatrix, |
324 | 324 | double** tmpMatrixBC, |
325 | - double* tmpBC) const; | |
325 | + double* tmpVectorBC) const; | |
326 | 326 | void RotateDiatomicTwoElecTwoCore1stDerivativesToSpaceFrame(double***** matrix, |
327 | 327 | double const* const* const* const* diatomicTwoElecTwoCore, |
328 | 328 | double const* const* rotatingMatrix, |
@@ -487,8 +487,8 @@ void Blas::Dgemmm(bool isColumnMajorMatrixA, | ||
487 | 487 | // matrixD: m*n-matrix (matrixC[m][n] in row-major (C/C++ style)) |
488 | 488 | // tmpMatrixBC is temporary calculated matrix in row-major, (C/C++ style) |
489 | 489 | // tmpMatrixBC = matrixB*matrixC |
490 | -// tmpBC is temporary 1 dimensional k*n-array for matrixBC | |
491 | -// tmpD is temporary 1 dimensional m*n-array for matrixD | |
490 | +// tmpVectorBC is temporary 1 dimensional k*n-array for matrixBC | |
491 | +// tmpVectorD is temporary 1 dimensional m*n-array for matrixD | |
492 | 492 | void Blas::Dgemmm(bool isColumnMajorMatrixA, |
493 | 493 | bool isColumnMajorMatrixB, |
494 | 494 | bool isColumnMajorMatrixC, |
@@ -499,15 +499,15 @@ void Blas::Dgemmm(bool isColumnMajorMatrixA, | ||
499 | 499 | double const* const* matrixC, |
500 | 500 | double beta, |
501 | 501 | double** matrixD, |
502 | - double* tmpD, | |
502 | + double* tmpVectorD, | |
503 | 503 | double** tmpMatrixBC, |
504 | - double* tmpBC) const{ | |
504 | + double* tmpVectorBC) const{ | |
505 | 505 | |
506 | 506 | double alphaBC = 1.0; |
507 | 507 | double betaBC = 0.0; |
508 | 508 | bool isColumnMajorMatrixBC = false; |
509 | - this->Dgemm(isColumnMajorMatrixB, isColumnMajorMatrixC, k, n, l, alphaBC, matrixB, matrixC, betaBC, tmpMatrixBC, tmpBC); | |
510 | - this->Dgemm(isColumnMajorMatrixA, isColumnMajorMatrixBC, m, n, k, alpha, matrixA, tmpMatrixBC, beta, matrixD, tmpD); | |
509 | + this->Dgemm(isColumnMajorMatrixB, isColumnMajorMatrixC, k, n, l, alphaBC, matrixB, matrixC, betaBC, tmpMatrixBC, tmpVectorBC); | |
510 | + this->Dgemm(isColumnMajorMatrixA, isColumnMajorMatrixBC, m, n, k, alpha, matrixA, tmpMatrixBC, beta, matrixD, tmpVectorD); | |
511 | 511 | } |
512 | 512 | |
513 | 513 | // matrixC = matrixA*matrixA^T |
@@ -153,9 +153,9 @@ public: | ||
153 | 153 | double const* const* matrixC, |
154 | 154 | double beta, |
155 | 155 | double** matrixD, |
156 | - double* tmpD, | |
156 | + double* tmpVectorD, | |
157 | 157 | double** tmpMatrixBC, |
158 | - double* tmpBC) const; | |
158 | + double* tmpVectorBC) const; | |
159 | 159 | void Dsyrk(molds_blas_int n, molds_blas_int k, |
160 | 160 | double const *const* matrixA, |
161 | 161 | double** matrixC)const; |