iterative-solver 0.0
SubspaceSolverRSPT.h
1#ifndef LINEARALGEBRA_SRC_MOLPRO_LINALG_ITSOLV_SUBSPACE_SUBSPACESOLVERRSPT_H_
2#define LINEARALGEBRA_SRC_MOLPRO_LINALG_ITSOLV_SUBSPACE_SUBSPACESOLVERRSPT_H_
3#include "SubspaceSolverLinEig.h"
5template <class RT, class QT, class PT>
6class SubspaceSolverRSPT : public SubspaceSolverLinEig<RT, QT, PT> {
7public:
13
14 explicit SubspaceSolverRSPT(std::shared_ptr<Logger> logger) : SubspaceSolverLinEig<RT, QT, PT>(std::move(logger)) {}
15
16 void solve(IXSpace<R, Q, P>& xspace, const size_t nroots_max) override {
18 // std::cout << "variational subspace solution " << as_string(this->m_solutions) << std::endl;
19 // molpro::cout << this->m_eigenvalues.front()<<std::endl;
20 // std::cout << "rows " << this->m_solutions.rows() << std::endl;
21 // std::cout << "cols " << this->m_solutions.cols() << std::endl;
22 this->m_solutions.slice().fill(0);
23 this->m_solutions(0, 0) = 1;
24 // std::cout << "perturbational subspace solution " << as_string(this->m_solutions) << std::endl;
25 }
26};
27} // namespace molpro::linalg::itsolv::subspace
28#endif // LINEARALGEBRA_SRC_MOLPRO_LINALG_ITSOLV_SUBSPACE_SUBSPACESOLVERRSPT_H_
Slice slice(coord_type upper_left, coord_type bottom_right)
Access a rectangular slice of the matrix.
Definition: Matrix.h:97
Solves subspace problem for linear eigenvalues and system of linear equations.
Definition: SubspaceSolverLinEig.h:13
void solve_eigenvalue(IXSpace< R, Q, P > &xspace, const size_t nroots_max)
Definition: SubspaceSolverLinEig.h:33
Matrix< value_type > m_solutions
solution matrix with row vectors
Definition: SubspaceSolverLinEig.h:110
SubspaceSolverRSPT(std::shared_ptr< Logger > logger)
Definition: SubspaceSolverRSPT.h:14
void solve(IXSpace< R, Q, P > &xspace, const size_t nroots_max) override
Solve the subspace problem.
Definition: SubspaceSolverRSPT.h:16
Definition: PSpace.h:7
typename array::ArrayHandler< R, R >::value_type value_type
Definition: ISubspaceSolver.h:19
typename array::ArrayHandler< R, R >::value_type_abs value_type_abs
Definition: ISubspaceSolver.h:20
PT P
Definition: ISubspaceSolver.h:18
QT Q
Definition: ISubspaceSolver.h:17
RT R
Definition: ISubspaceSolver.h:16