dune-pdelab
2.7-git
|
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. More... | |
using | SizePrefix = ContainerIndex |
Partial MultiIndex of a ContainerIndex. More... | |
using | SizeType = Size |
Type that refers to the size of containers. More... | |
Public Member Functions | |
template<class Ordering > | |
SizeProviderAdapter (const std::shared_ptr< const Ordering > &ordering) | |
Construct a new Size Provider Adapter object. More... | |
SizeType | size (const SizePrefix &prefix) const |
Gives the size for a given prefix. More... | |
Static Public Attributes | |
static constexpr MultiIndexOrder | ContainerIndexOrder = MultiIndexOrder::Outer2Inner |
Inform about ContainerIndex multi-index order semantics. More... | |
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.
SizeType_ | return type of the size method |
ContainerIndex_ | argument type of the size method |
OriginOrder | enum with MultiIndexOrder semantics of the origin ordering |
using Dune::PDELab::SizeProviderAdapter< Size, ContainerIndex_, OriginOrder >::ContainerIndex = ContainerIndex_ |
Partial MultiIndex of a ContainerIndex.
using Dune::PDELab::SizeProviderAdapter< Size, ContainerIndex_, OriginOrder >::SizePrefix = ContainerIndex |
Partial MultiIndex of a ContainerIndex.
using Dune::PDELab::SizeProviderAdapter< Size, ContainerIndex_, OriginOrder >::SizeType = Size |
Type that refers to the size of containers.
|
inline |
Construct a new Size Provider Adapter object.
Ordering | The type of the ordering to adapt |
ordering | A shared pointer to the ordering |
|
inline |
Gives the size for a given prefix.
prefix | MultiIndex with a partial path to a container |
|
staticconstexpr |
Inform about ContainerIndex multi-index order semantics.