You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
742 B

  1. namespace StormEigen {
  2. /**
  3. \eigenManualPage MatrixfreeSolverExample Matrix-free solvers
  4. 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:
  5. - Index rows() and Index cols(): returns number of rows and columns respectively
  6. - operator* with and %Eigen dense column vector (its actual implementation goes in a specialization of the internal::generic_product_impl class)
  7. StormEigen::internal::traits<> must also be specialized for the wrapper type.
  8. Here is a complete example wrapping a StormEigen::SparseMatrix:
  9. \include matrixfree_cg.cpp
  10. Output: \verbinclude matrixfree_cg.out
  11. */
  12. }