DUNE PDELab (git)

Dune::PDELab::SubOrdering< BaseOrdering_, TreePath > Class Template Reference

A view on a subtree of a multi-component ordering. More...

#include <dune/pdelab/ordering/subordering.hh>

Public Types

typedef BaseOrdering_ BaseOrdering
 The type of the BaseOrdering for which to represent a SubOrdering view.
 
using TargetOrdering = TypeTree::ChildForTreePath< BaseOrdering, TreePath >
 The target ordering that makes up the root of this SubOrdering view.
 
typedef BaseOrdering::Traits Traits
 Forwarded Ordering traits from BaseOrdering.
 
typedef BaseOrdering::ContainerAllocationTag ContainerAllocationTag
 Forwarded tag from BaseOrdering, required by PDELab internals.
 
typedef BaseOrdering::CacheTag CacheTag
 Forwarded tag from BaseOrdering, required by PDELab internals.
 

Public Member Functions

 SubOrdering (std::shared_ptr< const BaseOrdering > base_ordering)
 Constructs a SubOrdering for base_ordering. More...
 
void update ()
 Updates this SubOrdering.
 
Traits::ContainerIndex mapIndex (const typename Traits::DOFIndex &di) const
 Maps di from the DOFIndex subtree to the ContainerIndex in the BaseOrdering.
 
void mapIndex (typename Traits::DOFIndexView di, typename Traits::ContainerIndex &ci) const
 Maps di from the DOFIndex subtree to the ContainerIndex in the BaseOrdering - inplace version.
 
Traits::SizeType size () const
 Returns the size of the BaseOrdering.
 
Traits::SizeType blockCount () const
 Returns the block count of the BaseOrdering.
 
Traits::SizeType maxLocalSize () const
 Returns the maximum per-entity size of the TargetOrdering.
 
bool contains (typename Traits::SizeType codim) const
 Returns whether the TargetOrdering has DOFs attached to entities of codimension codim.
 
bool fixedSize (typename Traits::SizeType codim) const
 Returns whether the TargetOrdering is of fixed size for entities of codimension codim.
 
const BaseOrderingbaseOrdering () const
 Returns the BaseOrdering.
 
const TargetOrderingtargetOrdering () const
 Returns the TargetOrdering.
 

Static Public Attributes

static const bool has_dynamic_ordering_children = TargetOrdering::has_dynamic_ordering_children
 Forwarded ordering property from TargetOrdering, required by PDELab internals.
 
static const bool consume_tree_index = TargetOrdering::consume_tree_index
 Forwarded ordering property from TargetOrdering, required by PDELab internals.
 
static const bool isLeaf
 Mark this class as non leaf in the dune-typetree.
 
static const bool isPower
 Mark this class as a non power in the dune-typetree.
 
static const bool isComposite
 Mark this class as a composite in the dune-typetree.
 

Protected Member Functions

Access to the proxied node
std::enable_if< enabled, const TypeTree::ChildForTreePath< BaseOrdering_, TreePath > & >::type proxiedNode ()
 Returns the proxied node.
 
const const TypeTree::ChildForTreePath< BaseOrdering_, TreePath > & proxiedNode () const
 Returns the proxied node (const version).
 
std::enable_if< enabled, std::shared_ptr< const TypeTree::ChildForTreePath< BaseOrdering_, TreePath > > >::type proxiedNodeStorage ()
 Returns the storage of the proxied node.
 
std::shared_ptr< const const TypeTree::ChildForTreePath< BaseOrdering_, TreePath > > proxiedNodeStorage () const
 Returns the storage of the proxied node (const version).
 

Detailed Description

template<typename BaseOrdering_, typename TreePath>
class Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >

A view on a subtree of a multi-component ordering.

SubOrdering presents a read-only view on the components of BaseOrdering contained in the subtree pointed at by TreePath. The TreePath has to be an instantiation of Dune::TypeTree::TreePath and is interpreted from left to right, i.e. a TypeTree<3,1> means take the fourth child of BaseOrdering and continue to the second child of that ordering.

Note
SubOrdering is not (yet) as feature-complete as a regular ordering. The most important missing feature is support for per-entity indices.
Warning
SubOrdering does not support nesting! Trying to construct a Subordering with a SubOrdering as BaseOrdering will not work and might either just fail to compile or fail in subtle ways at runtime, so don't try it. SubOrdering is not really an ordering, but more of a view into a subset of a real Ordering. Overall, this restriction should not be problematic, as users will usually construct GridFunctionSubSpaces, which take care of avoiding this recursion.
Template Parameters
BaseOrdering_The type of the underlying base ordering.
TreePathThe path to the subtree for which to provide a view.
Warning
This path will usually differ from the path into the GridFunctionSpace!

Constructor & Destructor Documentation

◆ SubOrdering()

template<typename BaseOrdering_ , typename TreePath >
Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::SubOrdering ( std::shared_ptr< const BaseOrdering base_ordering)
inlineexplicit

Constructs a SubOrdering for base_ordering.

Constructor for a subordering view of base_ordering rooted in the subtree pointed to by TreePath. The second parameter DOFIndexTreePath represents the subtree in the DOFIndex space, i.e. the path to append to passed-in DOFIndices to obtain valid DOFIndices that can be mapped using base_ordering (usually, this will be the TreePath of a GridFunctionSubSpace). This information has to be passed in separately, as the two paths will generally not be identical due to synthesized nodes in the ordering tree.

Parameters
base_orderingStorage pointer to the BaseOrdering.
Template Parameters
DOFIndexTreePathInstantiation of TypeTree::TreePath, representing the path from the root of the DOFIndex tree to the DOFIndices passed to this ordering.

References Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::update().


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (May 16, 22:29, 2024)