TiledArray
0.7.0
|
DIIS (‘‘direct inversion of iterative subspace’’) extrapolation. More...
#include <diis.h>
Public Types | |
typedef D::element_type | value_type |
typedef detail::scalar_t< value_type > | scalar_type |
typedef Eigen::Matrix< value_type, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > | EigenMatrixX |
typedef Eigen::Matrix< value_type, Eigen::Dynamic, 1 > | EigenVectorX |
Public Member Functions | |
DIIS (unsigned int strt=1, unsigned int ndi=5, scalar_type dmp=0, unsigned int ngr=1, unsigned int ngrdiis=1, scalar_type mf=0) | |
Constructor. More... | |
~DIIS () | |
void | extrapolate (D &x, D &error, bool extrapolate_error=false) |
void | extrapolate (D &x, const EigenVectorX &c, unsigned int nskip=0, bool increase_iter=false) |
void | compute_extrapolation_parameters (const D &error, bool increase_iter=false) |
void | start_extrapolation () |
void | reinitialize (const D *data=0) |
const EigenVectorX & | get_coeffs () |
calling this function returns extrapolation coefficients More... | |
unsigned int | get_nskip () |
calling this function returns number of skipped vectors in extrapolation More... | |
bool | parameters_computed () |
calling this function returns whether diis parameters C_ and nskip_ have been computed More... | |
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:
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).
D | type of x |
typedef Eigen::Matrix<value_type, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> TiledArray::DIIS< D >::EigenMatrixX |
typedef Eigen::Matrix<value_type, Eigen::Dynamic, 1> TiledArray::DIIS< D >::EigenVectorX |
typedef detail::scalar_t<value_type> TiledArray::DIIS< D >::scalar_type |
typedef D::element_type TiledArray::DIIS< D >::value_type |
|
inline |
Constructor.
strt | 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. |
|
inline |
|
inline |
calling this function computes extrapolation parameters, i.e. coefficients C_
and number of skipped vectors nskip_
error | the most recent error |
increase_iter | whether to increase the diis iteration index (default = false) |
Definition at line 225 of file diis.h.
|
inline |
[in,out] | x | On input, the most recent solution guess; on output, the extrapolated guess |
[in,out] | error | On input, the most recent error; on output, the if extrapolate_error == true will be the extrapolated error, otherwise the value unchanged |
extrapolate_error | whether to extrapolate the error (default = false). |
Definition at line 136 of file diis.h.
|
inline |
calling this function performs the extrapolation with provided coefficients.
[in,out] | x | On input, the most recent solution guess; on output, the extrapolated guess |
c | provided coefficients | |
nskip | number of old vectors to skip (default = 0) | |
increase_iter | whether to increase the diis iteration index (default = false) |
Definition at line 170 of file diis.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
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.