DUNE PDELab (git)

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
4// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file AUTHORS.md
5// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception OR LGPL-3.0-or-later
6
7#ifndef DUNE_FUNCTIONS_FUNCTIONSPACEBASES_HIERARCHICNODETORANGEMAP_HH
8#define DUNE_FUNCTIONS_FUNCTIONSPACEBASES_HIERARCHICNODETORANGEMAP_HH
9
10
11#include <utility>
12#include <type_traits>
13
15
16#include <dune/functions/functionspacebases/concepts.hh>
17#include <dune/functions/common/indexaccess.hh>
18
19namespace Dune {
20namespace Functions {
21
22
23
34{
35 template<class Node, class TreePath, class Range,
36 std::enable_if_t< models<Concept::HasIndexAccess, Range, Dune::index_constant<0>>(), int> = 0>
37 decltype(auto) operator()(const Node&, const TreePath& treePath, Range&& y) const
38 {
40 }
41
42 template<class Node, class TreePath, class Range,
43 std::enable_if_t<not models<Concept::HasIndexAccess, Range, Dune::index_constant<0>>(), int> = 0>
44 decltype(auto) operator()(const Node&, const TreePath&, Range&& y) const
45 {
46 return std::forward<Range>(y);
47 }
48};
49
50
51
52} // namespace Dune::Functions
53} // namespace Dune
54
55
56#endif // DUNE_FUNCTIONS_FUNCTIONSPACEBASES_HIERARCHICNODETORANGEMAP_HH
Infrastructure for concepts.
constexpr auto treePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition: treepath.hh:326
constexpr decltype(auto) resolveStaticMultiIndex(C &&c, const MultiIndex &multiIndex)
Provide multi-index access by chaining operator[].
Definition: indexaccess.hh:421
Dune namespace.
Definition: alignedallocator.hh:13
A simple node to range map using the nested tree indices.
Definition: hierarchicnodetorangemap.hh:34
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 12, 23:30, 2024)