DUNE PDELab (git)

sizeinfo.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_FUNCTIONS_FUNCTIONSPACEBASES_SIZEINFO_HH
4#define DUNE_FUNCTIONS_FUNCTIONSPACEBASES_SIZEINFO_HH
5
6#warning The header dune/functions/functionspacebases/sizeinfo.hh is deprecated and will be removed after release 2.10.
7
8#include <array>
9
10namespace Dune {
11namespace Functions {
12
13
14
27template<class B>
28class
29[[deprecated("SizeInfo is deprecated and will be removed after release 2.10.")]]
31{
32public:
33 using Basis = B;
34 using size_type = typename Basis::size_type;
35 using SizePrefix = typename Basis::SizePrefix;
36
40 SizeInfo(const Basis& basis) :
41 basis_(&basis)
42 {}
43
47 size_type operator()(const SizePrefix& prefix) const
48 {
49 return basis_->size(prefix);
50 }
51
58 size_type size(const SizePrefix& prefix) const
59 {
60 return basis_->size(prefix);
61 }
62
63 operator size_type () const
64 {
65 return basis_->dimension();
66 }
67
68protected:
69
70 const Basis* basis_;
71};
72
73
77template<class Basis>
78SizeInfo<Basis> sizeInfo(const Basis& basis)
79{
80 return SizeInfo<Basis>(basis);
81}
82
83
84
85} // end namespace Functions
86} // end namespace Dune
87
88#endif // DUNE_FUNCTIONS_FUNCTIONSPACEBASES_SIZEINFO_HH
A class encapsulating size information.
Definition: sizeinfo.hh:31
size_type size(const SizePrefix &prefix) const
Return number possible values for next position in multi index.
Definition: sizeinfo.hh:58
size_type operator()(const SizePrefix &prefix) const
Return number possible values for next position in multi index.
Definition: sizeinfo.hh:47
SizeInfo(const Basis &basis)
Construct from basis.
Definition: sizeinfo.hh:40
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)