Implementation of linear solvers.
More...
|
| template<typename V , typename M > |
| void | allium::cg (V &solution, std::shared_ptr< M > mat, const V &rhs, real_part_t< typename V::Number > tol=1e-8) |
| | The conjugate gradient method. More...
|
| |
| template<typename V , typename M > |
| void | allium::gmres (V &result, std::shared_ptr< M > mat, const V &rhs, real_part_t< typename V::Number > tol=1e-6) |
| |
| template<typename V , typename F > |
| FunctorLinearOperator< V, std::remove_reference_t< F > > | allium::make_linear_operator (F &&f) |
| | Converts any functor into a LinearOperator. More...
|
| |
Implementation of linear solvers.
◆ InitialGuess
Behavior for the initial guess.
| Enumerator |
|---|
| NOT_PROVIDED | Initialize with zero.
|
| PROVIDED | Use the value from the solution vector.
|
◆ cg()
template<typename V , typename M >
| void allium::cg |
( |
V & |
solution, |
|
|
std::shared_ptr< M > |
mat, |
|
|
const V & |
rhs, |
|
|
real_part_t< typename V::Number > |
tol = 1e-8 |
|
) |
| |
The conjugate gradient method.
Convenience method for using CgSolver.
◆ gmres()
template<typename V , typename M >
| void allium::gmres |
( |
V & |
result, |
|
|
std::shared_ptr< M > |
mat, |
|
|
const V & |
rhs, |
|
|
real_part_t< typename V::Number > |
tol = 1e-6 |
|
) |
| |
Convenice method to use the GmresSolver.
◆ make_linear_operator()
template<typename V , typename F >
Converts any functor into a LinearOperator.
- Parameters
-
| [in] | f | A function implementing a linear(!) function. |