dune-pdelab 2.7-git
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
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>

Inheritance diagram for Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >:
Inheritance graph

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.
 
void update ()
 Updates this SubOrdering.
 
template<typename ItIn , typename ItOut >
void map_lfs_indices (ItIn begin, const ItIn end, ItOut out) const
 
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.
 

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!

Member Typedef Documentation

◆ BaseOrdering

template<typename BaseOrdering_ , typename TreePath >
typedef BaseOrdering_ Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::BaseOrdering

The type of the BaseOrdering for which to represent a SubOrdering view.

◆ CacheTag

template<typename BaseOrdering_ , typename TreePath >
typedef BaseOrdering::CacheTag Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::CacheTag

Forwarded tag from BaseOrdering, required by PDELab internals.

◆ ContainerAllocationTag

template<typename BaseOrdering_ , typename TreePath >
typedef BaseOrdering::ContainerAllocationTag Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::ContainerAllocationTag

Forwarded tag from BaseOrdering, required by PDELab internals.

◆ TargetOrdering

template<typename BaseOrdering_ , typename TreePath >
using Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::TargetOrdering = TypeTree::ChildForTreePath<BaseOrdering,TreePath>

The target ordering that makes up the root of this SubOrdering view.

◆ Traits

template<typename BaseOrdering_ , typename TreePath >
typedef BaseOrdering::Traits Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::Traits

Forwarded Ordering traits from BaseOrdering.

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.

Member Function Documentation

◆ baseOrdering()

template<typename BaseOrdering_ , typename TreePath >
const BaseOrdering & Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::baseOrdering ( ) const
inline

Returns the BaseOrdering.

◆ blockCount()

template<typename BaseOrdering_ , typename TreePath >
Traits::SizeType Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::blockCount ( ) const
inline

Returns the block count of the BaseOrdering.

◆ contains()

template<typename BaseOrdering_ , typename TreePath >
bool Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::contains ( typename Traits::SizeType  codim) const
inline

Returns whether the TargetOrdering has DOFs attached to entities of codimension codim.

◆ fixedSize()

template<typename BaseOrdering_ , typename TreePath >
bool Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::fixedSize ( typename Traits::SizeType  codim) const
inline

Returns whether the TargetOrdering is of fixed size for entities of codimension codim.

◆ map_lfs_indices()

template<typename BaseOrdering_ , typename TreePath >
template<typename ItIn , typename ItOut >
void Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::map_lfs_indices ( ItIn  begin,
const ItIn  end,
ItOut  out 
) const
inline

◆ mapIndex() [1/2]

template<typename BaseOrdering_ , typename TreePath >
Traits::ContainerIndex Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::mapIndex ( const typename Traits::DOFIndex &  di) const
inline

Maps di from the DOFIndex subtree to the ContainerIndex in the BaseOrdering.

◆ mapIndex() [2/2]

template<typename BaseOrdering_ , typename TreePath >
void Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::mapIndex ( typename Traits::DOFIndexView  di,
typename Traits::ContainerIndex &  ci 
) const
inline

Maps di from the DOFIndex subtree to the ContainerIndex in the BaseOrdering - inplace version.

◆ maxLocalSize()

template<typename BaseOrdering_ , typename TreePath >
Traits::SizeType Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::maxLocalSize ( ) const
inline

Returns the maximum per-entity size of the TargetOrdering.

◆ size()

template<typename BaseOrdering_ , typename TreePath >
Traits::SizeType Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::size ( ) const
inline

Returns the size of the BaseOrdering.

◆ targetOrdering()

template<typename BaseOrdering_ , typename TreePath >
const TargetOrdering & Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::targetOrdering ( ) const
inline

Returns the TargetOrdering.

◆ update()

template<typename BaseOrdering_ , typename TreePath >
void Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::update ( )
inline

Updates this SubOrdering.

Member Data Documentation

◆ consume_tree_index

template<typename BaseOrdering_ , typename TreePath >
const bool Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::consume_tree_index = TargetOrdering::consume_tree_index
static

Forwarded ordering property from TargetOrdering, required by PDELab internals.

◆ has_dynamic_ordering_children

template<typename BaseOrdering_ , typename TreePath >
const bool Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::has_dynamic_ordering_children = TargetOrdering::has_dynamic_ordering_children
static

Forwarded ordering property from TargetOrdering, required by PDELab internals.


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