Allium  0.1.0
Linear Solver

Implementation of linear solvers. More...

Classes

class  allium::CgSolver< V >
 The conjugate gradient method, solves $ A x = b $. More...
 
class  allium::GmresSolverBase< N >
 Implementation of the GMRES algorithm (Saad and Schultz, 1986). More...
 
class  allium::LinearOperator< V >
 Linear operator for the use in iterative linear solvers. More...
 
class  allium::FunctorLinearOperator< V, F >
 Wraps a functor into a linear operator. More...
 
class  allium::LinearSolver< V >
 Linear solver interface. More...
 

Typedefs

template<typename V >
using allium::GmresSolver = IterativeSolverMixin< GmresSolverBase< typename V::Number >, V >
 

Enumerations

enum class  allium::InitialGuess { NOT_PROVIDED , PROVIDED }
 Behavior for the initial guess. More...
 

Functions

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...
 

Detailed Description

Implementation of linear solvers.

Enumeration Type Documentation

◆ InitialGuess

enum allium::InitialGuess
strong

Behavior for the initial guess.

Enumerator
NOT_PROVIDED 

Initialize with zero.

PROVIDED 

Use the value from the solution vector.

Function Documentation

◆ 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 >
FunctorLinearOperator<V, std::remove_reference_t<F> > allium::make_linear_operator ( F &&  f)

Converts any functor into a LinearOperator.

Parameters
[in]fA function implementing a linear(!) function.