1#ifndef DUNE_FEM_SOLVER_PRECONDITIONFUNCTIONWRAPPER_HH
2#define DUNE_FEM_SOLVER_PRECONDITIONFUNCTIONWRAPPER_HH
6#include <dune/fem/operator/common/operator.hh>
20 template <
class DomainFunction,
class RangeFunction = DomainFunction>
22 :
public virtual Operator< DomainFunction, RangeFunction >
25 typedef DomainFunction DomainFunctionType;
26 typedef RangeFunction RangeFunctionType;
28 typedef std::reference_wrapper< const DomainFunctionType > ConstDomainDFType;
29 typedef std::reference_wrapper< RangeFunctionType > RangeDFType;
30 typedef std::function< void( ConstDomainDFType& , RangeDFType& ) > PreconditionerFunctionType;
33 const PreconditionerFunctionType& preconditioner_;
36 : preconditioner_( pre ) {}
38 virtual void operator() (
const DomainFunctionType &u, RangeFunctionType &v )
const final override
41 ConstDomainDFType uR( u );
45 preconditioner_( uR, vR );
Wrapper for functions passed from Python side that implements a preconditioner.
Definition: preconditionfunctionwrapper.hh:23
Dune namespace.
Definition: alignedallocator.hh:13
abstract operator
Definition: operator.hh:34