Psi4
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
psi::Solver Class Referenceabstract

#include <solver.h>

Inheritance diagram for psi::Solver:
psi::RSolver psi::USolver psi::CGRSolver psi::DLRSolver psi::DLRXSolver psi::DLUSolver psi::RayleighRSolver

Public Member Functions

 Solver ()
 Default Constructor. More...
 
virtual ~Solver ()
 Destructor. More...
 
void set_precondition (const std::string &precondition)
 Set precondition type (specific to solver type) More...
 
void set_memory (size_t memory)
 Set maximum vector storage space (defaults to 0 MB => Unlimited storage) More...
 
void set_maxiter (int maxiter)
 Set maximum number of iterations (defaults to 100) More...
 
void set_convergence (double criteria)
 Set convergence criteria (defaults to 1.0E-6) More...
 
void set_print (int print)
 Print flag (defaults to 1) More...
 
void set_debug (int debug)
 Debug flag (defaults to 0) More...
 
void set_bench (int bench)
 Bench flag (defaults to 0) More...
 
int iteration () const
 What iteration is it? More...
 
bool converged () const
 Did the solver converge? More...
 
virtual void print_header () const =0
 
virtual size_t memory_estimate ()=0
 Estimate of maximum memory usage (in doubles) More...
 
virtual void initialize ()=0
 
virtual void solve ()=0
 
virtual void finalize ()=0
 

Protected Member Functions

void common_init ()
 Common initialization. More...
 

Protected Attributes

int print_
 Print flag, defaults to 1. More...
 
int debug_
 Debug flag, defaults to 0. More...
 
int bench_
 Bench flag, defaults to 0. More...
 
std::string name_
 Name of solver (set by subclasses) More...
 
size_t memory_
 Memory available, in doubles, defaults to 0 => Unlimited storage. More...
 
double criteria_
 Convergence criteria, defaults to 1.0E-6. More...
 
int maxiter_
 Maximum number of iterations, defaults to 100. More...
 
bool converged_
 Converged or not? More...
 
double convergence_
 Convergence measure at this iteration. More...
 
int iteration_
 Current iteration count. More...
 
std::string precondition_
 Preconditioner type. More...
 

Constructor & Destructor Documentation

psi::Solver::Solver ( )

Default Constructor.

psi::Solver::~Solver ( )
virtual

Destructor.

Member Function Documentation

void psi::Solver::common_init ( void  )
protected

Common initialization.

bool psi::Solver::converged ( ) const
inline

Did the solver converge?

virtual void psi::Solver::finalize ( )
pure virtual

Method to clear off overhead memory without destroying the object

Implemented in psi::DLUSolver, psi::DLRXSolver, psi::RayleighRSolver, psi::DLRSolver, and psi::CGRSolver.

virtual void psi::Solver::initialize ( )
pure virtual

Warm it all up, everything you got. Cmon you apes, you wanna live forever?!

Implemented in psi::DLUSolver, psi::DLRXSolver, psi::RayleighRSolver, psi::DLRSolver, and psi::CGRSolver.

int psi::Solver::iteration ( ) const
inline

What iteration is it?

virtual size_t psi::Solver::memory_estimate ( )
pure virtual

Estimate of maximum memory usage (in doubles)

Implemented in psi::DLUSolver, psi::DLRXSolver, psi::DLRSolver, and psi::CGRSolver.

virtual void psi::Solver::print_header ( ) const
pure virtual

Print header information regarding Solver type on output file

Implemented in psi::DLUSolver, psi::DLRXSolver, psi::RayleighRSolver, psi::DLRSolver, and psi::CGRSolver.

void psi::Solver::set_bench ( int  bench)
inline

Bench flag (defaults to 0)

void psi::Solver::set_convergence ( double  criteria)
inline

Set convergence criteria (defaults to 1.0E-6)

void psi::Solver::set_debug ( int  debug)
inline

Debug flag (defaults to 0)

void psi::Solver::set_maxiter ( int  maxiter)
inline

Set maximum number of iterations (defaults to 100)

void psi::Solver::set_memory ( size_t  memory)
inline

Set maximum vector storage space (defaults to 0 MB => Unlimited storage)

void psi::Solver::set_precondition ( const std::string &  precondition)
inline

Set precondition type (specific to solver type)

void psi::Solver::set_print ( int  print)
inline

Print flag (defaults to 1)

virtual void psi::Solver::solve ( )
pure virtual

Perform iterative solution, based on current state

Implemented in psi::DLUSolver, psi::DLRXSolver, psi::DLRSolver, and psi::CGRSolver.

Member Data Documentation

int psi::Solver::bench_
protected

Bench flag, defaults to 0.

bool psi::Solver::converged_
protected

Converged or not?

double psi::Solver::convergence_
protected

Convergence measure at this iteration.

double psi::Solver::criteria_
protected

Convergence criteria, defaults to 1.0E-6.

int psi::Solver::debug_
protected

Debug flag, defaults to 0.

int psi::Solver::iteration_
protected

Current iteration count.

int psi::Solver::maxiter_
protected

Maximum number of iterations, defaults to 100.

size_t psi::Solver::memory_
protected

Memory available, in doubles, defaults to 0 => Unlimited storage.

std::string psi::Solver::name_
protected

Name of solver (set by subclasses)

std::string psi::Solver::precondition_
protected

Preconditioner type.

int psi::Solver::print_
protected

Print flag, defaults to 1.


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