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
99 void setTolerance(
double tolerance);
103 double getTolerance();
107 void setMaxIterations(SparseMatrix::Index iterations);
111 SparseMatrix::Index getMaxIterations();
125 #if defined(_MSC_VER) 129 #endif // SURGSIM_MATH_LINEARSPARSESOLVEANDINVERSE_H Definition: CompoundShapeToGraphics.cpp:29
const std::unordered_map< LinearSolver, std::string, std::hash< int > > LinearSolverNames
Definition: LinearSparseSolveAndInverse.h:48
Definition: LinearSparseSolveAndInverse.h:45
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dynamic size matrix.
Definition: Matrix.h:65
Derivation for sparse CG solver.
Definition: LinearSparseSolveAndInverse.h:94
Definition: LinearSparseSolveAndInverse.h:44
LinearSolver
The linear numerical integration scheme supported Each Linear Solver should have its own entry in thi...
Definition: LinearSparseSolveAndInverse.h:41
virtual Matrix getInverse() const
Definition: LinearSparseSolveAndInverse.cpp:26
Definitions of useful sparse matrix functions.
Eigen::SparseMatrix< double > SparseMatrix
A sparse matrix.
Definition: SparseMatrix.h:32
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...
virtual ~LinearSparseSolveAndInverse()
Definition: LinearSparseSolveAndInverse.h:60
Definitions of small fixed-size square matrix types.
Definitions of small fixed-size vector types.
Derivation for sparse LU solver.
Definition: LinearSparseSolveAndInverse.h:82
Eigen::ConjugateGradient< SparseMatrix > m_solver
Definition: LinearSparseSolveAndInverse.h:118
SparseMatrix m_matrix
A copy of the system matrix for use when an inverse is necessary.
Definition: LinearSparseSolveAndInverse.h:78
Definition: LinearSparseSolveAndInverse.h:43
LinearSparseSolveAndInverse aims at performing an efficient linear system resolution and calculating ...
Definition: LinearSparseSolveAndInverse.h:57
Eigen::SparseLU< SparseMatrix > m_solver
Definition: LinearSparseSolveAndInverse.h:90
virtual void setMatrix(const SparseMatrix &matrix)=0
Set the linear solver matrix.