Impurity Problem Solution Routines
The module ED_MAIN
contains the functions that initializes,
launch and finalize the EDIpack2.0 solver for the quantum impurity
problem.
The initialization, ed_init()
setups and allocates all the
internal variables and memory used in the code, which remain
available to the user until ed_finalize()
is called.
The main function is ed_solve:()
which aim to diagonalize the
impurity problem, evaluate the dynamical response functions and local
observables making them available to user through input/output
procedures.
Description
Contains routine that initialize, run and finalize the Impurity model solver
Quick access
- Routines:
ed_init_solver()
,ed_solve()
,ed_rebuild_gf()
,ed_finalize_solver()
Used modules
-
-
-
ed_input_vars
: Contains all global input variables which can be set by the user through the input file. A specific preocedureed_read_input()
should be called to read the input file usingparse_input_variable()
procedure from SciFortran. All variables are automatically set to a default, looked for and updated by reading into the file and, sequentially looked for and updated from command line (std.input) using the notation variable_name=variable_value(s) (case independent).ed_vars_global
: Contains all variables, arrays and derived types instances shared throughout the code. Specifically, it contains definitions of theeffective_bath
, thegfmatrix
and thesector
data structures.ed_eigenspace
: A class implementing a data structure to efficiently store the low part of the Fock space spectrum, automatically spreading and retrieving the eigenstates among/from MPI threads.ed_aux_funx
: Hosts a number of auxiliary procedures required in different parts of the code. Specifically, it implements: creation/annihilation fermionic operators, binary decomposition of integer representation of Fock states and setup the local impurity Hamiltonianed_setup
: Contains procedures to set up the Exact Diagonalization calculation, executing all internal consistency checks and allocation of the global memory.ed_bath
: Contains routines for setting, accessing, manipulating and clearing the bath of the Impurity problem.ed_chi_functions
Subroutines and functions
- interface ed_main/ed_init_solver(bath)
Initialize the Exact Diagonalization solver of EDIpack2.0. This procedure reserves and allocates all the memory required by the solver, performs all the consistency check and initializes the bath instance guessing or reading from a file. It requires as an input a double precision array of rank-1 [
nb
] for the single-impurity case or or rank-2 [nb
,nlat
] for the Real space DMFT case.nlat
is the number of inequivalent impurity sites, whilenb
depends on the bath size and geometry and can be obtained fromget_bath_dimension()
.- Parameters:
bath (various shapes) [real, inout] – user bath input array
- interface ed_main/ed_solve(bath[, sflag, fmpi, mpi_lanc, uloc_ii, ust_ii, jh_ii, jp_ii, jx_ii, iflag])
Launch the Exact Diagonalizaton solver for the single-site and multiple-site (R-DMFT) quantum impurity problem. It requires as an input a double precision array of rank-1 [
nb
] for the single-impurity case or or rank-2 [nb
,nlat
] for the Real space DMFT case.nlat
is the number of inequivalent impurity sites, whilenb
depends on the bath size and geometry and can be obtained fromget_bath_dimension()
.The solution is achieved in this sequence:
setup the MPI environment, if any
Set the internal bath instance
dmft_bath
copying from the user provided inputbath
Get the low energy spectrum: call
diagonalize_impurity()
Get the impurity Green’s functions: call
buildgf_impurity()
(ifsflag
=.true.
)Get the impurity susceptibilities, if any: call
buildchi_impurity()
(ifsflag
=.true.
)Get the impurity observables: call
observables_impurity()
Get the impurity local energy: call
local_energy_impurity()
Delete MPI environment and deallocate used structures
state_list
anddmft_bath
- Parameters:
bath (various shapes) [real, in] – user bath input array
- Options:
sflag [logical] – flag to calculate (
.true.
) or not (.false.
) Green’s functions and susceptibilities. Default.true.
.fmpi [logical] – flag to solve the impurity problem parallely (
.true.
) or not (.false.
). Default.true.
.mpi_lanc [logical] – parallelization strategy flag: if
.false.
each core serially solves an inequivalent site, if.true.
all cores parallely solve each site in sequence. Default.false.
.uloc_ii (size(bath, 1), norb) [real] – site-dependent values for
uloc
, overriding the ones in the input file. It has dimension [nlat
,norb
].ust_ii (size(bath, 1)) [real] – site-dependent values for
ust
, overriding the ones in the input file. It has dimension [nlat
].jh_ii (size(bath, 1)) [real] – site-dependent values for
jh
, overriding the ones in the input file. It has dimension [nlat
].jp_ii (size(bath, 1)) [real] – site-dependent values for
jp
, overriding the ones in the input file. It has dimension [nlat
].jx_ii (size(bath, 1)) [real] – site-dependent values for
jx
, overriding the ones in the input file. It has dimension [nlat
].iflag [logical] – flag to calculate (
.true.
) or not (.false.
) Green’s functions and susceptibilities. Default.true.
.
- interface ed_main/ed_rebuild_gf(nlat)
Re-build the impurity Green’s functions and self-energies using the stored weights and poles from
impgmatrix
data structure, instead of calculating them from the ED routine. Store them in the global variablesimpsmats
/impgmats
: normal, Matsubara axisimpsreal
/impgreal
: normal, real frequency axisimpsamats
/impfmats
: anomalous, Matsubara axisimpsareal
/impfreal
: anomalous, real-frequency axissmats_ineq
/gmats_ineq
: normal, Matsubara axis, real-space DMFTsreal_ineq
/greal_ineq
: normal, real frequency axis, real-space DMFTsamats_ineq
/fmats_ineq
: anomalous, Matsubara axis, real-space DMFTsareal_ineq
/freal_ineq
: anomalous, real frequency axis, real-space DMFT
- Parameters:
nlat [integer] – number of inequivalent impurity sites for real-space DMFT
- interface ed_main/ed_finalize_solver(nineq)
Finalize the Exact Diagonalization solver, clean up all the allocated memory.
- Parameters:
nineq [integer] – number of inequivalent impurity sites for real-space DMFT