•All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Search Results
List of all members |
Public Types |
Public Member Functions |
Static Public Member Functions |
Protected Member Functions
mpqc::cc::DIISSolver< T > Class Template Reference
Documentation
template<typename T>
class mpqc::cc::DIISSolver< T >
DIISSolver updates the CC T amplitudes using DIIS
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 >
|
inline |
The KeyVal constructor.
- Parameters
-
kv the 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 >
|
virtualdefault |
Member Function Documentation
◆ diis()
template<typename T >
|
inlineprotected |
◆ is_converged()
template<typename T >
|
inlineoverride |
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 equation residuals dE The energy change between two consecutive solver iterations
- Returns
- Whether or not the solver has converged
◆ precision_margin_energy()
template<typename T >
|
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 >
|
inline |
Resets the DIIS solver; used when switching to a new solver subspace.
◆ update()
template<typename T >
|
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
-
t1 the 1-body amplitude set (current values on input, updated values on output) t2 the 2-body amplitude set (current values on input, updated values on output) r1 the 1-body amplitude equation residual set (contents may be modified) r2 the 2-body amplitude equation residual set (contents may be modified)
◆ update_only()
template<typename T >
|
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: