hamiltonian_linalg Module



Contents


Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: full_hamil_type = 1
integer, public, parameter :: sparse_hamil_type = 2
integer, public, parameter :: parallel_sparse_hamil_type = 3
integer, public, parameter :: direct_ci_type = 4
logical, public :: tCalcHFIndex = .True.
type(ras_vector), public, allocatable, dimension(:, :, :) :: direct_ci_inp
type(ras_vector), public, allocatable, dimension(:, :, :) :: direct_ci_out

Interfaces

public interface inner_product

  • public function inner_product_real(u, v) result(inner_product)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: u(:)
    real(kind=dp), intent(in) :: v(:)

    Return Value real(kind=dp)

  • public function inner_product_complex(u, v) result(inner_product)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=dp), intent(in) :: u(:)
    complex(kind=dp), intent(in) :: v(:)

    Return Value complex(kind=dp)

public interface euclidean_norm

  • public function euclidean_norm_real(u) result(euclidean_norm)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: u(:)

    Return Value real(kind=dp)

  • public function euclidean_norm_complex(u) result(euclidean_norm)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=dp), intent(in) :: u(:)

    Return Value real(kind=dp)

public interface euclidean_norm_square

  • public function euclidean_norm_square_real(u) result(euclidean_norm_square)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: u(:)

    Return Value real(kind=dp)

  • public function euclidean_norm_square_complex(u) result(euclidean_norm_square)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=dp), intent(in) :: u(:)

    Return Value real(kind=dp)

public interface multiply_hamil_and_vector

  • public subroutine multiply_hamil_and_vector_real(this, input_vector, output_vector)

    Arguments

    Type IntentOptional Attributes Name
    type(HamiltonianCalcType), intent(inout) :: this
    real(kind=dp), intent(in) :: input_vector(:)
    real(kind=dp), intent(out) :: output_vector(:)
  • public subroutine multiply_hamil_and_vector_complex(this, input_vector, output_vector)

    Arguments

    Type IntentOptional Attributes Name
    type(HamiltonianCalcType), intent(inout) :: this
    complex(kind=dp), intent(in) :: input_vector(:)
    complex(kind=dp), intent(out) :: output_vector(:)
  • public subroutine multiply_hamil_and_vector_full_real(this, input_vector, output_vector)

    Arguments

    Type IntentOptional Attributes Name
    type(HamiltonianCalcType), intent(inout) :: this
    real(kind=dp), intent(in) :: input_vector(:)
    real(kind=dp), intent(out) :: output_vector(:)
  • public subroutine multiply_hamil_and_vector_full_complex(this, input_vector, output_vector)

    Arguments

    Type IntentOptional Attributes Name
    type(HamiltonianCalcType), intent(inout) :: this
    complex(kind=dp), intent(in) :: input_vector(:)
    complex(kind=dp), intent(out) :: output_vector(:)

public interface mult_hamil_vector_sparse

  • public subroutine mult_hamil_vector_sparse_real(this, input_vector, output_vector)

    Arguments

    Type IntentOptional Attributes Name
    type(HamiltonianCalcType), intent(inout) :: this
    real(kind=dp), intent(in) :: input_vector(:)
    real(kind=dp), intent(out) :: output_vector(:)
  • public subroutine mult_hamil_vector_sparse_complex(this, input_vector, output_vector)

    Arguments

    Type IntentOptional Attributes Name
    type(HamiltonianCalcType), intent(inout) :: this
    complex(kind=dp), intent(in) :: input_vector(:)
    complex(kind=dp), intent(out) :: output_vector(:)

public interface mult_hamil_vector_par_sparse

  • public subroutine mult_hamil_vector_par_sparse_real(this, input_vector, output_vector)

    Arguments

    Type IntentOptional Attributes Name
    type(HamiltonianCalcType), intent(inout) :: this
    real(kind=dp), intent(in) :: input_vector(:)
    real(kind=dp), intent(out) :: output_vector(:)
  • public subroutine mult_hamil_vector_par_sparse_complex(this, input_vector, output_vector)

    Arguments

    Type IntentOptional Attributes Name
    type(HamiltonianCalcType), intent(inout) :: this
    complex(kind=dp), intent(in) :: input_vector(:)
    complex(kind=dp), intent(out) :: output_vector(:)

public interface mult_hamil_vector_direct_ci

  • public subroutine mult_hamil_vector_direct_ci_real(input_vector, output_vector)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: input_vector(:)
    real(kind=dp), intent(out) :: output_vector(:)
  • public subroutine mult_hamil_vector_direct_ci_complex(input_vector, output_vector)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=dp), intent(in) :: input_vector(:)
    complex(kind=dp), intent(out) :: output_vector(:)

Derived Types

type, public ::  HamiltonianCalcType

Components

