iterative-solver 0.0
molpro::linalg::itsolv::LinearEigensystem< R, Q, P > Class Template Referenceabstract

Interface for a specific iterative solver, it can add special member functions or variables. More...

#include <IterativeSolver.h>

Inheritance diagram for molpro::linalg::itsolv::LinearEigensystem< R, Q, P >:
Collaboration diagram for molpro::linalg::itsolv::LinearEigensystem< R, Q, P >:

Detailed Description

template<class R, class Q, class P>
class molpro::linalg::itsolv::LinearEigensystem< R, Q, P >

Interface for a specific iterative solver, it can add special member functions or variables.

Public Member Functions

virtual std::vector< scalar_typeeigenvalues () const =0
 The calculated eigenvalues of the subspace matrix. More...
 
virtual void set_hermiticity (bool hermitian)=0
 Sets hermiticity of kernel. More...
 
virtual bool get_hermiticity () const =0
 Gets hermiticity of kernel, if true than it is hermitian, otherwise it is not. More...
 
- Public Member Functions inherited from molpro::linalg::itsolv::IterativeSolver< R, Q, P >
virtual ~IterativeSolver ()=default
 
 IterativeSolver ()=default
 
 IterativeSolver (const IterativeSolver< R, Q, P > &)=delete
 
IterativeSolver< R, Q, P > & operator= (const IterativeSolver< R, Q, P > &)=delete
 
 IterativeSolver (IterativeSolver< R, Q, P > &&) noexcept=default
 
IterativeSolver< R, Q, P > & operator= (IterativeSolver< R, Q, P > &&) noexcept=default
 
virtual bool solve (const VecRef< R > &parameters, const VecRef< R > &actions, const Problem< R > &problem, bool generate_initial_guess=false)=0
 Simplified one-call solver. More...
 
virtual bool solve (R &parameters, R &actions, const Problem< R > &problem, bool generate_initial_guess=false)=0
 
virtual bool solve (std::vector< R > &parameters, std::vector< R > &actions, const Problem< R > &problem, bool generate_initial_guess=false)=0
 
virtual int add_vector (const VecRef< R > &parameters, const VecRef< R > &actions)=0
 Take, typically, a current solution and residual, and add it to the solution space. More...
 
virtual int add_vector (std::vector< R > &parameters, std::vector< R > &action)=0
 
virtual int add_vector (R &parameters, R &action, value_type value=0)=0
 
virtual size_t add_p (const CVecRef< P > &pparams, const array::Span< value_type > &pp_action_matrix, const VecRef< R > &parameters, const VecRef< R > &action, fapply_on_p_type apply_p)=0
 Add P-space vectors to the expansion set for linear methods. More...
 
virtual void clearP ()=0
 
virtual void solution (const std::vector< int > &roots, const VecRef< R > &parameters, const VecRef< R > &residual)=0
 Construct solution and residual for a given set of roots. More...
 
virtual void solution_params (const std::vector< int > &roots, const VecRef< R > &parameters)=0
 Constructs parameters of selected roots. More...
 
virtual size_t end_iteration (const VecRef< R > &parameters, const VecRef< R > &residual)=0
 Behaviour depends on the solver. More...
 
virtual bool end_iteration_needed ()=0
 signal whether end_iteration should be called More...
 
virtual std::vector< size_t > suggest_p (const CVecRef< R > &solution, const CVecRef< R > &residual, size_t max_number, double threshold)=0
 Get the solver's suggestion of which degrees of freedom would be best to add to the P-space. More...
 
virtual void solution (const std::vector< int > &roots, std::vector< R > &parameters, std::vector< R > &residual)=0
 
virtual void solution (R &parameters, R &residual)=0
 
virtual void solution_params (const std::vector< int > &roots, std::vector< R > &parameters)=0
 
virtual void solution_params (R &parameters)=0
 
virtual size_t end_iteration (std::vector< R > &parameters, std::vector< R > &action)=0
 
virtual size_t end_iteration (R &parameters, R &action)=0
 
virtual const std::vector< int > & working_set () const =0
 Working set of roots that are not yet converged. More...
 
virtual std::vector< scalar_typeworking_set_eigenvalues () const
 
virtual size_t n_roots () const =0
 
virtual void set_n_roots (size_t nroots)=0
 
virtual const std::vector< scalar_type > & errors () const =0
 
virtual const Statisticsstatistics () const =0
 
virtual void report (std::ostream &cout, bool endl=true) const =0
 Writes a report to cout output stream. More...
 
virtual void report () const =0
 Writes a report to std::cout. More...
 
virtual void set_convergence_threshold (double thresh)=0
 Sets the convergence threshold. More...
 
virtual double convergence_threshold () const =0
 Reports the convergence threshold. More...
 
virtual void set_convergence_threshold_value (double thresh)=0
 Sets the value convergence threshold. More...
 
virtual double convergence_threshold_value () const =0
 Reports the value convergence threshold. More...
 
virtual void set_verbosity (Verbosity v)=0
 
virtual void set_verbosity (int v)=0
 
virtual Verbosity get_verbosity () const =0
 
virtual void set_max_iter (int n)=0
 
virtual int get_max_iter () const =0
 
virtual void set_max_p (int n)=0
 
virtual int get_max_p () const =0
 
virtual void set_p_threshold (double thresh)=0
 
virtual double get_p_threshold () const =0
 
virtual const subspace::Dimensionsdimensions () const =0
 
virtual void set_options (const Options &options)=0
 
virtual std::shared_ptr< Optionsget_options () const =0
 
virtual scalar_type value () const =0
 Report the function value for the current optimum solution. More...
 
virtual bool nonlinear () const =0
 Report whether the class is a non-linear solver. More...
 
virtual void set_profiler (molpro::profiler::Profiler &profiler)=0
 Attach a profiler in order to collect performance data. More...
 
virtual const std::shared_ptr< molpro::profiler::Profiler > & profiler () const =0
 
virtual bool test_problem (const Problem< R > &problem, R &v0, R &v1, int verbosity=0, double threshold=1e-5) const =0
 Test a supplied problem class. More...
 

Additional Inherited Members

- Public Types inherited from molpro::linalg::itsolv::IterativeSolver< R, Q, P >
using value_type = typename R::value_type
 The underlying type of elements of vectors. More...
 
using scalar_type = typename array::ArrayHandler< R, Q >::value_type
 
using value_type_abs = typename array::ArrayHandler< R, R >::value_type_abs
 
using VectorP = std::vector< value_type >
 
using fapply_on_p_type = std::function< void(const std::vector< VectorP > &, const CVecRef< P > &, const VecRef< R > &)>
 

Member Function Documentation

◆ eigenvalues()

template<class R , class Q , class P >
virtual std::vector< scalar_type > molpro::linalg::itsolv::LinearEigensystem< R, Q, P >::eigenvalues ( ) const
pure virtual

◆ get_hermiticity()

template<class R , class Q , class P >
virtual bool molpro::linalg::itsolv::LinearEigensystem< R, Q, P >::get_hermiticity ( ) const
pure virtual

Gets hermiticity of kernel, if true than it is hermitian, otherwise it is not.

Implemented in molpro::linalg::itsolv::LinearEigensystemDavidson< R, Q, P >, and molpro::linalg::itsolv::LinearEigensystemRSPT< R, Q, P >.

◆ set_hermiticity()

template<class R , class Q , class P >
virtual void molpro::linalg::itsolv::LinearEigensystem< R, Q, P >::set_hermiticity ( bool  hermitian)
pure virtual