13#ifndef DIRECT_PRECONDITIONER_HH
14#define DIRECT_PRECONDITIONER_HH
18#include <dune/istl/preconditioners.hh>
19#include <dune/istl/solvercategory.hh>
30 template <
class,
class>
class Factorization;
31 template <
class,
class>
class NumaBCRSMatrix;
46 typedef typename Op::Domain Domain;
47 typedef typename Op::Domain Range;
51 static int const category = Dune::SolverCategory::sequential;
63 void pre(Domain&, Range&) {}
66 void apply (Domain& x, Range
const& y)
68 std::vector<Scalar> b(y.dim());
70 factorization->solve(b);
75 std::unique_ptr<Factorization<Scalar>> factorization;
static int const category
void apply(Domain &x, Range const &y)
void pre(Domain &, Range &)
DirectPreconditioner(Op const &op, DirectType directType=DirectType::UMFPACK, MatrixProperties property=MatrixProperties::SYMMETRIC)
Abstract base class for matrix factorizations.
std::unique_ptr< Factorization< Scalar > > getFactorization(DirectType directType, MatrixAsTriplet< Scalar, Index > const &A, FactorizationOptions options)
Creates a factorization of the given triplet matrix.
DirectType
Available direct solvers for linear equation systems.
@ UMFPACK
UMFPack from SuiteSparse, using 32 bit integer indices.
MatrixProperties
Characterizations of sparse matrix properties.
OutIter vectorToSequence(double x, OutIter iter)
InIter vectorFromSequence(FunctionSpaceElement< Space, m > &v, InIter in)
!std ::is_same< decltype(hasFieldType< Type >(0)), TypeNotFound >::value ::type type