LIBINT  2.6.0
Public Types | Public Member Functions | List of all members
libint2::DIIS< D > Class Template Reference

DIIS (`‘direct inversion of iterative subspace’') extrapolation. More...

#include <diis.h>

Public Types

typedef diis::traits< D >::element_type value_type
 

Public Member Functions

 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. More...
 
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. More...
 
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 $ f(x) = 0 $ form, where $ f(x) $ is a (non-linear) function of $ x $ (in general, $ x $ is a set of numeric values). Such equations are usually solved iteratively as follows:

Template Parameters
Dtype of x

Constructor & Destructor Documentation

◆ DIIS()

template<typename D>
libint2::DIIS< D >::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 
)
inline

Constructor.

Parameters
strtThe DIIS extrapolation will begin on the iteration given by this integer (default = 1).
ndiThis integer maximum number of data sets to retain (default = 5).
dmpThis nonnegative floating point number is used to dampen the DIIS extrapolation (default = 0.0).
ngrThe 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.
ngrdiisThe number of DIIS extrapolations to do at the beginning of an iteration group. See the documentation for ngr (default = 1).
mfThis 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.

Member Function Documentation

◆ extrapolate()

template<typename D>
void libint2::DIIS< D >::extrapolate ( D &  x,
D &  error,
bool  extrapolate_error = false 
)
inline
Parameters
[in,out]xOn input, the most recent solution guess; on output, the extrapolated guess
[in,out]errorOn input, the most recent error; on output, the if extrapolate_error == true will be the extrapolated error, otherwise the value unchanged
extrapolate_errorwhether to extrapolate the error (default = false).

◆ start_extrapolation()

template<typename D>
void libint2::DIIS< D >::start_extrapolation ( )
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.


The documentation for this class was generated from the following file: