dune-vtk 2.12
Loading...
Searching...
No Matches
concepts.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file AUTHORS.md
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception OR LGPL-3.0-or-later
3#pragma once
4
5#include <type_traits>
7
8namespace Dune::Vtk
9{
10 template <class...> struct CheckTypes {};
11
12 template <class DataCollector, class DC = std::decay_t<DataCollector>>
13 using IsDataCollector = decltype((
14 std::declval<DC&>().update(),
15 std::declval<DC>().numPoints(),
16 std::declval<DC>().numCells(),
18 true));
19
20 template <class GridView, class GV = std::decay_t<GridView>>
21 using IsGridView = decltype((
22 std::declval<GV>().grid(),
23 std::declval<GV>().indexSet(),
24 std::declval<GV>().size(0),
25 std::declval<GV>().size(std::declval<Dune::GeometryType>()),
27 true));
28
29 template <class GridFunction, class GF = std::decay_t<GridFunction>>
30 using IsGridFunction = decltype((
31 localFunction(std::declval<GF const&>()),
32 true));
33
34 template <class LocalFunction, class LocalContext,
37 using IsLocalFunction = decltype((
38 std::declval<LF&>().bind(std::declval<LC const&>()),
39 std::declval<LF&>().unbind(),
40 std::declval<LF>()(std::declval<typename LocalContext::Geometry::LocalCoordinate>()),
41 true));
42
43} // end namespace Dune::Vtk
Definition datacollector.hh:19
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:27
decltype((localFunction(std::declval< GF const & >()), true)) IsGridFunction
Definition concepts.hh:32
decltype((std::declval< DC & >().update(), std::declval< DC >().numPoints(), std::declval< DC >().numCells(), CheckTypes< typename DC::GridView >{}, true)) IsDataCollector
Definition concepts.hh:18
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:41
Implementation of DataCollector for cells, with continuous data.
Definition celltypedatacollector.hh:20
A Vtk::LocalFunction is a function-like object that can be bound to a grid element an that provides a...
Definition localfunction.hh:76
Definition concepts.hh:10