Documentation

template<typename T>
class mpqc::cc::DIISSolver< T >

DIISSolver updates the CC T amplitudes using DIIS

Template Parameters
Tthe type representing the n-body amplitude set

Public Types

using Tile = typename T::value_type
 
using Policy = typename T::policy_type
 
using TVec = TA::DistArrayVector< Tile, Policy >
 

Public Member Functions

 DIISSolver (const KeyVal &kv)
 The KeyVal constructor. More...
 
virtual ~DIISSolver ()=default
 
void update (std::vector< std::reference_wrapper< T >> &t_pack, const std::vector< std::reference_wrapper< const T >> &r_pack, double dE=0) override
 
bool is_converged (double target_precision, double error, double dE) const override
 
void reset ()
 Resets the DIIS solver; used when switching to a new solver subspace. More...
 

Static Public Member Functions

static double precision_margin_energy ()
 

Protected Member Functions

virtual void update_only (std::vector< std::reference_wrapper< T >> &t_pack, const std::vector< std::reference_wrapper< const T >> &r_pack, double dE=0)
 
TA::DIIS< TVec > & diis ()
 

Member Typedef Documentation

◆ Policy

template<typename T >
using mpqc::cc::DIISSolver< T >::Policy = typename T::policy_type

◆ Tile

template<typename T >
using mpqc::cc::DIISSolver< T >::Tile = typename T::value_type

◆ TVec

template<typename T >
using mpqc::cc::DIISSolver< T >::TVec = TA::DistArrayVector<Tile, Policy>

Constructor & Destructor Documentation

◆ DIISSolver()

template<typename T >
mpqc::cc::DIISSolver< T >::DIISSolver ( const KeyVal kv)
inline

The KeyVal constructor.

Parameters
kvthe KeyVal object; it will be queried for the following keywords
Keyword Type Default Description
diis_start int 1 The DIIS extrapolation will begin on the iteration given by this integer.
n_diis int 8 This specifies maximum number of data sets to retain.
diis_damp real 0.0 This nonnegative floating point number is used to dampen the DIIS extrapolation.
diis_damping_attenuation real 1e-3 this nonnegative floating point number defines the 2-norm of the error when when the damping factor for the DIIS extrapolation starts to decay linearly with the error
diis_ngroup int 1 The number of iterations in a DIIS group. DIIS extrapolation is only used for the first diis_group_nstart of these iterations. If diis_ngroup is 1 and diis_group_nstart is greater than 0, then DIIS will be used on all iterations after and including the start iteration.
diis_group_nstart int 1 The number of DIIS extrapolations to do at the beginning of an iteration group. See the documentation for diis_ngroup .

◆ ~DIISSolver()

template<typename T >
virtual mpqc::cc::DIISSolver< T >::~DIISSolver ( )
virtualdefault

Member Function Documentation

◆ diis()

template<typename T >
TA::DIIS<TVec>& mpqc::cc::DIISSolver< T >::diis ( )
inlineprotected

◆ is_converged()

template<typename T >
bool mpqc::cc::DIISSolver< T >::is_converged ( double  target_precision,
double  error,
double  dE 
) const
inlineoverride

Tests if the solver has converged

Parameters
target_precisionThe desired precision for the final CC energy
errorThe value of the error computed from the equation residuals
dEThe energy change between two consecutive solver iterations
Returns
Whether or not the solver has converged

◆ precision_margin_energy()

template<typename T >
static double mpqc::cc::DIISSolver< T >::precision_margin_energy ( )
inlinestatic

Specifies the extra margin for converging energy. DIIS solver is converged to precision eps if the energy between two successive iterations is converged to eps times the margin. Currently it is fixed empirically at 0.1 , i.e. solver is converged if the difference between two consecutive iterations is less than 1/10th of the target precision.

Returns
the extra margin for converging energy

◆ reset()

template<typename T >
void mpqc::cc::DIISSolver< T >::reset ( )
inline

Resets the DIIS solver; used when switching to a new solver subspace.

◆ update()

template<typename T >
void mpqc::cc::DIISSolver< T >::update ( std::vector< std::reference_wrapper< T >> &  t_pack,
const std::vector< std::reference_wrapper< const T >> &  r_pack,
double  dE = 0 
)
inlineoverride

Update the amplitudes using update_only() and extrapolate using DIIS.

Warning
This function assumes that {t1 , t2 } and {r1 , r2 } are congruent, but does not assume any particular structure. Derived classes may impose additional assumptions on the structure of the arguments.
Parameters
t1the 1-body amplitude set (current values on input, updated values on output)
t2the 2-body amplitude set (current values on input, updated values on output)
r1the 1-body amplitude equation residual set (contents may be modified)
r2the 2-body amplitude equation residual set (contents may be modified)

◆ update_only()

template<typename T >
virtual void mpqc::cc::DIISSolver< T >::update_only ( std::vector< std::reference_wrapper< T >> &  t_pack,
const std::vector< std::reference_wrapper< const T >> &  r_pack,
double  dE = 0 
)
inlineprotectedvirtual

this performs the amplitude update only, to be followed up with DIIS

Warning
This function assumes that {t1 , t2 } and {r1 , r2 } are congruent, but does not assume any particular structure. Derived classes may impose additional assumptions on the structure of the arguments.

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