File: MatrixfreeSolverExample.dox

package info (click to toggle)
eigen3 3.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 20,492 kB
  • sloc: cpp: 151,572; ansic: 75,396; fortran: 24,137; sh: 971; python: 244; javascript: 205; makefile: 42
file content (20 lines) | stat: -rw-r--r-- 758 bytes parent folder | download | duplicates (20)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

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:
 - \c Index \c rows() and \c Index \c cols(): returns number of rows and columns respectively
 - \c operator* with your type and an %Eigen dense column vector (its actual implementation goes in a specialization of the internal::generic_product_impl class)

\c Eigen::internal::traits<> must also be specialized for the wrapper type.

Here is a complete example wrapping an Eigen::SparseMatrix:
\include matrixfree_cg.cpp
Output: \verbinclude matrixfree_cg.out

*/

}