Octopus
subspace_oct_m Module Reference

Data Types

type  subspace_t
 

Functions/Subroutines

subroutine subspace_init (this, namespace, st)
 Initialize Subspace type. More...
 
subroutine, public dsubspace_diag (this, namespace, mesh, st, hm, ik, eigenval, diff, nonortho)
 Diagonalises the Hamiltonian in the subspace defined by the states. More...
 
subroutine dsubspace_diag_standard (namespace, mesh, st, hm, ik, eigenval, diff, nonortho)
 Diagonalises the Hamiltonian in the subspace defined by the states. More...
 
subroutine dsubspace_diag_scalapack (namespace, mesh, st, hm, ik, eigenval, psi, diff)
 This routine diagonalises the Hamiltonian in the subspace defined by the states; this version is aware of parallelization in states but consumes more memory. More...
 
subroutine dsubspace_diag_hamiltonian (namespace, mesh, st, hm, ik, hmss, overlap)
 Diagonalises the Hamiltonian in the subspace defined by the states. More...
 
subroutine, public zsubspace_diag (this, namespace, mesh, st, hm, ik, eigenval, diff, nonortho)
 Diagonalises the Hamiltonian in the subspace defined by the states. More...
 
subroutine zsubspace_diag_standard (namespace, mesh, st, hm, ik, eigenval, diff, nonortho)
 Diagonalises the Hamiltonian in the subspace defined by the states. More...
 
subroutine zsubspace_diag_scalapack (namespace, mesh, st, hm, ik, eigenval, psi, diff)
 This routine diagonalises the Hamiltonian in the subspace defined by the states; this version is aware of parallelization in states but consumes more memory. More...
 
subroutine zsubspace_diag_hamiltonian (namespace, mesh, st, hm, ik, hmss, overlap)
 Diagonalises the Hamiltonian in the subspace defined by the states. More...
 

Function/Subroutine Documentation

◆ subspace_init()

subroutine subspace_oct_m::subspace_init ( class(subspace_t), intent(out)  this,
type(namespace_t), intent(in)  namespace,
type(states_elec_t), intent(in)  st 
)
private

Initialize Subspace type.

Definition at line 172 of file subspace.F90.

◆ dsubspace_diag()

subroutine, public subspace_oct_m::dsubspace_diag ( type(subspace_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(inout), target  st,
type(hamiltonian_elec_t), intent(in)  hm,
integer, intent(in)  ik,
real(real64), dimension(:), intent(out), contiguous  eigenval,
real(real64), dimension(:), intent(out), contiguous  diff,
logical, intent(in), optional  nonortho 
)

Diagonalises the Hamiltonian in the subspace defined by the states.

On exit, the states are always orthonormal.

Definition at line 303 of file subspace.F90.

◆ dsubspace_diag_standard()

subroutine subspace_oct_m::dsubspace_diag_standard ( type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(inout), target  st,
type(hamiltonian_elec_t), intent(in)  hm,
integer, intent(in)  ik,
real(real64), dimension(:), intent(out), contiguous  eigenval,
real(real64), dimension(:), intent(out)  diff,
logical, intent(in), optional  nonortho 
)
private

Diagonalises the Hamiltonian in the subspace defined by the states.

On exit, the states are always orthonormal. On entry, they can be non-orthonomal. In this case, we solve a generalized eigenvalue problem using the overlap matrix. This is usefull to avoid doing before a Cholesky decomposition of the states

Parameters
[in,out]stOrthogonalised eigenstates
[out]eigenvalEigenvalues
[out]diffResidue
[in]nonorthoif yes, eigenvectors are not orthonormal on entry

Definition at line 371 of file subspace.F90.

◆ dsubspace_diag_scalapack()

subroutine subspace_oct_m::dsubspace_diag_scalapack ( type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(inout)  st,
type(hamiltonian_elec_t), intent(in)  hm,
integer, intent(in)  ik,
real(real64), dimension(:), intent(out)  eigenval,
real(real64), dimension(:, :, st%st_start:), intent(inout), contiguous  psi,
real(real64), dimension(:), intent(out)  diff 
)
private

This routine diagonalises the Hamiltonian in the subspace defined by the states; this version is aware of parallelization in states but consumes more memory.

Definition at line 461 of file subspace.F90.

◆ dsubspace_diag_hamiltonian()

subroutine subspace_oct_m::dsubspace_diag_hamiltonian ( type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(inout), target  st,
type(hamiltonian_elec_t), intent(in)  hm,
integer, intent(in)  ik,
real(real64), dimension(:, :), intent(out), contiguous  hmss,
real(real64), dimension(:, :), intent(out), optional, contiguous  overlap 
)
private

Diagonalises the Hamiltonian in the subspace defined by the states.

Definition at line 623 of file subspace.F90.

◆ zsubspace_diag()

subroutine, public subspace_oct_m::zsubspace_diag ( type(subspace_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(inout), target  st,
type(hamiltonian_elec_t), intent(in)  hm,
integer, intent(in)  ik,
real(real64), dimension(:), intent(out), contiguous  eigenval,
real(real64), dimension(:), intent(out), contiguous  diff,
logical, intent(in), optional  nonortho 
)

Diagonalises the Hamiltonian in the subspace defined by the states.

On exit, the states are always orthonormal.

Definition at line 914 of file subspace.F90.

◆ zsubspace_diag_standard()

subroutine subspace_oct_m::zsubspace_diag_standard ( type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(inout), target  st,
type(hamiltonian_elec_t), intent(in)  hm,
integer, intent(in)  ik,
real(real64), dimension(:), intent(out), contiguous  eigenval,
real(real64), dimension(:), intent(out)  diff,
logical, intent(in), optional  nonortho 
)
private

Diagonalises the Hamiltonian in the subspace defined by the states.

On exit, the states are always orthonormal. On entry, they can be non-orthonomal. In this case, we solve a generalized eigenvalue problem using the overlap matrix. This is usefull to avoid doing before a Cholesky decomposition of the states

Parameters
[in,out]stOrthogonalised eigenstates
[out]eigenvalEigenvalues
[out]diffResidue
[in]nonorthoif yes, eigenvectors are not orthonormal on entry

Definition at line 982 of file subspace.F90.

◆ zsubspace_diag_scalapack()

subroutine subspace_oct_m::zsubspace_diag_scalapack ( type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(inout)  st,
type(hamiltonian_elec_t), intent(in)  hm,
integer, intent(in)  ik,
real(real64), dimension(:), intent(out)  eigenval,
complex(real64), dimension(:, :, st%st_start:), intent(inout), contiguous  psi,
real(real64), dimension(:), intent(out)  diff 
)
private

This routine diagonalises the Hamiltonian in the subspace defined by the states; this version is aware of parallelization in states but consumes more memory.

Definition at line 1072 of file subspace.F90.

◆ zsubspace_diag_hamiltonian()

subroutine subspace_oct_m::zsubspace_diag_hamiltonian ( type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(inout), target  st,
type(hamiltonian_elec_t), intent(in)  hm,
integer, intent(in)  ik,
complex(real64), dimension(:, :), intent(out), contiguous  hmss,
complex(real64), dimension(:, :), intent(out), optional, contiguous  overlap 
)
private

Diagonalises the Hamiltonian in the subspace defined by the states.

Definition at line 1234 of file subspace.F90.