DIIS (unsigned int strt=1, unsigned int ndi=5, value_type dmp=0, unsigned int ngr=1, unsigned int ngrdiis=1, value_type mf=0)
Constructor.
void
extrapolate (D &x, D &error, bool extrapolate_error=false)
void
start_extrapolation ()
calling this function forces the extrapolation to start upon next call to extrapolate() even if this object was initialized with start value greater than the current iteration index.
void
reinitialize (const D *data=0)
Detailed Description
template<typename D>
class libint2::DIIS< D >
DIIS (`‘direct inversion of iterative subspace’') extrapolation.
The DIIS class provides DIIS extrapolation to an iterative solver of (systems of) linear or nonlinear equations of the form, where is a (non-linear) function of (in general, is a set of numeric values). Such equations are usually solved iteratively as follows:
given a current guess at the solution, , evaluate the error (`‘residual’') (NOTE that the dimension of and do not need to coincide);
use the error to compute an updated guess ;
proceed until a norm of the error is less than the target precision . Another convergence criterion may include . \ For example, in the Hartree-Fock method in the density form, one could choose , the one-electron density matrix, and , where is the Fock matrix, a linear function of the density. Because is a linear function of the density and DIIS uses a linear extrapolation, it is possible to just extrapolate the Fock matrix itself, i.e. and . \ Similarly, in the Hartree-Fock method in the molecular orbital representation, DIIS is used to extrapolate the Fock matrix, i.e. and , where and are the occupied and unoccupied orbitals, respectively. \ Here's a short description of the DIIS method. Given a set of solution guess vectors and the corresponding error vectors DIIS tries to find a linear combination of that would minimize the error by solving a simple linear system set up from the set of errors. The solution is a vector of coefficients that can be used to obtain an improved : A more complicated version of DIIS introduces mixing: Note that the mixing is not used in the first iteration. \ The original DIIS reference: P. Pulay, Chem. Phys. Lett. 73, 393 (1980).
The DIIS extrapolation will begin on the iteration given by this integer (default = 1).
ndi
This integer maximum number of data sets to retain (default = 5).
dmp
This nonnegative floating point number is used to dampen the DIIS extrapolation (default = 0.0).
ngr
The number of iterations in a DIIS group. DIIS extrapolation is only used for the first ngrdiis of these iterations (default = 1). If ngr is 1 and ngrdiis is greater than 0, then DIIS will be used on all iterations after and including the start iteration.
ngrdiis
The number of DIIS extrapolations to do at the beginning of an iteration group. See the documentation for ngr (default = 1).
mf
This real number in [0,1] is used to dampen the DIIS extrapolation by mixing the input data with the output data for each iteration (default = 0.0), which performs no mixing. The approach described in Kerker, Phys. Rev. B, 23, p3082, 1981.