Commit 49e19d71 authored by Yingzhou Li's avatar Yingzhou Li Committed by Victor Yu

Added HEEV for unit overlapping matrix

parent 27be7aa3
No preview for this file type
......@@ -84,6 +84,7 @@
\newcommand{\RCIAXPY}{\texttt{\color{blue}\detokenize{RCI_AXPY}}}
\newcommand{\RCICOLNORM}{\texttt{\color{blue}\detokenize{RCI_COL_NORM}}}
\newcommand{\RCIGEMM}{\texttt{\color{blue}\detokenize{RCI_GEMM}}}
\newcommand{\RCIHEEV}{\texttt{\color{blue}\detokenize{RCI_HEEV}}}
\newcommand{\RCIHEGV}{\texttt{\color{blue}\detokenize{RCI_HEGV}}}
\newcommand{\RCIPOTRF}{\texttt{\color{blue}\detokenize{RCI_POTRF}}}
\newcommand{\RCITRSM}{\texttt{\color{blue}\detokenize{RCI_TRSM}}}
......@@ -683,11 +684,13 @@ Details of these operations will be explained in Section~\ref{sec:op}.
& Perform $\gamma = \diag{A^\star A}$ \\
& \verbb+RCI_GEMM+ & $19$
& Perform $C = \alpha AB + \beta C$ \\
& \verbb+RCI_HEGV+ & $20$
& \verbb+RCI_HEEV+ & $20$
& Solve $A C = C D$ \\
& \verbb+RCI_HEGV+ & $21$
& Solve $A C = B C D$ \\
& \verbb+RCI_POTRF+ & $21$
& \verbb+RCI_POTRF+ & $22$
& Perform Cholesky factorization of $A$ \\
& \verbb+RCI_TRSM+ & $22$
& \verbb+RCI_TRSM+ & $23$
& Perform $B = \alpha A^{-1} B$ for triangular $A$ \\
\bottomrule
\end{tabular}
......@@ -773,7 +776,7 @@ instructions. We list the variable name, data type and explanation of
\multicolumn{1}{c}{\textbf{Explanation}}\\
\toprule
\verbb+jobz+ & character & N/V
& Eigenvector flag used in HEGV \\
& Eigenvector flag used in HEEV and HEGV \\
\verbb+uplo+ & character & U/L
& Upper or Lower triangular matrix \\
\verbb+side+ & character & R/L
......@@ -1373,6 +1376,34 @@ the transpose operations.
\subsubsection{Required by solver:} All
\subsection{RCI\_HEEV}
\subsubsection{Specified variables:} \verbb+jobz, uplo, n, lda,+
\verbb+Aidx+
\subsubsection{Operation:} Conduct the eigenvalue
decomposition for Hermitian matrix $A$ of size $n \times n$,
e.g., combining DSYEV and ZHEEV in LAPACK,
\begin{equation*}
A X = X \Lambda
\end{equation*}
for $X$ being eigenvectors and $\Lambda$ being the eigenvalues.
\verbb+uplo+ denotes that either the upper or lower triangular matrix
of $A$ are used in calculation. \verbb+jobz+ indicates
whether eigenvectors are needed, the returns are as follows,
\begin{equation*}
\begin{cases}
\texttt{resvec} \leftarrow \diag{\Lambda},
& \texttt{jobz} == N \\
\texttt{resvec} \leftarrow \diag{\Lambda}, A \leftarrow X,
& \texttt{jobz} == V \\
\end{cases}.
\end{equation*}
\subsubsection{Required by solver:} Davidson(conditional),
OMM(conditional), PPCG(conditional)
\subsection{RCI\_HEGV}
\subsubsection{Specified variables:} \verbb+jobz, uplo, n, lda, ldb,+
......@@ -1397,7 +1428,8 @@ whether eigenvectors are needed, the returns are as follows,
\end{cases}.
\end{equation*}
\subsubsection{Required by solver:} Davidson, OMM(conditional), PPCG
\subsubsection{Required by solver:} Davidson(conditional),
OMM(conditional), PPCG(conditional)
\subsection{RCI\_POTRF}
......@@ -1468,7 +1500,7 @@ tasks.
\subsubsection{Required task:} \RCINULL, \RCISTOP, \RCICONVERGE,
\RCIALLOCATE, \RCIDEALLOCATE, \RCIHMULTI, \RCISMULTI,
\RCIPMULTI, \RCICOPY, \RCISUBCOPY, \RCISUBCOL, \RCICOLSCALE, \RCIAXPY,
\RCICOLNORM, \RCIGEMM, \RCIHEGV, \RCIPOTRF, \RCITRSM
\RCICOLNORM, \RCIGEMM, \RCIHEEV / \RCIHEGV, \RCIPOTRF, \RCITRSM
\subsubsection{Other task:} None
......@@ -1486,7 +1518,7 @@ tasks.
\RCIPMULTI, \RCICOPY, \RCITRACE, \RCIDOT, \RCIAXPY,
\RCIGEMM
\subsubsection{Other task:} \RCIHEGV(if eigenvectors is needed)
\subsubsection{Other task:} \RCIHEEV / \RCIHEGV(if eigenvectors is needed)
\subsection{PPCG}
......@@ -1501,7 +1533,7 @@ tasks.
\subsubsection{Required task:} \RCINULL, \RCISTOP, \RCICONVERGE,
\RCIALLOCATE, \RCIDEALLOCATE, \RCIHMULTI, \RCISMULTI, \RCIPMULTI,
\RCICOPY, \RCISUBCOPY, \RCISUBCOL, \RCISUBROW, \RCITRACE, \RCICOLSCALE,
\RCIAXPY, \RCICOLNORM, \RCIGEMM, \RCIHEGV, \RCIPOTRF, \RCITRSM
\RCIAXPY, \RCICOLNORM, \RCIGEMM, \RCIHEEV / \RCIHEGV, \RCIPOTRF, \RCITRSM
\subsubsection{Other task:} None
......
......@@ -45,9 +45,10 @@ module ELSI_RCI_CONSTANTS
integer(i4), parameter :: RCI_AXPY = 17
integer(i4), parameter :: RCI_COL_NORM = 18
integer(i4), parameter :: RCI_GEMM = 19
integer(i4), parameter :: RCI_HEGV = 20
integer(i4), parameter :: RCI_POTRF = 21
integer(i4), parameter :: RCI_TRSM = 22
integer(i4), parameter :: RCI_HEEV = 20
integer(i4), parameter :: RCI_HEGV = 21
integer(i4), parameter :: RCI_POTRF = 22
integer(i4), parameter :: RCI_TRSM = 23
!&>
end module ELSI_RCI_CONSTANTS
......@@ -79,6 +79,10 @@ contains
! - rci_op_gemm(iS,task,trA,trB,m,n,k,
! alpha,Aidx,lda,Bidx,ldb,beta,Cidx,ldc)
! A * C = C * Diag(resvec)
! A will be rewritten by C
! - rci_op_heev(iS,task,jobz,uplo,n,Aidx,lda)
! A * C = B * C * Diag(resvec)
! A will be rewritten by C
! - rci_op_hegv(iS,task,jobz,uplo,n,Aidx,lda,Bidx,ldb)
......@@ -589,6 +593,34 @@ contains
end subroutine rci_op_gemm
subroutine rci_op_heev(iS, task, jobz, uplo, n, Aidx, lda)
!**** FUNCTION ********************************!
! A * C = C * Diag(resvec)
! A will be rewrite by C
implicit none
!**** INPUT ***********************************!
character, intent(in) :: jobz ! with/without eigenvector
character, intent(in) :: uplo ! upper or lower part of A
integer, intent(in) :: n ! size of A
integer, intent(in) :: Aidx ! indices for matrix A
integer, intent(in) :: lda ! lda for matrix A
!**** OUTPUT ***********************************!
type(rci_instr), intent(out) :: iS
integer(kind=i4), intent(out) :: task
task = RCI_HEGV
iS%jobz = jobz
iS%uplo = uplo
iS%n = n
iS%Aidx = Aidx
iS%lda = lda
end subroutine rci_op_heev
subroutine rci_op_hegv(iS, task, jobz, uplo, n, Aidx, lda, Bidx, ldb)
!**** FUNCTION ********************************!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment