Stored Hamiltonian \(H\times\vec{v}\)
The module ed_hamiltonian_normal_stored_hxv
implements the
construction of the sector Hamiltonian sparse matrices and the related
matrix-vector products algorithms, serial or parallel and according to
actual quantum numbers, as defined by the value of the variable
ed_total_ud
distinguishing between conservation of total
or orbital resolved spin occupations.
Description
Constructs each terms of the sector Hamiltonian storing them into different sparse_matrix
instances, implement the corresponding matrix-vector products using stored sparse matrices.
Quick access
- Routines:
ed_buildh_normal_main()
,ed_buildh_normal_orbs()
,spmatvec_normal_main()
,spmatvec_normal_orbs()
,spmatvec_mpi_normal_main()
,spmatvec_mpi_normal_orbs()
Used modules
ed_hamiltonian_normal_common
: Global variables related to sector Hamiltonian construction. It contains thevector_transpose_mpi()
implementing the MPIAllv-2-Allv
parallel matrix transposition.
Subroutines and functions
- subroutine ed_hamiltonian_normal_stored_hxv/ed_buildh_normal_main([hmat])
Builds the sector Hamiltonian \(H\) and save each term in a suitable sparse matrix instance for
ed_total_ed
=True
. If the dimensiondim
of the sector are smaller thanlanc_dim_threshold
the global matrix is dumped to the optional variablehmat
.- The sparse matrices are:
\(H_d \rightarrow\)
sph0d
: diagonal part of the electronic Hamiltonian\(H_\uparrow \rightarrow\)
sph0ups
: \(\uparrow\) spin terms of the eletronic Hamiltonian\(H_\downarrow \rightarrow\)
sph0dws
: \(\downarrow\) spin terms of the eletronic Hamiltonian\(H_{nd} \rightarrow\)
sph0nd
: non-diagonal part of the eletronic Hamiltonian\(H_{ph} \rightarrow\)
sph0_ph
: phonon part of the of the global Hamiltonian\(H_{e-eph} \rightarrow\)
sph0e_eph
: electron part of the electron-phonon term of the global Hamiltonian\(H_{ph_eph} \rightarrow\)
sph0e_ph
: phonon part of the electron-phonon term of the global Hamiltonian
- Options:
hmat (•, •) [real] – optional dense matrix
- subroutine ed_hamiltonian_normal_stored_hxv/ed_buildh_normal_orbs([hmat])
Builds the sector Hamiltonian \(H\) and save each term in a suitable sparse matrix instance for
ed_total_ed
=False
. If the dimensiondim
of the sector are smaller thanlanc_dim_threshold
the global matrix is dumped to the optional variablehmat
.- The sparse matrices are:
\(H_d \rightarrow\)
sph0d
: diagonal part of the electronic Hamiltonian\(\vec{H}_\uparrow \rightarrow\)
sph0ups
: \(\uparrow\) spin terms of the eletronic Hamiltonian\(\vec{H}_\downarrow \rightarrow\)
sph0dws
: \(\downarrow\) spin terms of the eletronic Hamiltonian\(H_{nd} \rightarrow\)
sph0nd
: non-diagonal part of the eletronic Hamiltonian\(H_{ph} \rightarrow\)
sph0_ph
: phonon part of the of the global Hamiltonian\(H_{e-eph} \rightarrow\)
sph0e_eph
: electron part of the electron-phonon term of the global Hamiltonian\(H_{ph_eph} \rightarrow\)
sph0e_ph
: phonon part of the electron-phonon term of the global Hamiltonian
where \(\vec{H}_\sigma = [H^1_\sigma,\dots,H^{Norb}_\sigma]\) are the orbital and spin resolved Hamiltonian matrices.
- Options:
hmat (•, •) [real] – optional dense matrix
- subroutine ed_hamiltonian_normal_stored_hxv/spmatvec_normal_main(nloc, v, hv)
Serial version of the matrix-vector product \(\vec{w}=H\times\vec{v}\) used in Arpack/Lanczos algorithm for
ed_total_ud
=True
This procedures applies one by one each term of the global Hamiltonian to an input vector using the stored sparse matrices.- Options:
nloc [integer] – Global dimension of the problem.
size(v)=Nloc=size(Hv)
- Parameters:
v (nloc) [real] – input vector (passed by Arpack/Lanczos) \(\vec{v}\)
hv (nloc) [real] – output vector (required by Arpack/Lanczos) \(\vec{w}\)
- subroutine ed_hamiltonian_normal_stored_hxv/spmatvec_normal_orbs(nloc, v, hv)
Serial version of the matrix-vector product \(\vec{w}=H\times\vec{v}\) used in Arpack/Lanczos algorithm for
ed_total_ud
=False
This procedures applies one by one each term of the global Hamiltonian to an input vector using the stored sparse matrices.- Options:
nloc [integer] – Global dimension of the problem.
size(v)=Nloc=size(Hv)
- Parameters:
v (nloc) [real] – input vector (passed by Arpack/Lanczos) \(\vec{v}\)
hv (nloc) [real] – output vector (required by Arpack/Lanczos) \(\vec{w}\)
- subroutine ed_hamiltonian_normal_stored_hxv/spmatvec_mpi_normal_main(nloc, v, hv)
MPI parallel version of the matrix-vector product \(\vec{w}=H\times\vec{v}\) used in P-Arpack/P-Lanczos algorithm for
ed_total_ud
=True
. This procedures applies one by one each term of the global Hamiltonian to a part of the vector own by the thread using the stored sparse matrices.- Options:
nloc [integer] – Local dimension of the vector chunk.
size(v)=Nloc
with \(\sum_p\)Nloc
=Dim
- Parameters:
v (nloc) [real] – input vector part (passed by P-Arpack/P-Lanczos) \(\vec{v}\)
hv (nloc) [real] – output vector (required by P-Arpack/P-Lanczos) \(\vec{w}\)
- subroutine ed_hamiltonian_normal_stored_hxv/spmatvec_mpi_normal_orbs(nloc, v, hv)
MPI parallel version of the matrix-vector product \(\vec{w}=H\times\vec{v}\) used in P-Arpack/P-Lanczos algorithm for
ed_total_ud
=False
. This procedures applies one by one each term of the global Hamiltonian to a part of the vector own by the thread using the stored sparse matrices.- Options:
nloc [integer] – Local dimension of the vector chunk.
size(v)=Nloc
with \(\sum_p\)Nloc
=Dim
- Parameters:
v (nloc) [real] – input vector part (passed by P-Arpack/P-Lanczos) \(\vec{v}\)
hv (nloc) [real] – output vector (required by P-Arpack/P-Lanczos) \(\vec{w}\)