OGS
EigenLinearSolver.h
Go to the documentation of this file.
1
10
11#pragma once
12
13#include <memory>
14#include <vector>
15
16#include "EigenOption.h"
18
19namespace MathLib
20{
21class EigenMatrix;
22class EigenVector;
23
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
79 bool willCompute(
80 MathLib::LinearSolverBehaviour const linear_solver_behaviour) const;
81
82protected:
84 std::unique_ptr<EigenLinearSolverBase> solver_;
86 void setRestart();
87 void setL();
88 void setS();
90 void setAngle();
92};
93
94} // 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 willCompute(MathLib::LinearSolverBehaviour const linear_solver_behaviour) const
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:26
Option for Eigen sparse solver.
Definition EigenOption.h:19