votca 2026-dev
Loading...
Searching...
No Matches
votca::xtp::DIIS Class Reference

#include <diis.h>

Collaboration diagram for votca::xtp::DIIS:

Public Member Functions

void Update (Index maxerrorindex, const Eigen::MatrixXd &errormatrix)
void Update (Index maxerrorindex, const Eigen::MatrixXd &errormatrix_alpha, const Eigen::MatrixXd &errormatrix_beta)
Eigen::VectorXd CalcCoeff ()
void setHistLength (Index length)
void Clear ()
bool Info ()
const std::vector< Eigen::MatrixXd > & ErrorHistory () const

Private Attributes

bool success = true
Index histlength_
std::vector< std::vector< double > > Diis_Bs_
std::vector< Eigen::MatrixXd > errormatrixhist_
std::vector< Eigen::MatrixXd > errormatrixhist_alpha_
std::vector< Eigen::MatrixXd > errormatrixhist_beta_

Detailed Description

Pulay direct inversion in the iterative subspace.

The class stores recent commutator error matrices and solves the augmented linear DIIS system to obtain extrapolation coefficients for the next Fock guess.

Definition at line 40 of file diis.h.

Member Function Documentation

◆ CalcCoeff()

Eigen::VectorXd votca::xtp::DIIS::CalcCoeff ( )

Solve the Pulay linear system and return the DIIS interpolation coefficients.

Definition at line 73 of file diis.cc.

◆ Clear()

void votca::xtp::DIIS::Clear ( )
inline

Definition at line 59 of file diis.h.

◆ ErrorHistory()

const std::vector< Eigen::MatrixXd > & votca::xtp::DIIS::ErrorHistory ( ) const
inline

Definition at line 71 of file diis.h.

◆ Info()

bool votca::xtp::DIIS::Info ( )
inline

Report whether the most recent DIIS setup and solve completed successfully.

Definition at line 68 of file diis.h.

◆ setHistLength()

void votca::xtp::DIIS::setHistLength ( Index length)
inline

Set the maximum number of past error matrices retained for DIIS extrapolation.

Definition at line 55 of file diis.h.

◆ Update() [1/2]

void votca::xtp::DIIS::Update ( Index maxerrorindex,
const Eigen::MatrixXd & errormatrix )

Store a new restricted-spin DIIS error matrix and update the B matrix history.

Pulay DIIS implementation.

The method stores recent commutator error matrices e_i and solves an augmented linear system built from B_ij = <e_i, e_j>. The resulting coefficients define the extrapolated Fock matrix F' = sum_i c_i F_i.

Definition at line 43 of file diis.cc.

◆ Update() [2/2]

void votca::xtp::DIIS::Update ( Index maxerrorindex,
const Eigen::MatrixXd & errormatrix_alpha,
const Eigen::MatrixXd & errormatrix_beta )

Store new alpha and beta DIIS error matrices and update the unrestricted-spin B matrix history.

Definition at line 150 of file diis.cc.

Member Data Documentation

◆ Diis_Bs_

std::vector<std::vector<double> > votca::xtp::DIIS::Diis_Bs_
private

Definition at line 78 of file diis.h.

◆ errormatrixhist_

std::vector<Eigen::MatrixXd> votca::xtp::DIIS::errormatrixhist_
private

Definition at line 79 of file diis.h.

◆ errormatrixhist_alpha_

std::vector<Eigen::MatrixXd> votca::xtp::DIIS::errormatrixhist_alpha_
private

Definition at line 80 of file diis.h.

◆ errormatrixhist_beta_

std::vector<Eigen::MatrixXd> votca::xtp::DIIS::errormatrixhist_beta_
private

Definition at line 81 of file diis.h.

◆ histlength_

Index votca::xtp::DIIS::histlength_
private

Definition at line 77 of file diis.h.

◆ success

bool votca::xtp::DIIS::success = true
private

Definition at line 76 of file diis.h.


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