DUNE PDELab (unstable)
Typedefs | |
template<typename... T> | |
using | Dune::TypeTree::HybridTreePath = Dune::HybridMultiIndex< T... > |
A hybrid version of TreePath that supports both compile time and run time indices. More... | |
Functions | |
template<typename... T> requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...)) | |
constexpr auto | Dune::TypeTree::makeTreePath (const T... t) |
helper function to construct a new HybridTreePath from the given indices. More... | |
template<typename... T> requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...)) | |
constexpr auto | Dune::TypeTree::hybridTreePath (const T &... t) |
Constructs a new HybridTreePath from the given indices. More... | |
template<typename... T> requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...)) | |
constexpr auto | Dune::TypeTree::treePath (const T &... t) |
Constructs a new HybridTreePath from the given indices. More... | |
template<typename... T> | |
constexpr std::size_t | Dune::TypeTree::treePathSize (const HybridTreePath< T... > &) |
Returns the size (number of components) of the given HybridTreePath . | |
template<std::size_t i, typename... T> | |
constexpr auto | Dune::TypeTree::treePathEntry (const HybridTreePath< T... > &tp, index_constant< i >={}) |
Returns a copy of the i-th element of the HybridTreePath . More... | |
template<std::size_t i, typename... T> | |
constexpr std::size_t | Dune::TypeTree::treePathIndex (const HybridTreePath< T... > &tp, index_constant< i >={}) |
Returns the index value of the i-th element of the HybridTreePath . More... | |
Detailed Description
Typedef Documentation
◆ HybridTreePath
using Dune::TypeTree::HybridTreePath = typedef Dune::HybridMultiIndex<T...> |
A hybrid version of TreePath that supports both compile time and run time indices.
A HybridTreePath
supports storing a combination of run time and compile time indices. This makes it possible to store the tree path to a tree node inside the tree node itself, even if the path contains one or more PowerNode
s, where each child must have exactly the same type. At the same time, as much information as possible is kept accessible at compile time, allowing for more efficient algorithms.
- Note
- Internally all indices are stored as std::size_t or std::integral_constant<std::size_t,v>. The latter is the same as Dune::index_constant<v>. If indices of other integral or std::integral_constant types are passed as arguments, they are converted.
Function Documentation
◆ hybridTreePath()
requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...))
|
constexpr |
Constructs a new HybridTreePath
from the given indices.
This function returns a new HybridTreePath
with the given index values. It exists mainly to avoid having to manually specify the exact type of the new object.
- Note
- Internally all indices are stored as std::size_t or std::integral_constant<std::size_t,v>. The latter is the same as Dune::index_constant<v>. If indices of other integral or std::integral_constant types are passed as arguments, they are converted.
Referenced by Dune::TypeTree::applyToTree(), Dune::TypeTree::applyToTreePair(), Dune::TypeTree::forEachLeafNode(), Dune::TypeTree::forEachNode(), and Dune::TypeTree::leafTreePathTuple().
◆ makeTreePath()
requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...))
|
constexpr |
helper function to construct a new HybridTreePath
from the given indices.
This function returns a new HybridTreePath
with the given index values.
- Note
- Internally all indices are stored as std::size_t or std::integral_constant<std::size_t,v>. The latter is the same as Dune::index_constant<v>. If indices of other integral or std::integral_constant types are passed as arguments, they are converted.
◆ treePath()
requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...))
|
constexpr |
Constructs a new HybridTreePath
from the given indices.
This function returns a new HybridTreePath
with the given index values. It exists mainly to avoid having to manually specify the exact type of the new object.
It further ensures that the basic number type is std::size_t and casts any indices accordingly.
Referenced by Dune::Functions::DiscreteGlobalBasisFunctionDerivative< DGBF >::LocalFunction::operator()().
◆ treePathEntry()
|
constexpr |
Returns a copy of the i-th element of the HybridTreePath
.
As HybridTreePath
instances should not be mutated after their creation, this function returns a copy of the value. As values are either std::integral_constant
or std::size_t
, that's just as cheap as returning a reference.
The index for the entry can be passed either as a template parameter or as an index_constant
:
◆ treePathIndex()
|
constexpr |
Returns the index value of the i-th element of the HybridTreePath
.
This function always returns the actual index value, irrespective of whether the entry is a compile time index or a run time index.
- Deprecated:
- The functions is deprecated. Use operator[] instead.
The index for the entry can be passed either as a template parameter or as an index_constant
:
