Dune Core Modules (2.8.0)

hierarchicnodetorangemap.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_FUNCTIONS_FUNCTIONSPACEBASES_HIERARCHICNODETORANGEMAP_HH
4#define DUNE_FUNCTIONS_FUNCTIONSPACEBASES_HIERARCHICNODETORANGEMAP_HH
5
6
7#include <utility>
8#include <type_traits>
9
11
12#include <dune/functions/functionspacebases/concepts.hh>
13#include <dune/functions/common/indexaccess.hh>
14
15namespace Dune {
16namespace Functions {
17
18
19
30{
31 template<class Node, class TreePath, class Range,
32 std::enable_if_t< models<Concept::HasIndexAccess, Range, Dune::index_constant<0>>(), int> = 0>
33 decltype(auto) operator()(const Node& node, const TreePath& treePath, Range&& y) const
34 {
36 }
37
38 template<class Node, class TreePath, class Range,
39 std::enable_if_t<not models<Concept::HasIndexAccess, Range, Dune::index_constant<0>>(), int> = 0>
40 decltype(auto) operator()(const Node& node, const TreePath& treePath, Range&& y) const
41 {
42 return std::forward<Range>(y);
43 }
44};
45
46
47
48} // namespace Dune::Functions
49} // namespace Dune
50
51
52#endif // DUNE_FUNCTIONS_FUNCTIONSPACEBASES_HIERARCHICNODETORANGEMAP_HH
Infrastructure for concepts.
constexpr HybridTreePath< T... > treePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition: treepath.hh:188
constexpr decltype(auto) resolveStaticMultiIndex(C &&c, const MultiIndex &multiIndex)
Provide multi-index access by chaining operator[].
Definition: indexaccess.hh:398
Dune namespace.
Definition: alignedallocator.hh:11
A simple node to range map using the nested tree indices.
Definition: hierarchicnodetorangemap.hh:30
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 13, 23:29, 2024)