mpqc::cc::Solver< T > Class Template Referenceabstract
Documentation
template<typename T>
class mpqc::cc::Solver< T >
Solver updates the CC T amplitudes given the current values and the amplitude equation residuals
- Template Parameters
-
T the type representing the n-body amplitude set
Public Member Functions | |
virtual | ~Solver ()=default |
virtual void | update (std::vector< std::reference_wrapper< T >> &t_pack, const std::vector< std::reference_wrapper< const T >> &r_pack, double dE=0)=0 |
virtual double | error (const std::vector< std::reference_wrapper< const T >> &r_pack) |
Computes the error for the given residuals pack. More... | |
virtual double | error (const T &r1, const T &r2, const T &r3) |
virtual bool | is_converged (double target_precision, double error, double dE) const =0 |
Static Public Member Functions | |
template<typename... U> | |
static auto | make_refpack (U &... args) |
template<typename... U> | |
static auto | make_crefpack (U &... args) |
Constructor & Destructor Documentation
◆ ~Solver()
template<typename T >
|
virtualdefault |
Member Function Documentation
◆ error() [1/2]
template<typename T >
|
inlinevirtual |
Computes the error for the given residuals pack.
The error is defined as the 2-norm per element, i.e. .
- Parameters
-
[in] r_pack a pack of amplitude equation residuals
- Returns
- the error
◆ error() [2/2]
template<typename T >
|
inlinevirtual |
◆ is_converged()
template<typename T >
|
pure virtual |
Tests if the solver has converged
- Parameters
-
target_precision The desired precision for the final CC energy error The value of the error computed from the one- and two-body residuals dE The energy change between two consecutive solver iterations
- Returns
- Whether or not the solver has converged
◆ make_crefpack()
template<typename T >
template<typename... U>
|
inlinestatic |
◆ make_refpack()
template<typename T >
template<typename... U>
|
inlinestatic |
◆ update()
template<typename T >
|
pure virtual |
Updates amplitude set using the residual set.
- 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
-
[in,out] t_pack the amplitudes, in the order of increasing rank (current values on input, updated values on output) [in] r_pack the amplitude equation residuals, in the order of increasing rank
The documentation for this class was generated from the following files: