5 #include <dune/common/typeutilities.hh> 7 #include <amdis/common/Concepts.hpp> 8 #include <amdis/common/Logical.hpp> 9 #include <amdis/common/Order.hpp> 10 #include <amdis/gridfunctions/Derivative.hpp> 15 template <
class Gr
idFunction>
17 -> decltype(gf.makeLocalFunction())
19 return gf.makeLocalFunction();
43 auto require(F&& f) -> decltype(
51 auto require(GF
const& ) -> std::void_t<
54 typename GF::EntitySet
66 using HasLocalFunction_t = models_t<Definition::HasLocalFunction(GF)>;
73 HasLocalFunction<GF> && models<Definition::HasGridFunctionTypes(GF)>;
76 using GridFunction_t = bool_t<GridFunction<GF>>;
81 template <
class... GFs>
83 (GridFunction<remove_cvref_t<GFs>> ||...) ||
86 template <
class... GFs>
87 using AnyGridFunction_t = bool_t<AnyGridFunction<GFs...>>;
95 template <
class PreGr
idFct,
class =
void>
97 : PreGridFct::Creator {};
100 template <
class Function>
106 template <
class Gr
idFct,
class Gr
idView>
107 GridFct
const& makeGridFunctionImpl(GridFct
const& gridFct, GridView
const& , std::true_type, Dune::PriorityTag<2>)
113 template <
class F,
class GridView,
114 class Coordinate =
typename GridView::template Codim<0>::Entity::Geometry::GlobalCoordinate,
115 std::enable_if_t<std::is_invocable_v<F, Coordinate>,
int> = 0>
116 auto makeGridFunctionImpl(F
const& f, GridView
const& gridView, std::false_type, Dune::PriorityTag<1>)
123 template <
class PreGridFct,
class GridView,
125 decltype(
auto) makeGridFunctionImpl(PreGridFct
const& preGridFct, GridView
const& gridView, std::false_type, Dune::PriorityTag<0>)
127 return Creator::create(preGridFct, gridView);
167 template <
class PreGr
idFct,
class Gr
idView>
170 using isGridFct = Concepts::GridFunction_t<PreGridFct>;
171 return Impl::makeGridFunctionImpl(preGridFct, gridView, isGridFct{}, Dune::PriorityTag<5>{});
constexpr bool GridFunction
GridFunction GF is a Type that has LocalFunction and provides some typedefs for Domain, Range, and EntitySet.
Definition: GridFunction.hpp:72
Definition: GridFunction.hpp:26
constexpr bool AnyGridFunction
Concept is fulfilled, if at least one of the massed Expressions can be converted to a GridFunction...
Definition: GridFunction.hpp:82
Definition: GridFunction.hpp:96
decltype(auto) makeGridFunction(PreGridFct const &preGridFct, GridView const &gridView)
Generator for Gridfunctions from Expressions (PreGridfunctions)
Definition: GridFunction.hpp:168
Definition: AdaptBase.hpp:6
Definition: GridFunction.hpp:40
constexpr bool HasLocalFunction
GridFunction GF has free function localFunction(GF)
Definition: GridFunction.hpp:63
Definition: AnalyticGridFunction.hpp:220
Definition: GridFunction.hpp:48