Commit d2dcaa71 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Add range over node indices

parent 7e46647e
#pragma once
#include <dune/common/rangeutilities.hh>
#include <amdis/typetree/MultiIndex.hpp>
#include <amdis/utility/MappedRangeView.hpp>
namespace AMDiS
/// Returns a range over the DOF indices on a node, given by the localView
template <class LocalView, class Node>
auto nodeIndices(LocalView const& localView, Node const& node)
return mappedRangeView(Dune::range(node.size()), [&](std::size_t j) {
return flatMultiIndex(localView.index(node.localIndex(j)));
/// Returns a range over the DOF indices on the basis tree, given by the localView
template <class LocalView>
auto nodeIndices(LocalView const& localView)
return mappedRangeView(Dune::range(localView.size()), [&](std::size_t i) {
return flatMultiIndex(localView.index(i));
} // end namespace AMDiS
......@@ -34,4 +34,16 @@ namespace AMDiS
// dune version independent creation of node from preBasis
template <class PB, class TP>
auto makeNodeIndexSet(PB const& preBasis, TP const& treePath)
return preBasis.indexSet(treePath);
return preBasis.makeIndexSet();
} // end namespace AMDiS
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment