Psi4
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
psi::RayleighRSolver Class Reference

#include <solver.h>

Inheritance diagram for psi::RayleighRSolver:
psi::DLRSolver psi::RSolver psi::Solver

Public Member Functions

 RayleighRSolver (std::shared_ptr< RHamiltonian > H)
 Constructor. More...
 
virtual ~RayleighRSolver ()
 Destructor. More...
 
void print_header () const
 
void initialize ()
 
void finalize ()
 
void set_precondition_maxiter (int maxiter)
 
void set_precondition_steps (const std::string &steps)
 
void set_quantity (const std::string &quantity)
 
- Public Member Functions inherited from psi::DLRSolver
 DLRSolver (std::shared_ptr< RHamiltonian > H)
 Constructor. More...
 
virtual ~DLRSolver ()
 Destructor. More...
 
virtual size_t memory_estimate ()
 Estimate of maximum memory usage (in doubles) More...
 
void solve ()
 
const std::vector
< std::shared_ptr< Vector > > & 
eigenvectors () const
 Eigenvectors, by state. More...
 
const std::vector< std::vector
< double > > & 
eigenvalues () const
 Eigenvalues, by state/irrep. More...
 
void set_nroot (int nroot)
 Set number of roots (defaults to 1) More...
 
void set_max_subspace (double max_subspace)
 Set maximum subspace size (defaults to 6) More...
 
void set_min_subspace (double min_subspace)
 Set minimum subspace size, for collapse (defaults to 2) More...
 
void set_nguess (int nguess)
 Set number of guesses (defaults to 1) More...
 
void set_norm (double norm)
 Set norm critera for adding vectors to subspace (defaults to 1.0E-6) More...
 
- Public Member Functions inherited from psi::RSolver
 RSolver (std::shared_ptr< RHamiltonian > H)
 
virtual ~RSolver ()
 Destructor. More...
 
void set_Hamiltonian (std::shared_ptr< RHamiltonian > H)
 
std::shared_ptr< RHamiltonianH () const
 
- Public Member Functions inherited from psi::Solver
 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...
 

Static Public Member Functions

static std::shared_ptr
< RayleighRSolver
build_solver (Options &options, std::shared_ptr< RHamiltonian > H)
 Static constructor, uses Options object. More...
 
- Static Public Member Functions inherited from psi::DLRSolver
static std::shared_ptr< DLRSolverbuild_solver (Options &options, std::shared_ptr< RHamiltonian > H)
 Static constructor, uses Options object. More...
 

Protected Member Functions

void correctors ()
 
- Protected Member Functions inherited from psi::DLRSolver
void guess ()
 
void sigma ()
 
void subspaceHamiltonian ()
 
void subspaceDiagonalization ()
 
void eigenvecs ()
 
void eigenvals ()
 
void residuals ()
 
void subspaceExpansion ()
 
void subspaceCollapse ()
 
- Protected Member Functions inherited from psi::Solver
void common_init ()
 Common initialization. More...
 

Protected Attributes

std::shared_ptr< CGRSolvercg_
 Turn an eigenproblem into a linear equations problem. More...
 
std::string precondition_steps_
 
int precondition_maxiter_
 
std::string quantity_
 
- Protected Attributes inherited from psi::DLRSolver
int nroot_
 Number of desired roots. More...
 
double norm_
 Required norm for subspace expansion. More...
 
int max_subspace_
 Maximum allowed subspace size. More...
 
int min_subspace_
 Minimum allowed subspace size (after collapse) More...
 
int nguess_
 Number of guess vectors to build. More...
 
int nsubspace_
 The current subspace size. More...
 
int nconverged_
 The number of converged roots. More...
 
std::vector< std::shared_ptr
< Vector > > 
c_
 Current eigenvectors (nroots) More...
 
std::vector< std::vector
< double > > 
E_
 Current eigenvalues (nroots) More...
 
std::vector< std::shared_ptr
< Vector > > 
b_
 B vectors (nsubspace) More...
 
std::vector< std::shared_ptr
< Vector > > 
s_
 Sigma vectors (nsubspace) More...
 
SharedMatrix A_
 Delta Subspace Hamiltonian (preconditioner) More...
 
std::vector< std::vector< int > > A_inds_
 Delta Subspace indices. More...
 
SharedMatrix G_
 G_ij Subspace Hamiltonian (nsubspace x nsubspace) More...
 
SharedMatrix a_
 Subspace eigenvectors (nsubspace x nsubspace) More...
 
std::shared_ptr< Vectorl_
 Subspace eigenvalues (nsubspace) More...
 
std::vector< std::shared_ptr
< Vector > > 
r_
 Residual vectors (nroots) More...
 
std::vector< double > n_
 Residual vector 2-norms (nroots) More...
 
std::vector< std::shared_ptr
< Vector > > 
d_
 Correction vectors (nroots) More...
 
std::shared_ptr< Vectordiag_
 Diagonal of Hamiltonian. More...
 
- Protected Attributes inherited from psi::RSolver
std::shared_ptr< RHamiltonianH_
 Reference to underlying RHamiltonian. More...
 
- Protected Attributes inherited from psi::Solver
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::RayleighRSolver::RayleighRSolver ( std::shared_ptr< RHamiltonian H)

Constructor.

psi::RayleighRSolver::~RayleighRSolver ( )
virtual

Destructor.

Member Function Documentation

std::shared_ptr< RayleighRSolver > psi::RayleighRSolver::build_solver ( Options options,
std::shared_ptr< RHamiltonian H 
)
static

Static constructor, uses Options object.

void psi::RayleighRSolver::correctors ( )
protectedvirtual

Reimplemented from psi::DLRSolver.

void psi::RayleighRSolver::finalize ( )
virtual

Method to clear off overhead memory without destroying the object

Reimplemented from psi::DLRSolver.

void psi::RayleighRSolver::initialize ( )
virtual

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

Reimplemented from psi::DLRSolver.

void psi::RayleighRSolver::print_header ( ) const
virtual

Print header information regarding Solver type on output file

Reimplemented from psi::DLRSolver.

void psi::RayleighRSolver::set_precondition_maxiter ( int  maxiter)
inline
void psi::RayleighRSolver::set_precondition_steps ( const std::string &  steps)
inline
void psi::RayleighRSolver::set_quantity ( const std::string &  quantity)
inline

Member Data Documentation

std::shared_ptr<CGRSolver> psi::RayleighRSolver::cg_
protected

Turn an eigenproblem into a linear equations problem.

int psi::RayleighRSolver::precondition_maxiter_
protected
std::string psi::RayleighRSolver::precondition_steps_
protected
std::string psi::RayleighRSolver::quantity_
protected

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