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)
bool Info ()

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.

◆ Info()

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

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

Definition at line 59 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 64 of file diis.h.

◆ errormatrixhist_

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

Definition at line 65 of file diis.h.

◆ errormatrixhist_alpha_

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

Definition at line 66 of file diis.h.

◆ errormatrixhist_beta_

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

Definition at line 67 of file diis.h.

◆ histlength_

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

Definition at line 63 of file diis.h.

◆ success

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

Definition at line 62 of file diis.h.


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