DUNE PDELab (git)
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. 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. | |
Detailed Description
template<class Size, class ContainerIndex_, MultiIndexOrder OriginOrder>
struct Dune::PDELab::SizeProviderAdapter< Size, ContainerIndex_, 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.
- This class makes type erasure on the ordering type.
- This class has value semantics.
- This class always receives container indices with Outer2Inner order
- Template Parameters
-
SizeType_ return type of the size method ContainerIndex_ argument type of the size method OriginOrder enum with MultiIndexOrder semantics of the origin ordering
Constructor & Destructor Documentation
◆ SizeProviderAdapter()
template<class Size , class ContainerIndex_ , MultiIndexOrder OriginOrder>
template<class Ordering >
|
inline |
Construct a new Size Provider Adapter object.
- Template Parameters
-
Ordering The type of the ordering to adapt
- Parameters
-
ordering A shared pointer to the ordering
Member Function Documentation
◆ size()
template<class Size , class ContainerIndex_ , MultiIndexOrder OriginOrder>
|
inline |
Gives the size for a given prefix.
- Parameters
-
prefix MultiIndex with a partial path to a container
- Returns
- Traits::SizeType The size required for such a path
References Inner2Outer.
The documentation for this struct was generated from the following file:
- dune/pdelab/ordering/utility.hh
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 23, 23:29, 2024)