G+Smo  23.12.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsSparseSolver< T > Class Template Referenceabstract

Detailed Description

template<typename T = real_t>
class gismo::gsSparseSolver< T >

Abstract class for solvers. The solver interface is base on 3 methods: -compute set the system matrix (possibly compute the factorization or preconditioners) -solve solves for a given right hand side -succeed returns true if solving succeded according to solver dependent criteria (usually tolerance based) So in order to solve \( A x = b \) with a solver s two functions must be called: s.compute(A) and s.solve(b). The calls can be chained as in s.compute(A).solve(b).

Moreover, a collection of available sparse solvers is given as typedefs Example of usage:

gsSparseMatrix<real_t> M; // sparse system matrix
gsMatrix<real_t> b; // right-hand side
gsSparseSolver<real_t>::CGDiagonal solver;
solver.compute(M);
gsMatrix<> x = solver.solve(b);

See also http://eigen.tuxfamily.org/dox/group__TopicSparseSystems.html and http://eigen.tuxfamily.org/dox/classEigen_1_1IterativeSolverBase.html

Public Member Functions

virtual std::string detail () const
 Prints the object as a string with extended details.
 
virtual std::ostream & print (std::ostream &os) const
 Prints the object as a string.