Skip to content
  • Carsten Gräser's avatar
    Implement helper to construct container matching the tree structure · f9c6d6da
    Carsten Gräser authored
    This implements a helper function makeTreeContainer() which creates
    a nested container matching the structure of a given tree. PowerNodes
    are represented by std::array while CompositeNodes are represented
    by Dune::TupleVector. The data (and its type) stored for the leafs
    is created by a user-provided callback.
    
    For convenience, the nested container is not returned directly but
    wrapped such that you can use operator[](HybridTreePath) to access
    it's entries.
    
    This is helpfull if you want to associate date to the leaf nodes
    but want to avoid having to create a full type tree. E.g. for
    implementing a local grid function spanned by an ansatz tree
    of local finite elements, each leaf evaluates its basis functions
    into an std::vector. This is better created only once to avoid
    constly reallocation. The new utility allows to conveneintly store
    and access one std::vector for each leaf node.
    f9c6d6da