dune-vtk 2.12
Loading...
Searching...
No Matches
concepts.hh
Go to the documentation of this file.
1#pragma once
2
3#include <type_traits>
5
6namespace Dune::Vtk
7{
8 template <class...> struct CheckTypes {};
9
10 template <class DataCollector, class DC = std::decay_t<DataCollector>>
11 using IsDataCollector = decltype((
12 std::declval<DC&>().update(),
13 std::declval<DC>().numPoints(),
14 std::declval<DC>().numCells(),
16 true));
17
18 template <class GridView, class GV = std::decay_t<GridView>>
19 using IsGridView = decltype((
20 std::declval<GV>().grid(),
21 std::declval<GV>().indexSet(),
22 std::declval<GV>().size(0),
23 std::declval<GV>().size(std::declval<Dune::GeometryType>()),
25 true));
26
27 template <class GridFunction, class GF = std::decay_t<GridFunction>>
28 using IsGridFunction = decltype((
29 localFunction(std::declval<GF const&>()),
30 true));
31
32 template <class LocalFunction, class LocalContext,
35 using IsLocalFunction = decltype((
36 std::declval<LF&>().bind(std::declval<LC const&>()),
37 std::declval<LF&>().unbind(),
38 std::declval<LF>()(std::declval<typename LocalContext::Geometry::LocalCoordinate>()),
39 true));
40
41} // end namespace Dune::Vtk
Definition writer.hh:16
decltype((std::declval< GV >().grid(), std::declval< GV >().indexSet(), std::declval< GV >().size(0), std::declval< GV >().size(std::declval< Dune::GeometryType >()), CheckTypes< typename GV::Grid, typename GV::IndexSet >{}, true)) IsGridView
Definition concepts.hh:25
decltype((localFunction(std::declval< GF const & >()), true)) IsGridFunction
Definition concepts.hh:30
decltype((std::declval< DC & >().update(), std::declval< DC >().numPoints(), std::declval< DC >().numCells(), CheckTypes< typename DC::GridView >{}, true)) IsDataCollector
Definition concepts.hh:16
decltype((std::declval< LF & >().bind(std::declval< LC const & >()), std::declval< LF & >().unbind(), std::declval< LF >()(std::declval< typename LocalContext::Geometry::LocalCoordinate >()), true)) IsLocalFunction
Definition concepts.hh:39
A Vtk::LocalFunction is a function-like object that can be bound to a grid element an that provides a...
Definition localfunction.hh:74
Definition concepts.hh:8