Commit 04e65693 authored by Yingzhou Li's avatar Yingzhou Li Committed by Victor Yu

Revised code together with the corresponding part in doc

parent 973ee4bc
......@@ -14,13 +14,13 @@ reply:
clean:
rm -f $~ *.aux *.idx *.log *.blg *.bbl *.toc *.dvi *.ps *.out *.gz \
*.fdb_latexmk *.fls
*.fdb_latexmk *.fls *.cpt
cleanless:
rm -f $~ *.aux *.idx *.log *.blg *.toc *.dvi *.ps *.out *.gz \
*.fdb_latexmk *.fls
*.fdb_latexmk *.fls *.cpt
cleanall:
rm -f $~ *.aux *.idx *.log *.blg *.bbl *.toc *.dvi *.ps *.out *.gz \
*.fdb_latexmk *.fls \
*.fdb_latexmk *.fls *.cpt \
figure/*-eps-converted-to.pdf $(name).pdf
zip:
zip $(name).zip *.sty *.bib *.bbl *.tex *.pdf figures/*.eps \
......
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -32,3 +32,98 @@
year = {2018}
}
@misc{Dongarra1995,
author={J. Dongarra and V. Eijkhout and A. Kalhan},
title={Reverse communication interface for linear algebra templates
for iterative methods, {Technical Report, University of Tennessee,
Knoxville, TN, USA}},
year={1995}
}
@article{Davidson1975,
author={Ernest R. Davidson},
journal={Journal of Computational Physics},
number={1},
pages={87-94},
title={The iterative calculation of a few of the lowest eigenvalues
and corresponding eigenvectors of large real-symmetric matrices},
volume={17},
year={1975}
}
@article{Sleijpen1996,
author={Gerard L. G. Sleijpen and Henk A. {Van der Vorst}},
journal={SIAM Journal on Matrix Analysis and Applications},
number={2},
pages={401-425},
title={A {J}acobi-{D}avidson iteration method for linear eigenvalue
problems},
volume={17},
year={1996}
}
@article{Lu2017a,
author={Jianfeng Lu and Kyle Thicke},
journal={Journal of Computational Physics},
pages={87-103},
title={Orbital minimization method with $\ell 1$ regularization},
volume={336},
year={2017}
}
@article{Lu2017b,
author={Jianfeng Lu and Haizhao Yang},
journal={Multiscale Modeling and Simulation},
number={1},
pages={254-273},
title={Preconditioning orbital minimization method for planewave
discretization},
volume={15},
year={2017}
}
@article{Corsetti2014,
title={The orbital minimization method for electronic structure
calculations with finite-range atomic basis sets},
journal={Computer Physics Communications},
volume={185},
number={3},
pages={873-883},
year={2014},
author={Fabiano Corsetti}
}
@article{Vecharynski2015,
author={Eugene Vecharynski and Chao Yang and John E. Pask},
journal={Journal of Computational Physics},
pages={73-89},
title={A projected preconditioned conjugate gradient algorithm for
computing many extreme eigenpairs of a {H}ermitian matrix},
volume={290},
year={2015}
}
@article{Zhou2006,
author={Yunkai Zhou and Yousef Saad and Murilo L. Tiago and James R.
Chelikowsky},
journal={Journal of Computational Physics},
number={1},
pages={172-184},
title={Self-consistent-field calculations using {C}hebyshev-filtered
subspace iteration},
volume={219},
year={2006}
}
@article{Banerjee2016,
author={Amartya S. Banerjee and Lin Lin and Wei Hu and Chao Yang and
John E. Pask},
title={Chebyshev polynomial filtered subspace iteration in the
discontinuous {Galerkin} method for large-scale electronic
structure calculations},
journal={The Journal of Chemical Physics},
volume={145},
number={15},
pages={154101},
year={2016}
}
......@@ -197,12 +197,12 @@ contains
nact = r_h%n_state
n_state = r_h%n_state
max_iter = r_h%max_iter
max_inneriter = r_h%max_inneriter
max_inneriter = r_h%cheb_max_inneriter
tol_iter = r_h%tol_iter
niter = 0
ninneriter = 0
c = (r_h%est_lb+r_h%est_ub)/2.0_r8
r = (r_h%est_ub-r_h%est_lb)/2.0_r8
c = (r_h%cheb_est_lb+r_h%cheb_est_ub)/2.0_r8
r = (r_h%cheb_est_ub-r_h%cheb_est_lb)/2.0_r8
allocate (Vec_conv(n))
Vec_conv = 0.0_r8
......
......@@ -26,26 +26,26 @@ module ELSI_RCI_CONSTANTS
! Constant of task
integer(i4), parameter :: RCI_NULL = 0
integer(i4), parameter :: RCI_CONVERGE = 1
integer(i4), parameter :: RCI_ALLOCATE = 2
integer(i4), parameter :: RCI_DEALLOCATE = 3
integer(i4), parameter :: RCI_STOP = 4
integer(i4), parameter :: RCI_STOP = 1
integer(i4), parameter :: RCI_CONVERGE = 2
integer(i4), parameter :: RCI_ALLOCATE = 3
integer(i4), parameter :: RCI_DEALLOCATE = 4
integer(i4), parameter :: RCI_H_MULTI = 5
integer(i4), parameter :: RCI_S_MULTI = 6
integer(i4), parameter :: RCI_P_MULTI = 7
integer(i4), parameter :: RCI_GEMM = 8
integer(i4), parameter :: RCI_AXPY = 9
integer(i4), parameter :: RCI_COPY = 10
integer(i4), parameter :: RCI_SUBCOPY = 11
integer(i4), parameter :: RCI_COPY = 8
integer(i4), parameter :: RCI_SUBCOPY = 9
integer(i4), parameter :: RCI_SUBCOL = 10
integer(i4), parameter :: RCI_SUBROW = 11
integer(i4), parameter :: RCI_TRACE = 12
integer(i4), parameter :: RCI_DOT = 13
integer(i4), parameter :: RCI_SCALE = 14
integer(i4), parameter :: RCI_COLSCALE = 15
integer(i4), parameter :: RCI_ROWSCALE = 16
integer(i4), parameter :: RCI_HEGV = 17
integer(i4), parameter :: RCI_AXPY = 17
integer(i4), parameter :: RCI_COL_NORM = 18
integer(i4), parameter :: RCI_SUBCOL = 19
integer(i4), parameter :: RCI_SUBROW = 20
integer(i4), parameter :: RCI_GEMM = 19
integer(i4), parameter :: RCI_HEGV = 20
integer(i4), parameter :: RCI_POTRF = 21
integer(i4), parameter :: RCI_TRSM = 22
!&>
......
......@@ -13,6 +13,37 @@ module ELSI_RCI_DATATYPE
implicit none
type, public :: rci_handle
! Systems
integer(i4) :: n_basis
integer(i4) :: n_state
integer(i4) :: max_n
logical :: ovlp_is_unit = .false.
! Iteration
integer(i4) :: solver = RCI_SOLVER
integer(i4) :: max_iter = 1000
integer(i4) :: n_res ! size of resvec not specified by user
real(r8) :: tol_iter = 1E-6
integer(i4) :: verbose = 0 ! output verbose
! Output
integer(i4) :: total_iter
real(r8) :: total_energy
! PPCG
integer(i4) :: ppcg_sbsize
integer(i4) :: ppcg_rrstep
real(r8) :: ppcg_tol_lock
! ChebFilter
real(r8) :: cheb_est_lb
real(r8) :: cheb_est_ub
integer(i4) :: cheb_max_inneriter
end type
! RCI Instruction type
! H: Hamiltonian; S: Overlapping matrix; P: Preconditioner
! A, B, C: General matrices
......@@ -23,7 +54,7 @@ module ELSI_RCI_DATATYPE
character :: trH, trS, trP, trA, trB ! Operation for H, S, P, A, B
integer :: m, n ! size of the output matrix
integer :: k ! size of the intermedia multiplication
integer :: k ! size of the intermediate multiplication
integer :: lda, ldb, ldc ! leading size for matrix A, B and C
integer :: rAoff,cAoff ! row and column offset of A
......@@ -35,41 +66,4 @@ module ELSI_RCI_DATATYPE
end type
type, public :: rci_handle
integer(i4) :: solver = RCI_SOLVER
! Output
logical :: print_mem = .false.
! Overlap
logical :: ovlp_is_unit = .false.
! Iteration
integer(i4) :: max_iter
integer(i4) :: n_res ! size of resvec
real(r8) :: tol_iter
integer(i4) :: verbose ! output verbose
! Result
integer(i4) :: total_iter
real(r8) :: total_energy
! Physics
integer(i4) :: n_basis
integer(i4) :: n_state
integer(i4) :: max_n
! PPCG
integer(i4) :: ppcg_sbsize
integer(i4) :: ppcg_rrstep
real(r8) :: ppcg_tol_lock
! ChebFilter
real(r8) :: est_lb
real(r8) :: est_ub
integer(i4) :: max_inneriter
end type
end module ELSI_RCI_DATATYPE
This diff is collapsed.
......@@ -48,9 +48,9 @@ contains
r_h%ppcg_rrstep = min(5,max_iter)
! ChebFilter default
r_h%est_lb = 0.25
r_h%est_ub = 20
r_h%max_inneriter = 10
r_h%cheb_est_lb = 0.25
r_h%cheb_est_ub = 20
r_h%cheb_max_inneriter = 10
select case (solver)
case (RCI_SOLVER_DAVIDSON)
......
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