CheMPS2
CheMPS2::DIIS Class Reference

#include <DIIS.h>

Public Member Functions

 DIIS (const int numVarsParamIn, const int numVarsErrorIn, const int numVecsIn)
 Constructor. More...
 
virtual ~DIIS ()
 Destructor.
 
int getNumVarsParam () const
 Get the number of variables in the parameter vectors. More...
 
int getNumVarsError () const
 Get the number of variables in the error vectors. More...
 
int getNumVecs () const
 Get the max. number of parameter and error vectors which are kept. More...
 
int getCurrentNumVecs () const
 Get the current number of vectors which are used for DIIS. More...
 
double * getLastLinco ()
 Get pointer to the last linco of parameter vectors. More...
 
void appendNew (double *newError, double *newParam)
 Append a new error and parameter vector. More...
 
void calculateParam (double *newParam)
 Calculate the new parameter vector, based on the just appended error and parameter vectors. More...
 
void saveDIIS (const string filename=DMRGSCF_diis_storage_name) const
 Save the DIIS object to disk. More...
 
void loadDIIS (const string filename=DMRGSCF_diis_storage_name)
 Load the DIIS object from disk. More...
 

Detailed Description

DIIS class.

Author
Sebastian Wouters sebas.nosp@m.tian.nosp@m.woute.nosp@m.rs@g.nosp@m.mail..nosp@m.com
Date
July 8, 2014

The DIIS class calculates the new step based on a direct inversion of iterative subspaces (DIIS). Info can be found at

Definition at line 34 of file DIIS.h.

Constructor & Destructor Documentation

CheMPS2::DIIS::DIIS ( const int  numVarsParamIn,
const int  numVarsErrorIn,
const int  numVecsIn 
)

Constructor.

Parameters
numVarsParamInThe number of variables in the parameter vectors
numVarsErrorInThe number of variables in the error vectors
numVecsInThe max. number of parameter and error vectors

Definition at line 37 of file DIIS.cpp.

Member Function Documentation

void CheMPS2::DIIS::appendNew ( double *  newError,
double *  newParam 
)

Append a new error and parameter vector.

Parameters
newErrorThe new error vector which should be appended
newParamThe new parameter vector which should be appended

Definition at line 74 of file DIIS.cpp.

+ Here is the caller graph for this function:

void CheMPS2::DIIS::calculateParam ( double *  newParam)

Calculate the new parameter vector, based on the just appended error and parameter vectors.

Parameters
newParamThe new parameter vector

Definition at line 103 of file DIIS.cpp.

+ Here is the caller graph for this function:

int CheMPS2::DIIS::getCurrentNumVecs ( ) const

Get the current number of vectors which are used for DIIS.

Returns
The current number of vectors which are used for DIIS

Definition at line 70 of file DIIS.cpp.

double * CheMPS2::DIIS::getLastLinco ( )

Get pointer to the last linco of parameter vectors.

Returns
Pointer to the last linco of parameter vectors

Definition at line 72 of file DIIS.cpp.

int CheMPS2::DIIS::getNumVarsError ( ) const

Get the number of variables in the error vectors.

Returns
The number of variables in the error vectors

Definition at line 66 of file DIIS.cpp.

int CheMPS2::DIIS::getNumVarsParam ( ) const

Get the number of variables in the parameter vectors.

Returns
The number of variables in the parameter vectors

Definition at line 64 of file DIIS.cpp.

int CheMPS2::DIIS::getNumVecs ( ) const

Get the max. number of parameter and error vectors which are kept.

Returns
The max. number of parameter and error vectors which are kept

Definition at line 68 of file DIIS.cpp.

void CheMPS2::DIIS::loadDIIS ( const string  filename = DMRGSCF_diis_storage_name)

Load the DIIS object from disk.

Parameters
filenameFilename to load the DIIS checkpoint from

Definition at line 223 of file DIIS.cpp.

+ Here is the caller graph for this function:

void CheMPS2::DIIS::saveDIIS ( const string  filename = DMRGSCF_diis_storage_name) const

Save the DIIS object to disk.

Parameters
filenameFilename to store the DIIS checkpoint to

Definition at line 165 of file DIIS.cpp.

+ Here is the caller graph for this function:


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