Dune Core Modules (2.6.0)

refinedp0.hh
Go to the documentation of this file.
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_REFINED_P0_LOCALFINITEELEMENT_HH
4#define DUNE_REFINED_P0_LOCALFINITEELEMENT_HH
5
7
8#include <dune/localfunctions/common/localfiniteelementtraits.hh>
9#include <dune/localfunctions/lagrange/p0.hh>
10
11#include "refinedp0/refinedp0localbasis.hh"
12#include "refinedp0/refinedp0localcoefficients.hh"
13#include "refinedp0/refinedp0localinterpolation.hh"
14
18namespace Dune
19{
20
23 template<class D, class R, int dim>
25 {
27
28 public:
29 // We steal the p0 traits since they exist for all dim.
30 // This allows to instantiate the type and access the Traits.
32 };
33
36 template<class D, class R>
38 {
39 public:
45 RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,1> > > Traits;
46
50 {}
51
54 const typename Traits::LocalBasisType& localBasis () const
55 {
56 return basis_;
57 }
58
62 {
63 return coefficients_;
64 }
65
69 {
70 return interpolation_;
71 }
72
74 unsigned int size () const
75 {
76 return basis_.size();
77 }
78
81 static constexpr GeometryType type ()
82 {
84 }
85
86 private:
89 RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,1> > interpolation_;
90 };
91
94 template<class D, class R>
96 {
97 public:
103 RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,2> > > Traits;
104
108 {}
109
112 const typename Traits::LocalBasisType& localBasis () const
113 {
114 return basis_;
115 }
116
120 {
121 return coefficients_;
122 }
123
127 {
128 return interpolation_;
129 }
130
132 unsigned int size () const
133 {
134 return basis_.size();
135 }
136
139 static constexpr GeometryType type ()
140 {
142 }
143
144 private:
146 RefinedP0LocalCoefficients<2> coefficients_;
147 RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,2> > interpolation_;
148 };
149
152 template<class D, class R>
154 {
155 public:
161 RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,3> > > Traits;
162
166 {}
167
170 const typename Traits::LocalBasisType& localBasis () const
171 {
172 return basis_;
173 }
174
178 {
179 return coefficients_;
180 }
181
185 {
186 return interpolation_;
187 }
188
190 unsigned int size () const
191 {
192 return basis_.size();
193 }
194
197 static constexpr GeometryType type ()
198 {
200 }
201
202 private:
204 RefinedP0LocalCoefficients<3> coefficients_;
205 RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,3> > interpolation_;
206 };
207
208
209}
210
211#endif
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:277
const Traits::LocalBasisType & localBasis() const
Definition: refinedp0.hh:54
static constexpr GeometryType type()
Definition: refinedp0.hh:81
RefinedP0LocalFiniteElement()
Definition: refinedp0.hh:49
const Traits::LocalInterpolationType & localInterpolation() const
Definition: refinedp0.hh:68
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: refinedp0.hh:61
LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 1 >, RefinedP0LocalCoefficients< 1 >, RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 1 > > > Traits
Definition: refinedp0.hh:45
unsigned int size() const
Number of shape functions in this finite element.
Definition: refinedp0.hh:74
unsigned int size() const
Number of shape functions in this finite element.
Definition: refinedp0.hh:132
RefinedP0LocalFiniteElement()
Definition: refinedp0.hh:107
static constexpr GeometryType type()
Definition: refinedp0.hh:139
LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 2 >, RefinedP0LocalCoefficients< 2 >, RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 2 > > > Traits
Definition: refinedp0.hh:103
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: refinedp0.hh:119
const Traits::LocalInterpolationType & localInterpolation() const
Definition: refinedp0.hh:126
const Traits::LocalBasisType & localBasis() const
Definition: refinedp0.hh:112
RefinedP0LocalFiniteElement()
Definition: refinedp0.hh:165
const Traits::LocalBasisType & localBasis() const
Definition: refinedp0.hh:170
const Traits::LocalInterpolationType & localInterpolation() const
Definition: refinedp0.hh:184
static constexpr GeometryType type()
Definition: refinedp0.hh:197
unsigned int size() const
Number of shape functions in this finite element.
Definition: refinedp0.hh:190
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: refinedp0.hh:177
LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 3 >, RefinedP0LocalCoefficients< 3 >, RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 3 > > > Traits
Definition: refinedp0.hh:161
Local finite element that is piecewise P0 on a once uniformly refined reference geometry.
Definition: refinedp0.hh:25
constexpr GeometryType line
GeometryType representing a line.
Definition: type.hh:733
constexpr GeometryType triangle
GeometryType representing a triangle.
Definition: type.hh:739
constexpr GeometryType tetrahedron
GeometryType representing a tetrahedron.
Definition: type.hh:751
Dune namespace.
Definition: alignedallocator.hh:10
traits helper struct
Definition: localfiniteelementtraits.hh:11
LB LocalBasisType
Definition: localfiniteelementtraits.hh:14
LC LocalCoefficientsType
Definition: localfiniteelementtraits.hh:18
LI LocalInterpolationType
Definition: localfiniteelementtraits.hh:22
A unique label for each type of element that can occur in a grid.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 24, 23:30, 2024)