3 #ifndef DUNE_FUNCTIONS_GRIDFUNCTIONS_GRID_FUNCTION_HH 4 #define DUNE_FUNCTIONS_GRIDFUNCTIONS_GRID_FUNCTION_HH 8 #include <dune/common/typeutilities.hh> 30 template<
class Signature,
class EntitySet,
template<
class>
class DerivativeTraits=DefaultDerivativeTraits,
size_t bufferSize=56>
40 template<
class S,
class ES,
template<
class>
class DerivativeTraits,
size_t bufferSize>
52 using Element =
typename EntitySet::Element;
94 template<
class Range,
class Domain,
class ES,
template<
class>
class DerivativeTraits,
size_t bufferSize>
95 class GridFunction<Range(Domain), ES, DerivativeTraits, bufferSize> :
97 typename Imp::GridFunctionTraits<Range(Domain), ES, DerivativeTraits, bufferSize>::Concept,
98 Imp::GridFunctionTraits<Range(Domain), ES, DerivativeTraits, bufferSize>::template Model>
123 template<
class F, disableCopyMove<Gr
idFunction, F> = 0 >
127 static_assert(
Dune::Functions::Concept::isGridFunction<F, Range(Domain), EntitySet, DerivativeTraits>(),
"Trying to construct a GridFunction from type that does not model the GridFunction concept");
135 Range operator() (
const Domain& x)
const 137 return this->asInterface().operator()(x);
145 return t.asInterface().derivative();
159 return t.asInterface().wrappedLocalFunction();
169 return this->asInterface().wrappedEntitySet();
179 #endif // DUNE_FUNCTIONS_GRIDFUNCTIONS_GRID_FUNCTION_HH Derivative traits for local functions.
Definition: localderivativetraits.hh:27
typename SignatureTraits< Signature >::Range Range
Range type.
Definition: differentiablefunction.hh:44
Definition: differentiablefunction.hh:28
typename Base::Range(typename EntitySet::LocalCoordinate) LocalSignature
Signature of the derivative.
Definition: gridfunction.hh:61
Traits class providing type information for DifferentiableFunction.
Definition: localfunction.hh:39
Definition: polynomial.hh:7
GridFunction(F &&f)
Construct from function.
Definition: gridfunction.hh:124
Traits class providing type information for DifferentiableFunction.
Definition: gridfunction.hh:41
typename Dune::Functions::Imp::LocalFunctionTraits< LocalSignature, Element, LocalDerivativeTraits, bufferSize > LocalFunctionTraits
LocalFunctionTraits associated with this type.
Definition: gridfunction.hh:67
Definition: differentiablefunction_imp.hh:69
Definition: gridfunction_imp.hh:46
static constexpr bool isGridFunction()
Check if F models the GridFunction concept with given signature and entity set.
Definition: functionconcepts.hh:228
friend LocalFunctionInterface localFunction(const GridFunction &t)
Get local function of wrapped function.
Definition: gridfunction.hh:157
friend DerivativeInterface derivative(const GridFunction &t)
Definition: gridfunction.hh:143
const EntitySet & entitySet() const
Get associated EntitySet.
Definition: gridfunction.hh:167
typename SignatureTraits< Signature >::template DerivativeSignature< DerivativeTraits > DerivativeSignature
Signature of the derivative.
Definition: differentiablefunction.hh:50
typename Dune::Functions::LocalDerivativeTraits< EntitySet, DerivativeTraits >::template Traits< R > LocalDerivativeTraits
Definition: gridfunction.hh:64
typename EntitySet::Element Element
Element type of EntitySet.
Definition: gridfunction.hh:52
ES EntitySet
EntitySet the GridFunction lives on.
Definition: gridfunction.hh:49
Definition: localfunction.hh:29
Definition: differentiablefunction_imp.hh:50
Base class for type-erased interface wrapper.
Definition: typeerasure.hh:164
Traits class providing type information for DifferentiableFunction.
Definition: differentiablefunction.hh:38
Definition: gridfunction_imp.hh:34
Definition: gridfunction.hh:31