Go to the documentation of this file.
16 #ifndef SURGSIM_MATH_LINEARSPARSESOLVEANDINVERSE_H
17 #define SURGSIM_MATH_LINEARSPARSESOLVEANDINVERSE_H
21 #pragma warning(disable:4244)
24 #include <Eigen/SparseCore>
25 #include <unordered_map>
27 #include <boost/assign/list_of.hpp>
49 boost::assign::map_list_of
125 #if defined(_MSC_VER)
129 #endif // SURGSIM_MATH_LINEARSPARSESOLVEANDINVERSE_H
Matrix solve(const Matrix &b) const override
Solve the linear system (matrix.x=b) using the matrix provided by the latest setMatrix call for all c...
Definition: LinearSparseSolveAndInverse.cpp:71
Matrix solve(const Matrix &b) const override
Solve the linear system (matrix.x=b) using the matrix provided by the latest setMatrix call for all c...
Definition: LinearSparseSolveAndInverse.cpp:39
virtual ~LinearSparseSolveAndInverse()
Definition: LinearSparseSolveAndInverse.h:60
double getTolerance()
Get the conjugate gradient convergence tolerance.
Definition: LinearSparseSolveAndInverse.cpp:49
Eigen::ConjugateGradient< SparseMatrix > m_solver
Definition: LinearSparseSolveAndInverse.h:118
Eigen::SparseLU< SparseMatrix > m_solver
Definition: LinearSparseSolveAndInverse.h:90
Definition: CompoundShapeToGraphics.cpp:29
Definition: LinearSparseSolveAndInverse.h:43
LinearSolver
The linear numerical integration scheme supported Each Linear Solver should have its own entry in thi...
Definition: LinearSparseSolveAndInverse.h:41
virtual void setMatrix(const SparseMatrix &matrix)=0
Set the linear solver matrix.
Derivation for sparse CG solver.
Definition: LinearSparseSolveAndInverse.h:94
SparseMatrix m_matrix
A copy of the system matrix for use when an inverse is necessary.
Definition: LinearSparseSolveAndInverse.h:78
LinearSparseSolveAndInverse aims at performing an efficient linear system resolution and calculating ...
Definition: LinearSparseSolveAndInverse.h:57
Definition: LinearSparseSolveAndInverse.h:45
void setMatrix(const SparseMatrix &matrix) override
Set the linear solver matrix.
Definition: LinearSparseSolveAndInverse.cpp:64
void setMaxIterations(SparseMatrix::Index iterations)
Set the maximum number of iterations for conjugate gradient.
Definition: LinearSparseSolveAndInverse.cpp:54
Eigen::SparseMatrix< double > SparseMatrix
A sparse matrix.
Definition: SparseMatrix.h:32
const std::unordered_map< LinearSolver, std::string, std::hash< int > > LinearSolverNames
Definition: LinearSparseSolveAndInverse.h:48
void setTolerance(double tolerance)
Set the conjugate gradient convergence tolerance.
Definition: LinearSparseSolveAndInverse.cpp:44
Definition: LinearSparseSolveAndInverse.h:44
void setMatrix(const SparseMatrix &matrix) override
Set the linear solver matrix.
Definition: LinearSparseSolveAndInverse.cpp:31
Derivation for sparse LU solver.
Definition: LinearSparseSolveAndInverse.h:82
SparseMatrix::Index getMaxIterations()
Get the conjugate gradient maximum iterations.
Definition: LinearSparseSolveAndInverse.cpp:59
virtual Matrix getInverse() const
Definition: LinearSparseSolveAndInverse.cpp:26
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dynamic size matrix.
Definition: Matrix.h:65
virtual Matrix solve(const Matrix &b) const =0
Solve the linear system (matrix.x=b) using the matrix provided by the latest setMatrix call for all c...