DUNE-FUNCTIONS (2.7)

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
10#include <dune/common/concept.hh>
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 {
35 return resolveStaticMultiIndex(y, treePath);
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
constexpr decltype(auto) resolveStaticMultiIndex(C &&c, const MultiIndex &multiIndex)
Provide multi-index access by chaining operator[].
Definition: indexaccess.hh:399
Definition: polynomial.hh:10
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 (Jul 15, 22:36, 2024)