iterative-solver 0.0
ISubspaceSolver.h
1#ifndef LINEARALGEBRA_SRC_MOLPRO_LINALG_ITSOLV_SUBSPACE_ISUBSPACESOLVER_H
2#define LINEARALGEBRA_SRC_MOLPRO_LINALG_ITSOLV_SUBSPACE_ISUBSPACESOLVER_H
3#include <molpro/linalg/array/ArrayHandler.h>
4#include <molpro/linalg/itsolv/subspace/IXSpace.h>
5
6#include <memory>
7
9
10class Logger;
11
12namespace subspace {
13
20template <class RT, class QT, class PT>
22 using R = RT;
23 using Q = QT;
24 using P = PT;
27 virtual ~ISubspaceSolver() = default;
28
34 virtual void solve(IXSpace<R, Q, P>& xspace, size_t nroots_max) = 0;
35
41 virtual void set_error(int root, value_type_abs error) = 0;
47 virtual void set_error(const std::vector<int>& roots, const std::vector<value_type_abs>& errors) = 0;
49 virtual const Matrix<value_type>& solutions() const = 0;
51 virtual const std::vector<value_type>& eigenvalues() const = 0;
53 virtual const std::vector<value_type_abs>& errors() const = 0;
55 virtual size_t size() const = 0;
56
57 virtual void set_logger(std::shared_ptr<Logger> logger) = 0;
58};
59
60} // namespace subspace
61} // namespace molpro::linalg::itsolv
62#endif // LINEARALGEBRA_SRC_MOLPRO_LINALG_ITSOLV_SUBSPACE_ISUBSPACESOLVER_H
decltype(value_type_L{} *value_type_R{}) value_type
Definition: ArrayHandler.h:181
decltype(check_abs< value_type >()) value_type_abs
Definition: ArrayHandler.h:182
4-parameter interpolation of a 1-dimensional function given two points for which function values and ...
Definition: helper.h:11
Manages solution of the subspace problem and storage of those solutions.
Definition: ISubspaceSolver.h:21
virtual void set_error(int root, value_type_abs error)=0
Update the error associated with a given root.
typename array::ArrayHandler< R, R >::value_type value_type
Definition: ISubspaceSolver.h:25
virtual const std::vector< value_type_abs > & errors() const =0
Access errors corresponding to each solution.
typename array::ArrayHandler< R, R >::value_type_abs value_type_abs
Definition: ISubspaceSolver.h:26
virtual void solve(IXSpace< R, Q, P > &xspace, size_t nroots_max)=0
Solve the subspace problem.
PT P
Definition: ISubspaceSolver.h:24
virtual const std::vector< value_type > & eigenvalues() const =0
Access eigenvalues from the last solve() call.
virtual void set_logger(std::shared_ptr< Logger > logger)=0
QT Q
Definition: ISubspaceSolver.h:23
virtual void set_error(const std::vector< int > &roots, const std::vector< value_type_abs > &errors)=0
Update errors for a group of roots.
virtual size_t size() const =0
Number of solutions stored in this object.
RT R
Definition: ISubspaceSolver.h:22
virtual const Matrix< value_type > & solutions() const =0
Access solutions from the last solve() call.