|
dune-pdelab 2.9
|
Loading...
Searching...
No Matches
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 >
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
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 >
|
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
Member Data Documentation
◆ ContainerIndexOrder
template<class Size , class ContainerIndex_ , MultiIndexOrder OriginOrder>
|
staticconstexpr |
Inform about ContainerIndex multi-index order semantics.
The documentation for this struct was generated from the following file:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8