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
74protected:
76 std::unique_ptr<EigenLinearSolverBase> solver_;
77 void setRestart();
78 void setL();
79 void setS();
81 void setAngle();
83};
84
85} // 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)
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