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
76 using GridFunction_t = bool_t<GridFunction<GF>>;
81 template <
class... GFs>
83 (GridFunction<remove_cvref_t<GFs>> ||...) ||
86 template <
class... 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>)
118 AnalyticPreGridFunction<F> preGridFct{f};
119 return AnalyticPreGridFunction<F>::Creator::create(preGridFct, gridView);
123 template <
class PreGridFct,
class GridView,
124 class Creator = GridFunctionCreator<PreGridFct>>
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 HasLocalFunction
GridFunction GF has free function localFunction(GF)
Definition: GridFunction.hpp:63
constexpr bool GridFunction
GridFunction GF is a Type that has LocalFunction and provides some typedefs for Domain,...
Definition: GridFunction.hpp:72
constexpr bool AnyGridFunction
Concept is fulfilled, if at least one of the massed Expressions can be converted to a GridFunction,...
Definition: GridFunction.hpp:82
decltype(auto) makeGridFunction(PreGridFct const &preGridFct, GridView const &gridView)
Generator for Gridfunctions from Expressions (PreGridfunctions)
Definition: GridFunction.hpp:168
Definition: AnalyticGridFunction.hpp:221
Definition: GridFunction.hpp:49
Definition: GridFunction.hpp:41
Definition: GridFunction.hpp:97
Definition: GridFunction.hpp:27