dune-pdelab 2.7-git
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
Dune::PDELab::SizeProviderAdapter< Size, ContainerIndex_, OriginOrder > Struct Template Reference

Adapter to create a size provider from an ordering. More...

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

Public Types

using ContainerIndex = ContainerIndex_
 Partial MultiIndex of a ContainerIndex.
 
using SizePrefix = ContainerIndex
 Partial MultiIndex of a ContainerIndex.
 
using SizeType = Size
 Type that refers to the size of containers.
 

Public Member Functions

template<class Ordering >
 SizeProviderAdapter (const std::shared_ptr< const Ordering > &ordering)
 Construct a new Size Provider Adapter object.
 
SizeType size (const SizePrefix &prefix) const
 Gives the size for a given prefix.
 

Static Public Attributes

static constexpr MultiIndexOrder ContainerIndexOrder = MultiIndexOrder::Outer2Inner
 Inform about ContainerIndex multi-index order semantics.
 

Detailed Description

template<class Size, class ContainerIndex_, MultiIndexOrder OriginOrder>
struct Dune::PDELab::SizeProviderAdapter< Size, ContainerIndex_, OriginOrder >

Adapter to create a size provider from an ordering.

This adapter is meant to be used in allocation and resizing of vectors containers. In particular, this adapter is needed because the ordering library give sizes for multi-indices ordered with Inner2Outer semantis, while resizing algorithms are faster and easier when using Outer2Inner semantics.

Template Parameters
SizeType_return type of the size method
ContainerIndex_argument type of the size method
OriginOrderenum with MultiIndexOrder semantics of the origin ordering

Member Typedef Documentation

◆ ContainerIndex

template<class Size , class ContainerIndex_ , MultiIndexOrder OriginOrder>
using Dune::PDELab::SizeProviderAdapter< Size, ContainerIndex_, OriginOrder >::ContainerIndex = ContainerIndex_

Partial MultiIndex of a ContainerIndex.

◆ SizePrefix

template<class Size , class ContainerIndex_ , MultiIndexOrder OriginOrder>
using Dune::PDELab::SizeProviderAdapter< Size, ContainerIndex_, OriginOrder >::SizePrefix = ContainerIndex

Partial MultiIndex of a ContainerIndex.

◆ SizeType

template<class Size , class ContainerIndex_ , MultiIndexOrder OriginOrder>
using Dune::PDELab::SizeProviderAdapter< Size, ContainerIndex_, OriginOrder >::SizeType = Size

Type that refers to the size of containers.

Constructor & Destructor Documentation

◆ SizeProviderAdapter()

template<class Size , class ContainerIndex_ , MultiIndexOrder OriginOrder>
template<class Ordering >
Dune::PDELab::SizeProviderAdapter< Size, ContainerIndex_, OriginOrder >::SizeProviderAdapter ( const std::shared_ptr< const Ordering > &  ordering)
inline

Construct a new Size Provider Adapter object.

Template Parameters
OrderingThe type of the ordering to adapt
Parameters
orderingA shared pointer to the ordering

Member Function Documentation

◆ size()

template<class Size , class ContainerIndex_ , MultiIndexOrder OriginOrder>
SizeType Dune::PDELab::SizeProviderAdapter< Size, ContainerIndex_, OriginOrder >::size ( const SizePrefix prefix) const
inline

Gives the size for a given prefix.

Parameters
prefixMultiIndex with a partial path to a container
Returns
Traits::SizeType The size required for such a path

Member Data Documentation

◆ ContainerIndexOrder

template<class Size , class ContainerIndex_ , MultiIndexOrder OriginOrder>
constexpr MultiIndexOrder Dune::PDELab::SizeProviderAdapter< Size, ContainerIndex_, OriginOrder >::ContainerIndexOrder = MultiIndexOrder::Outer2Inner
staticconstexpr

Inform about ContainerIndex multi-index order semantics.


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