OGS
EigenLinearSolver.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <memory>
14#include <vector>
15
16#include "EigenOption.h"
18
19namespace MathLib
20{
21class EigenMatrix;
22class EigenVector;
23
24class EigenLinearSolverBase;
25
27{
28public:
35 explicit EigenLinearSolver(std::string const& solver_name,
36 EigenOption const& option);
37
39
43 void setOption(const EigenOption& option) { option_ = option; }
44
49
56 bool compute(EigenMatrix& A,
57 MathLib::LinearSolverBehaviour const linear_solver_behaviour);
65 bool solve(EigenVector& b, EigenVector& x);
66
68 bool solve(EigenMatrix& A,
69 EigenVector& b,
70 EigenVector& x,
71 MathLib::LinearSolverBehaviour const linear_solver_behaviour =
73
76
77protected:
79 std::unique_ptr<EigenLinearSolverBase> solver_;
81 void setRestart();
82 void setL();
83 void setS();
85 void setAngle();
87};
88
89} // namespace MathLib
bool compute(EigenMatrix &A, MathLib::LinearSolverBehaviour const linear_solver_behaviour)
bool solve(EigenVector &b, EigenVector &x)
EigenLinearSolver(std::string const &solver_name, EigenOption const &option)
bool canSolveRectangular() const
Get, if the solver can handle rectangular equation systems.
void setOption(const EigenOption &option)
std::unique_ptr< EigenLinearSolverBase > solver_
Global vector based on Eigen vector.
Definition EigenVector.h:25
Option for Eigen sparse solver.
Definition EigenOption.h:19