Psi4
Public Types | Public Member Functions | Protected Attributes | List of all members
psi::DIISEntry Class Reference

The DIISManager class is used to manage DIIS quantities and their corresponding error vectors. More...

#include <diisentry.h>

Public Types

enum  InputType {
  DPDBuf4, DPDFile2, Matrix, Vector,
  Pointer
}
 The type of quantity to add to either an error vector or vector. More...
 

Public Member Functions

 DIISEntry (std::string label, int ID, int count, int vectorSize, double *vector, int errorVectorSize, double *errorVector, std::shared_ptr< PSIO > psio)
 
 ~DIISEntry ()
 
bool dot_is_known_with (int n)
 Whether the dot product of this entry's and the nth entry's error vector is known. More...
 
double dot_with (int n)
 The dot product of this entry's and the nth entry's error vectors. More...
 
double rmsError ()
 The RMS error of this entry. More...
 
int orderAdded ()
 The absolute number of this entry. More...
 
void set_dot_with (int n, double val)
 Sets the dot product with vector n to val. More...
 
void invalidate_dot (int n)
 Marks the dot product with vector n as invalid. More...
 
void set_vector (double *vec)
 Set the vector. More...
 
void set_error_vector (double *vec)
 set the error vector More...
 
void dump_vector_to_disk ()
 Put this vector entry on disk and free the memory. More...
 
void read_vector_from_disk ()
 Allocate vector memory and read from disk. More...
 
void dump_error_vector_to_disk ()
 Put this error vector entry on disk and free the memory. More...
 
void read_error_vector_from_disk ()
 Allocate error vector memory and read from disk. More...
 
void free_vector_memory ()
 Free vector memory. More...
 
void free_error_vector_memory ()
 Free error vector memory. More...
 
const double * errorVector ()
 Returns the error vector. More...
 
const double * vector ()
 Returns the vector. More...
 
void open_psi_file ()
 Open the psi file, if needed. More...
 
void close_psi_file ()
 Close the psi file, if needed. More...
 

Protected Attributes

std::map< int, bool > _knownDotProducts
 The list of which dot products, with other DIISEntries, are known. More...
 
std::map< int, double > _dotProducts
 The list of known dot products with other DIISEntries. More...
 
int _errorVectorSize
 The length of the error vector. More...
 
int _vectorSize
 The length of the vector. More...
 
int _orderAdded
 The absolute number of this entry. More...
 
int _ID
 The number of this entry in the current subspace. More...
 
double _rmsError
 The RMS error for this entry. More...
 
double * _errorVector
 The error vector. More...
 
double * _vector
 The error vector. More...
 
std::string _label
 The label used for disk storage. More...
 
std::shared_ptr< PSIO_psio
 PSIO object. More...
 

Detailed Description

The DIISManager class is used to manage DIIS quantities and their corresponding error vectors.

Member Enumeration Documentation

The type of quantity to add to either an error vector or vector.

DPDBuf4 - A pointer to a four-index DPD quantity, assumed to be initialized via dpd_buf4_init() already. DPDFile2 - A pointer to a two-index DPD quality, assumed to be initialized via dpd_file2_init() already. Matrix - A pointer to a Psi Matrix object. Vector - A pointer to a Psi Vector object. Pointer - The quantity will be taken from contiguous memory pointed to by a double* pointer. In this case, the next parameter passed to the set_size.. routines should be the number of elements to read. Psio - The PSIO object to use for I/O

Enumerator
DPDBuf4 
DPDFile2 
Matrix 
Vector 
Pointer 

Constructor & Destructor Documentation

psi::DIISEntry::DIISEntry ( std::string  label,
int  ID,
int  count,
int  vectorSize,
double *  vector,
int  errorVectorSize,
double *  errorVector,
std::shared_ptr< PSIO psio 
)
psi::DIISEntry::~DIISEntry ( )

Member Function Documentation

void psi::DIISEntry::close_psi_file ( )

Close the psi file, if needed.

bool psi::DIISEntry::dot_is_known_with ( int  n)
inline

Whether the dot product of this entry's and the nth entry's error vector is known.

double psi::DIISEntry::dot_with ( int  n)
inline

The dot product of this entry's and the nth entry's error vectors.

void psi::DIISEntry::dump_error_vector_to_disk ( )

Put this error vector entry on disk and free the memory.

void psi::DIISEntry::dump_vector_to_disk ( )

Put this vector entry on disk and free the memory.

const double* psi::DIISEntry::errorVector ( )
inline

Returns the error vector.

void psi::DIISEntry::free_error_vector_memory ( )

Free error vector memory.

void psi::DIISEntry::free_vector_memory ( )

Free vector memory.

void psi::DIISEntry::invalidate_dot ( int  n)
inline

Marks the dot product with vector n as invalid.

void psi::DIISEntry::open_psi_file ( )

Open the psi file, if needed.

int psi::DIISEntry::orderAdded ( )
inline

The absolute number of this entry.

void psi::DIISEntry::read_error_vector_from_disk ( )

Allocate error vector memory and read from disk.

void psi::DIISEntry::read_vector_from_disk ( )

Allocate vector memory and read from disk.

double psi::DIISEntry::rmsError ( )
inline

The RMS error of this entry.

void psi::DIISEntry::set_dot_with ( int  n,
double  val 
)
inline

Sets the dot product with vector n to val.

void psi::DIISEntry::set_error_vector ( double *  vec)
inline

set the error vector

void psi::DIISEntry::set_vector ( double *  vec)
inline

Set the vector.

const double* psi::DIISEntry::vector ( )
inline

Returns the vector.

Member Data Documentation

std::map<int, double> psi::DIISEntry::_dotProducts
protected

The list of known dot products with other DIISEntries.

double* psi::DIISEntry::_errorVector
protected

The error vector.

int psi::DIISEntry::_errorVectorSize
protected

The length of the error vector.

int psi::DIISEntry::_ID
protected

The number of this entry in the current subspace.

std::map<int, bool> psi::DIISEntry::_knownDotProducts
protected

The list of which dot products, with other DIISEntries, are known.

std::string psi::DIISEntry::_label
protected

The label used for disk storage.

int psi::DIISEntry::_orderAdded
protected

The absolute number of this entry.

std::shared_ptr<PSIO> psi::DIISEntry::_psio
protected

PSIO object.

double psi::DIISEntry::_rmsError
protected

The RMS error for this entry.

double* psi::DIISEntry::_vector
protected

The error vector.

int psi::DIISEntry::_vectorSize
protected

The length of the vector.


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