|
iMSTK
Interactive Medical Simulation Toolkit
|
Conjugate gradient sparse linear solver for Spd matrices. More...
#include <imstkConjugateGradient.h>


Public Member Functions | |
| ConjugateGradient (const SparseMatrixd &A, const Vectord &rhs) | |
| ConjugateGradient (const ConjugateGradient &)=delete | |
| Dissallow copy & move. | |
| ConjugateGradient (const ConjugateGradient &&)=delete | |
| ConjugateGradient & | operator= (const ConjugateGradient &)=delete |
| ConjugateGradient & | operator= (const ConjugateGradient &&)=delete |
| void | solve (Vectord &x) override |
| Do one iteration of the method. More... | |
| void | solve (Vectord &x, const double tolerance) |
| Solve the linear system using Conjugate gradient 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. | |
| virtual 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. | |
| void | applyLinearProjectionFilter (Vectord &x, const std::vector< LinearProjectionConstraint > &linProj, const bool setVal) |
| Apply a filter to the vector supplied. | |
| 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. | |
Public Member Functions inherited from imstk::IterativeLinearSolver | |
| virtual size_t | getMaxNumIterations () const |
| virtual const Vectord & | getResidualVector () |
| Return residual vector. | |
| virtual const Vectord & | getResidualVector (const Vectord &x) |
| void | print () const override |
| Print solver information. | |
| bool | isIterative () const override |
| Returns true if the solver is iterative. | |
Public Member Functions inherited from imstk::LinearSolver< SparseMatrixd > | |
| 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 | |
Public Types inherited from imstk::LinearSolver< SparseMatrixd > | |
| enum | Type |
| using | MatrixType = SparseMatrixd |
| using | LinearSystemType = LinearSystem< MatrixType > |
Protected Attributes inherited from imstk::IterativeLinearSolver | |
| size_t | m_maxIterations = 100 |
| Maximum number of iterations to be performed. | |
| Vectord | m_residual |
| Storage for residual vector. | |
Protected Attributes inherited from imstk::LinearSolver< SparseMatrixd > | |
| Type | m_type |
| Type of the scene object. | |
| double | m_tolerance |
| default tolerance | |
| std::shared_ptr< LinearSystemType > | m_linearSystem |
| Linear system of equations. | |
Conjugate gradient sparse linear solver for Spd matrices.
Definition at line 22 of file imstkConjugateGradient.h.
|
overridevirtual |
Do one iteration of the method.
Solve the system of equations.
Reimplemented from imstk::IterativeLinearSolver.
Definition at line 45 of file imstkConjugateGradient.cpp.
1.8.13