OGS
MathLib::EigenLinearSolverBase Class Referenceabstract

Detailed Description

Definition at line 36 of file EigenLinearSolver.cpp.

Inheritance diagram for MathLib::EigenLinearSolverBase:
[legend]

Public Types

using Vector = EigenVector::RawVectorType
 
using Matrix = EigenMatrix::RawMatrixType
 

Public Member Functions

virtual ~EigenLinearSolverBase ()=default
 
bool solve (Vector &b, Vector &x, EigenOption &opt)
 
bool compute (Matrix &A, EigenOption &opt, MathLib::LinearSolverBehaviour const linear_solver_behaviour)
 

Protected Member Functions

virtual bool solveImpl (Vector const &b, Vector &x, EigenOption &opt)=0
 
virtual bool computeImpl (Matrix &A, EigenOption &opt, MathLib::LinearSolverBehaviour const linear_solver_behaviour)=0
 

Member Typedef Documentation

◆ Matrix

◆ Vector

Constructor & Destructor Documentation

◆ ~EigenLinearSolverBase()

virtual MathLib::EigenLinearSolverBase::~EigenLinearSolverBase ( )
virtualdefault

Member Function Documentation

◆ compute()

bool MathLib::EigenLinearSolverBase::compute ( Matrix & A,
EigenOption & opt,
MathLib::LinearSolverBehaviour const linear_solver_behaviour )
inline

Definition at line 65 of file EigenLinearSolver.cpp.

67 {
68#ifdef USE_EIGEN_UNSUPPORTED
69 if (opt.scaling)
70 {
71 INFO("-> scale");
72 scaling_ = std::make_unique<
73 Eigen::IterScaling<EigenMatrix::RawMatrixType>>();
74 scaling_->computeRef(A);
75 }
76#endif
77
78 return computeImpl(A, opt, linear_solver_behaviour);
79 }
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:35
virtual bool computeImpl(Matrix &A, EigenOption &opt, MathLib::LinearSolverBehaviour const linear_solver_behaviour)=0

References computeImpl(), and INFO().

Referenced by MathLib::details::EigenIterativeLinearSolver< T_SOLVER >::computeImpl().

◆ computeImpl()

virtual bool MathLib::EigenLinearSolverBase::computeImpl ( Matrix & A,
EigenOption & opt,
MathLib::LinearSolverBehaviour const linear_solver_behaviour )
protectedpure virtual

◆ solve()

bool MathLib::EigenLinearSolverBase::solve ( Vector & b,
Vector & x,
EigenOption & opt )
inline

Definition at line 44 of file EigenLinearSolver.cpp.

45 {
46#ifdef USE_EIGEN_UNSUPPORTED
47 if (scaling_)
48 {
49 b = scaling_->LeftScaling().cwiseProduct(b);
50 }
51#endif
52
53 auto const success = solveImpl(b, x, opt);
54
55#ifdef USE_EIGEN_UNSUPPORTED
56 if (scaling_)
57 {
58 x = scaling_->RightScaling().cwiseProduct(x);
59 }
60#endif
61
62 return success;
63 }
virtual bool solveImpl(Vector const &b, Vector &x, EigenOption &opt)=0

References solveImpl().

◆ solveImpl()

virtual bool MathLib::EigenLinearSolverBase::solveImpl ( Vector const & b,
Vector & x,
EigenOption & opt )
protectedpure virtual

The documentation for this class was generated from the following file: