lanczos_general Module



Contents


Derived Types

type, public ::  LanczosCalcType

Components

Type Visibility Attributes Name Initial
type(HamiltonianCalcType), public :: super
real(kind=dp), public, allocatable :: first_v(:)
real(kind=dp), public, allocatable :: old_v(:)
real(kind=dp), public, allocatable :: current_v(:)
integer, public :: n_states
real(kind=dp), public :: beta_0
real(kind=dp), public :: beta_1
real(kind=dp), public, allocatable :: lanczos_vector(:)
real(kind=dp), public, allocatable :: ritz_values_old(:)
real(kind=dp), public, allocatable :: ritz_values(:)
real(kind=dp), public, allocatable :: T_eigenvectors(:,:)
real(kind=dp), public, allocatable :: ritz_vectors(:,:)
real(kind=dp), public, allocatable :: eigenvalues(:)
real(kind=dp), public, allocatable :: eigenvectors(:,:)
logical, public, allocatable :: t_states_converged(:)
integer, public :: max_restarts
real(kind=dp), public :: convergence_error
real(kind=dp), public :: orthog_tolerance

Functions

public pure function getAlpha(this, i) result(val)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(in) :: this
integer, intent(in) :: i

Return Value real(kind=dp)

public pure function getBeta(this, i) result(val)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(in) :: this
integer, intent(in) :: i

Return Value real(kind=dp)

public function check_deltas(this, k) result(t)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(inout) :: this
integer :: k

Return Value logical

public function check_delta(this, k, i_state) result(t)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(inout) :: this
integer :: k
integer :: i_state

Return Value logical

public function get_rayleigh_quotient(this, i_state) result(exp_val)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(inout) :: this
integer, intent(in) :: i_state

Return Value real(kind=dp)

public function compute_residual_norm(this, i_state) result(norm)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(inout) :: this
integer, intent(in) :: i_state

Return Value real(kind=dp)

public function get_det_ms(det) result(ms)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: det(:)

Return Value integer

public function get_state_ms(det_list, vec) result(ms)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: det_list(:,:)
real(kind=dp), intent(in) :: vec(:)

Return Value real(kind=dp)


Subroutines

public pure subroutine setAlpha(this, i, val)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(inout) :: this
integer, intent(in) :: i
real(kind=dp), intent(in) :: val

public subroutine setBeta(this, i, val)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(inout) :: this
integer, intent(in) :: i
real(kind=dp), intent(in) :: val

public subroutine addVec(this, k, vec)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(inout) :: this
integer, intent(in) :: k
real(kind=dp), intent(in) :: vec(:)

public subroutine InitLanczosCalc(this, det_list, print_info, hamil_type, n_states, max_lanczos_vecs, t_store_subspace_basis, t_orthogonalise, max_restarts, energy_precision, ritz_overlap_precision)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(out) :: this
integer, intent(in) :: det_list(:,:)
logical, intent(in) :: print_info
integer, intent(in) :: hamil_type
integer, intent(in) :: n_states
integer, intent(in) :: max_lanczos_vecs
logical, intent(in) :: t_store_subspace_basis
logical, intent(in) :: t_orthogonalise
integer, intent(in) :: max_restarts
integer, intent(in) :: energy_precision
integer, intent(in) :: ritz_overlap_precision

public subroutine FreeLanczosCalc(this)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(inout) :: this

public subroutine DestroyLanczosCalc(this)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(inout) :: this

public subroutine perform_orthogonality_test(this)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(inout) :: this

public subroutine project_hamiltonian_lanczos(this, basis_index)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(inout) :: this
integer, intent(in) :: basis_index

public subroutine diagonalise_tridiagonal_non_hermitian(this, N, t_calc_eigenvectors)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(inout) :: this
integer, intent(in) :: N
logical, intent(in) :: t_calc_eigenvectors

public subroutine diagonalise_tridiagonal(this, N, t_calc_eigenvectors)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(inout) :: this
integer, intent(in) :: N
logical, intent(in) :: t_calc_eigenvectors

public subroutine compute_ritz_vectors(this, k)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(inout) :: this
integer, intent(in) :: k

public subroutine perform_lanczos(this, det_list, n_states, hamil_type, print_info_in)

Arguments

Type IntentOptional Attributes Name
type(LanczosCalcType), intent(inout) :: this
integer, intent(in) :: det_list(:,:)
integer, intent(in) :: n_states
integer, intent(in) :: hamil_type
logical, intent(in) :: print_info_in