Type Visibility Attributes Name Initial
integer, public :: hamil_type
integer, public :: space_size
integer(kind=MPIArg), public, allocatable, dimension(:) :: space_sizes
real(kind=dp), public, allocatable, dimension(:) :: partial_H_ket
integer(kind=MPIArg), public, allocatable, dimension(:) :: partial_H_ket_disps
real(kind=dp), public, allocatable, dimension(:, :) :: basis_vectors
integer, public :: hfindex
real(kind=dp), public, allocatable, dimension(:, :) :: projected_hamil
real(kind=dp), public, allocatable, dimension(:, :) :: projected_hamil_work
real(kind=dp), public, allocatable, dimension(:) :: temp_in
real(kind=dp), public, allocatable, dimension(:) :: temp_out
logical, public :: skip_calc
logical, public :: t_store_subspace_basis
logical, public :: t_orthogonalise
integer, public :: max_subspace_size

Functions

public function inner_product_real(u, v) result(inner_product)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: u(:)
real(kind=dp), intent(in) :: v(:)

Return Value real(kind=dp)

public function inner_product_complex(u, v) result(inner_product)

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: u(:)
complex(kind=dp), intent(in) :: v(:)

Return Value complex(kind=dp)

public function euclidean_norm_square_real(u) result(euclidean_norm_square)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: u(:)

Return Value real(kind=dp)

public function euclidean_norm_square_complex(u) result(euclidean_norm_square)

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: u(:)

Return Value real(kind=dp)

public function euclidean_norm_real(u) result(euclidean_norm)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: u(:)

Return Value real(kind=dp)

public function euclidean_norm_complex(u) result(euclidean_norm)

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: u(:)

Return Value real(kind=dp)


Subroutines

public subroutine InitHamiltonianCalc(this, print_info, hamil_type, max_subspace_size, t_store_subspace_basis, t_orthogonalise)

Arguments

Type IntentOptional Attributes Name
type(HamiltonianCalcType), intent(inout) :: this
logical, intent(in) :: print_info
integer, intent(in) :: hamil_type
integer, intent(in) :: max_subspace_size
logical, intent(in) :: t_store_subspace_basis
logical, intent(in) :: t_orthogonalise

public subroutine orthogonalise_against_previous_basis_vectors(this, basis_index)

Arguments

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

public subroutine build_full_hamiltonian_from_sparse(this, full_ham)

Arguments

Type IntentOptional Attributes Name
type(HamiltonianCalcType), intent(inout) :: this
real(kind=dp), intent(out) :: full_ham(:,:)

public subroutine DestroyHamiltonianCalc(this)

Arguments

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

public subroutine pretty_print(out_unit, mat)

Arguments

Type IntentOptional Attributes Name
integer :: out_unit
real(kind=dp) :: mat(:,:)

public subroutine multiply_hamil_and_vector_real(this, input_vector, output_vector)

Arguments

Type IntentOptional Attributes Name
type(HamiltonianCalcType), intent(inout) :: this
real(kind=dp), intent(in) :: input_vector(:)
real(kind=dp), intent(out) :: output_vector(:)

public subroutine multiply_hamil_and_vector_complex(this, input_vector, output_vector)

Arguments

Type IntentOptional Attributes Name
type(HamiltonianCalcType), intent(inout) :: this
complex(kind=dp), intent(in) :: input_vector(:)
complex(kind=dp), intent(out) :: output_vector(:)

public subroutine multiply_hamil_and_vector_full_real(this, input_vector, output_vector)

Arguments

Type IntentOptional Attributes Name
type(HamiltonianCalcType), intent(inout) :: this
real(kind=dp), intent(in) :: input_vector(:)
real(kind=dp), intent(out) :: output_vector(:)

public subroutine multiply_hamil_and_vector_full_complex(this, input_vector, output_vector)

Arguments

Type IntentOptional Attributes Name
type(HamiltonianCalcType), intent(inout) :: this
complex(kind=dp), intent(in) :: input_vector(:)
complex(kind=dp), intent(out) :: output_vector(:)

public subroutine mult_hamil_vector_sparse_real(this, input_vector, output_vector)

Arguments

Type IntentOptional Attributes Name
type(HamiltonianCalcType), intent(inout) :: this
real(kind=dp), intent(in) :: input_vector(:)
real(kind=dp), intent(out) :: output_vector(:)

public subroutine mult_hamil_vector_sparse_complex(this, input_vector, output_vector)

Arguments

Type IntentOptional Attributes Name
type(HamiltonianCalcType), intent(inout) :: this
complex(kind=dp), intent(in) :: input_vector(:)
complex(kind=dp), intent(out) :: output_vector(:)

public subroutine mult_hamil_vector_par_sparse_real(this, input_vector, output_vector)

Arguments

Type IntentOptional Attributes Name
type(HamiltonianCalcType), intent(inout) :: this
real(kind=dp), intent(in) :: input_vector(:)
real(kind=dp), intent(out) :: output_vector(:)

public subroutine mult_hamil_vector_par_sparse_complex(this, input_vector, output_vector)

Arguments

Type IntentOptional Attributes Name
type(HamiltonianCalcType), intent(inout) :: this
complex(kind=dp), intent(in) :: input_vector(:)
complex(kind=dp), intent(out) :: output_vector(:)

public subroutine mult_hamil_vector_direct_ci_real(input_vector, output_vector)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: input_vector(:)
real(kind=dp), intent(out) :: output_vector(:)

public subroutine mult_hamil_vector_direct_ci_complex(input_vector, output_vector)

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: input_vector(:)
complex(kind=dp), intent(out) :: output_vector(:)