mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-03 18:50:39 +08:00
Add missing matrix-free example page
This commit is contained in:
parent
2beec14503
commit
2c329453b1
21
doc/MatrixfreeSolverExample.dox
Normal file
21
doc/MatrixfreeSolverExample.dox
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
namespace Eigen {
|
||||
|
||||
/**
|
||||
|
||||
\eigenManualPage MatrixfreeSolverExample Matrix-free solvers
|
||||
|
||||
Iterative solvers such as ConjugateGradient and BiCGSTAB can be used in a matrix free context. To this end, user must provide a wrapper class inheriting EigenBase<> and implementing the following methods:
|
||||
- Index rows() and Index cols(): returns number of rows and columns respectively
|
||||
- operator* with and Eigen dense column vector
|
||||
- resize(rows,cols): needed for source compatibility (can stay empty)
|
||||
|
||||
Eigen::internal::traits<> must also be specialized for the wrapper type.
|
||||
|
||||
For efficiency purpose, one might also want to provide a custom preconditioner. Here is an example using ConjugateGradient and implementing also a custom Jacobi preconditioner:
|
||||
\include matrixfree_cg.cpp
|
||||
Output: \verbinclude matrixfree_cg.out
|
||||
|
||||
*/
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user