iMSTK
Interactive Medical Simulation Toolkit
|
Successive Over Relaxation (SOR) sparse linear solver. More...
#include <imstkSOR.h>
Public Member Functions | |
SOR (const double relaxationFactor=0.5) | |
SOR (const SparseMatrixd &A, const Vectord &rhs) | |
SOR (const SOR &)=delete | |
Dissallow copy & move. | |
SOR (const SOR &&)=delete | |
SOR & | operator= (const SOR &)=delete |
SOR & | operator= (const SOR &&)=delete |
void | SORSolve (Vectord &x) |
Do one iteration of the method. More... | |
void | solve (Vectord &x) override |
Solve the system of equations. | |
void | solve (Vectord &x, const double tolerance) |
Solve the linear system using Gauss-Seidel iterations to a specified tolerance. | |
double | getResidual (const Vectord &x) override |
Return the error calculated by the solver. | |
void | setSystem (std::shared_ptr< LinearSystemType > newSystem) override |
Sets the system. System of linear equations. | |
void | setMaxNumIterations (const size_t maxIter) override |
set/get the maximum number of iterations for the iterative solver. | |
void | setTolerance (const double tolerance) |
Set solver tolerance. | |
void | print () const override |
Print solver information. | |
double | getRelaxationFactor () const |
Return the relaxation factor. | |
void | setLinearProjectors (std::vector< LinearProjectionConstraint > *f) |
Get the vector denoting the filter. | |
std::vector< LinearProjectionConstraint > & | getLinearProjectors () |
Get the vector denoting the filter. | |
void | setDynamicLinearProjectors (std::vector< LinearProjectionConstraint > *f) |
Get the vector denoting the filter. | |
std::vector< LinearProjectionConstraint > & | getDynamicLinearProjectors () |
Get the vector denoting the filter. | |
![]() | |
virtual size_t | getMaxNumIterations () const |
virtual const Vectord & | getResidualVector () |
Return residual vector. | |
virtual const Vectord & | getResidualVector (const Vectord &x) |
bool | isIterative () const override |
Returns true if the solver is iterative. | |
![]() | |
LinearSolver () | |
Default constructor/destructor. | |
virtual void | setSystem (std::shared_ptr< LinearSystemType > newSystem) |
Set/get the system. Replaces/Returns the stored linear system of equations. | |
std::shared_ptr< LinearSystemType > | getSystem () const |
void | setTolerance (const double tolerance) |
Set solver tolerance. | |
double | getTolerance () const |
Get solver tolerance. | |
Type | getType () |
Return the type of the solver. | |
Additional Inherited Members | |
![]() | |
enum | Type |
using | MatrixType = SparseMatrixd |
using | LinearSystemType = LinearSystem< MatrixType > |
![]() | |
size_t | m_maxIterations = 100 |
Maximum number of iterations to be performed. | |
Vectord | m_residual |
Storage for residual vector. | |
![]() | |
Type | m_type |
Type of the scene object. | |
double | m_tolerance |
default tolerance | |
std::shared_ptr< LinearSystemType > | m_linearSystem |
Linear system of equations. | |
Successive Over Relaxation (SOR) sparse linear solver.
Definition at line 23 of file imstkSOR.h.
void imstk::SOR::SORSolve | ( | Vectord & | x | ) |