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

#include <solver.h>

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

Public Member Functions

 DLRSolver (std::shared_ptr< RHamiltonian > H)
 Constructor. More...
 
virtual ~DLRSolver ()
 Destructor. More...
 
virtual void print_header () const
 
virtual size_t memory_estimate ()
 Estimate of maximum memory usage (in doubles) More...
 
virtual void initialize ()
 
void solve ()
 
void finalize ()
 
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< DLRSolverbuild_solver (Options &options, std::shared_ptr< RHamiltonian > H)
 Static constructor, uses Options object. More...
 

Protected Member Functions

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

Protected Attributes

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::DLRSolver::DLRSolver ( std::shared_ptr< RHamiltonian H)

Constructor.

psi::DLRSolver::~DLRSolver ( )
virtual

Destructor.

Member Function Documentation

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

Static constructor, uses Options object.

void psi::DLRSolver::correctors ( )
protectedvirtual

Reimplemented in psi::RayleighRSolver.

void psi::DLRSolver::eigenvals ( )
protected
const std::vector<std::vector<double> >& psi::DLRSolver::eigenvalues ( ) const
inline

Eigenvalues, by state/irrep.

void psi::DLRSolver::eigenvecs ( )
protected
const std::vector<std::shared_ptr<Vector> >& psi::DLRSolver::eigenvectors ( ) const
inline

Eigenvectors, by state.

void psi::DLRSolver::finalize ( )
virtual

Method to clear off overhead memory without destroying the object

Implements psi::Solver.

Reimplemented in psi::RayleighRSolver.

void psi::DLRSolver::guess ( )
protected
void psi::DLRSolver::initialize ( )
virtual

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

Implements psi::Solver.

Reimplemented in psi::RayleighRSolver.

size_t psi::DLRSolver::memory_estimate ( )
virtual

Estimate of maximum memory usage (in doubles)

Implements psi::Solver.

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

Print header information regarding Solver type on output file

Implements psi::Solver.

Reimplemented in psi::RayleighRSolver.

void psi::DLRSolver::residuals ( )
protected
void psi::DLRSolver::set_max_subspace ( double  max_subspace)
inline

Set maximum subspace size (defaults to 6)

void psi::DLRSolver::set_min_subspace ( double  min_subspace)
inline

Set minimum subspace size, for collapse (defaults to 2)

void psi::DLRSolver::set_nguess ( int  nguess)
inline

Set number of guesses (defaults to 1)

void psi::DLRSolver::set_norm ( double  norm)
inline

Set norm critera for adding vectors to subspace (defaults to 1.0E-6)

void psi::DLRSolver::set_nroot ( int  nroot)
inline

Set number of roots (defaults to 1)

void psi::DLRSolver::sigma ( )
protected
void psi::DLRSolver::solve ( )
virtual

Perform iterative solution, based on current state

Implements psi::Solver.

void psi::DLRSolver::subspaceCollapse ( )
protected
void psi::DLRSolver::subspaceDiagonalization ( )
protected
void psi::DLRSolver::subspaceExpansion ( )
protected
void psi::DLRSolver::subspaceHamiltonian ( )
protected

Member Data Documentation

SharedMatrix psi::DLRSolver::A_
protected

Delta Subspace Hamiltonian (preconditioner)

SharedMatrix psi::DLRSolver::a_
protected

Subspace eigenvectors (nsubspace x nsubspace)

std::vector<std::vector<int> > psi::DLRSolver::A_inds_
protected

Delta Subspace indices.

std::vector<std::shared_ptr<Vector> > psi::DLRSolver::b_
protected

B vectors (nsubspace)

std::vector<std::shared_ptr<Vector> > psi::DLRSolver::c_
protected

Current eigenvectors (nroots)

std::vector<std::shared_ptr<Vector> > psi::DLRSolver::d_
protected

Correction vectors (nroots)

std::shared_ptr<Vector> psi::DLRSolver::diag_
protected

Diagonal of Hamiltonian.

std::vector<std::vector<double> > psi::DLRSolver::E_
protected

Current eigenvalues (nroots)

SharedMatrix psi::DLRSolver::G_
protected

G_ij Subspace Hamiltonian (nsubspace x nsubspace)

std::shared_ptr<Vector> psi::DLRSolver::l_
protected

Subspace eigenvalues (nsubspace)

int psi::DLRSolver::max_subspace_
protected

Maximum allowed subspace size.

int psi::DLRSolver::min_subspace_
protected

Minimum allowed subspace size (after collapse)

std::vector<double> psi::DLRSolver::n_
protected

Residual vector 2-norms (nroots)

int psi::DLRSolver::nconverged_
protected

The number of converged roots.

int psi::DLRSolver::nguess_
protected

Number of guess vectors to build.

double psi::DLRSolver::norm_
protected

Required norm for subspace expansion.

int psi::DLRSolver::nroot_
protected

Number of desired roots.

int psi::DLRSolver::nsubspace_
protected

The current subspace size.

std::vector<std::shared_ptr<Vector> > psi::DLRSolver::r_
protected

Residual vectors (nroots)

std::vector<std::shared_ptr<Vector> > psi::DLRSolver::s_
protected

Sigma vectors (nsubspace)


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