dune-functions 2.9.0
Classes | Public Member Functions | Public Attributes | List of all members
Dune::Functions::DefaultNodeToRangeMap< Tree > Struct Template Reference

A simple node to range map using lexicographic ordering. More...

#include <dune/functions/functionspacebases/defaultnodetorangemap.hh>

Classes

struct  Visitor
 

Public Member Functions

 DefaultNodeToRangeMap (const Tree &tree)
 Construct DefaultNodeToRangeMap. More...
 
template<class Node , class TreePath , class Range , std::enable_if_t< models< Concept::HasIndexAccess, Range, decltype(std::declval< Node >().treeIndex())>() and not Tree::isLeaf , int >
decltype(auto) operator() (const Node &node, const TreePath &treePath, Range &&y) const
 
template<class Node , class TreePath , class Range , std::enable_if_t< not models< Concept::HasIndexAccess, Range, decltype(std::declval< Node >().treeIndex())>() or Tree::isLeaf , int >
decltype(auto) operator() (const Node &node, const TreePath &treePath, Range &&y) const
 

Public Attributes

std::vector< std::size_t > indices_
 

Detailed Description

template<class Tree>
struct Dune::Functions::DefaultNodeToRangeMap< Tree >

A simple node to range map using lexicographic ordering.

On construction this map is provided with an ansatz subtree of the tree in an actual basis. The operator() then maps a a pair (node,y) of a leaf node in this subtree and an object y of type range to y[i] where i is the lexicographic index of the node in the subtree.

This allows to associate each leaf node in the subtree with a component in the range type which is necessary when interpolating a vector field into a nontrivial subtree.

Notice that the lexicographic index is only computed wrt the leaf nodes.

Constructor & Destructor Documentation

◆ DefaultNodeToRangeMap()

template<class Tree >
Dune::Functions::DefaultNodeToRangeMap< Tree >::DefaultNodeToRangeMap ( const Tree &  tree)
inline

Construct DefaultNodeToRangeMap.

Parameters
treeThe tree needed to initialize the map

This only uses tree.treeIndex() such that the tree can be in unbound state. Furthermore no reference or pointer to the tree is stored and passing a temporary is OK here.

Member Function Documentation

◆ operator()() [1/2]

template<class Tree >
template<class Node , class TreePath , class Range , std::enable_if_t< models< Concept::HasIndexAccess, Range, decltype(std::declval< Node >().treeIndex())>() and not Tree::isLeaf , int >
decltype(auto) Dune::Functions::DefaultNodeToRangeMap< Tree >::operator() ( const Node &  node,
const TreePath &  treePath,
Range &&  y 
) const
inline

◆ operator()() [2/2]

template<class Tree >
template<class Node , class TreePath , class Range , std::enable_if_t< not models< Concept::HasIndexAccess, Range, decltype(std::declval< Node >().treeIndex())>() or Tree::isLeaf , int >
decltype(auto) Dune::Functions::DefaultNodeToRangeMap< Tree >::operator() ( const Node &  node,
const TreePath &  treePath,
Range &&  y 
) const
inline

Member Data Documentation

◆ indices_

template<class Tree >
std::vector<std::size_t> Dune::Functions::DefaultNodeToRangeMap< Tree >::indices_

The documentation for this struct was generated from the following file: