9 #include "imstkLinearSystem.h" 10 #include "imstkMath.h" 19 template<
typename SystemMatrixType>
23 using MatrixType = SystemMatrixType;
31 SuccessiveOverRelaxation,
46 virtual void solve(Vectord& x) = 0;
51 virtual void setSystem(std::shared_ptr<LinearSystemType> newSystem)
57 std::shared_ptr<LinearSystemType> getSystem()
const double getTolerance() const
Get solver tolerance.
void setTolerance(const double tolerance)
Set solver tolerance.
Type getType()
Return the type of the solver.
Gauss-Seidel sparse linear solver.
double m_tolerance
default tolerance
Jacobi sparse linear solver.
Represents the linear system of the form .
Base class for linear solvers.
Type m_type
Type of the scene object.
virtual bool isIterative() const =0
Returns true if the solver is iterative.
virtual void print() const
Print solver information.
virtual void setSystem(std::shared_ptr< LinearSystemType > newSystem)
Set/get the system. Replaces/Returns the stored linear system of equations.
LinearSolver()
Default constructor/destructor.
Conjugate gradient sparse linear solver for Spd matrices.
std::shared_ptr< LinearSystemType > m_linearSystem
Linear system of equations.
virtual void solve(Vectord &x)=0
Main solve routine.