Dune Core Modules (2.6.0)

refinedp1.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_REFINED_P1_LOCALFINITEELEMENT_HH
4 #define DUNE_REFINED_P1_LOCALFINITEELEMENT_HH
5 
6 #include <dune/geometry/type.hh>
7 
8 #include <dune/localfunctions/common/localfiniteelementtraits.hh>
9 #include <dune/localfunctions/lagrange/p0.hh>
10 
12 #include <dune/localfunctions/lagrange/pk1d/pk1dlocalcoefficients.hh>
13 #include <dune/localfunctions/lagrange/pk1d/pk1dlocalinterpolation.hh>
14 #include <dune/localfunctions/lagrange/pk1d/pk1dlocalbasis.hh>
15 #include <dune/localfunctions/lagrange/pk2d/pk2dlocalcoefficients.hh>
16 #include <dune/localfunctions/lagrange/pk2d/pk2dlocalinterpolation.hh>
17 #include <dune/localfunctions/lagrange/pk2d/pk2dlocalbasis.hh>
18 #include <dune/localfunctions/lagrange/pk3d/pk3dlocalcoefficients.hh>
19 #include <dune/localfunctions/lagrange/pk3d/pk3dlocalinterpolation.hh>
20 #include <dune/localfunctions/lagrange/pk3d/pk3dlocalbasis.hh>
21 
22 namespace Dune
23 {
24 
27  template<class D, class R, int dim>
29  {
30  public:
35  Pk1DLocalInterpolation<Pk1DLocalBasis<D,R,2> > > Traits;
36 
40  {}
41 
44  const typename Traits::LocalBasisType& localBasis () const
45  {
46  return basis;
47  }
48 
52  {
53  return coefficients;
54  }
55 
59  {
60  return interpolation;
61  }
62 
64  unsigned int size () const
65  {
66  return basis.size();
67  }
68 
71  static constexpr GeometryType type ()
72  {
73  return GeometryTypes::line;
74  }
75 
76  private:
78  Pk1DLocalCoefficients<2> coefficients;
79  Pk1DLocalInterpolation<Pk1DLocalBasis<D,R,2> > interpolation;
80  };
81 
82 
83 
86  template<class D, class R>
88  {
89  public:
94  Pk2DLocalInterpolation<Pk2DLocalBasis<D,R,2> > > Traits;
95 
99  {}
100 
103  const typename Traits::LocalBasisType& localBasis () const
104  {
105  return basis;
106  }
107 
111  {
112  return coefficients;
113  }
114 
118  {
119  return interpolation;
120  }
121 
123  unsigned int size () const
124  {
125  return basis.size();
126  }
127 
130  static constexpr GeometryType type ()
131  {
133  }
134 
135  private:
137  Pk2DLocalCoefficients<2> coefficients;
138  Pk2DLocalInterpolation<Pk2DLocalBasis<D,R,2> > interpolation;
139  };
140 
143  template<class D, class R>
145  {
146  public:
151  Pk3DLocalInterpolation<Pk3DLocalBasis<D,R,2> > > Traits;
152 
156  {}
157 
160  const typename Traits::LocalBasisType& localBasis () const
161  {
162  return basis;
163  }
164 
168  {
169  return coefficients;
170  }
171 
175  {
176  return interpolation;
177  }
178 
180  unsigned int size () const
181  {
182  return basis.size();
183  }
184 
187  static constexpr GeometryType type ()
188  {
190  }
191 
192  private:
194  Pk3DLocalCoefficients<2> coefficients;
195  Pk3DLocalInterpolation<Pk3DLocalBasis<D,R,2> > interpolation;
196  };
197 
198 }
199 
200 #endif
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:277
Uniformly refined linear Lagrange shape functions in 1D.
Definition: refinedp1localbasis.hh:55
unsigned int size() const
number of shape functions
Definition: refinedp1localbasis.hh:62
Uniformly refined linear Lagrange shape functions on the triangle.
Definition: refinedp1localbasis.hh:196
Uniformly refined linear Lagrange shape functions on the 3D-simplex (tetrahedron).
Definition: refinedp1localbasis.hh:425
unsigned int size() const
Number of shape functions in this finite element.
Definition: refinedp1.hh:123
const Traits::LocalBasisType & localBasis() const
Definition: refinedp1.hh:103
const Traits::LocalInterpolationType & localInterpolation() const
Definition: refinedp1.hh:117
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: refinedp1.hh:110
LocalFiniteElementTraits< RefinedP1LocalBasis< D, R, 2 >, Pk2DLocalCoefficients< 2 >, Pk2DLocalInterpolation< Pk2DLocalBasis< D, R, 2 > > > Traits
Definition: refinedp1.hh:94
static constexpr GeometryType type()
Definition: refinedp1.hh:130
RefinedP1LocalFiniteElement()
Definition: refinedp1.hh:98
const Traits::LocalInterpolationType & localInterpolation() const
Definition: refinedp1.hh:174
RefinedP1LocalFiniteElement()
Definition: refinedp1.hh:155
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: refinedp1.hh:167
LocalFiniteElementTraits< RefinedP1LocalBasis< D, R, 3 >, Pk3DLocalCoefficients< 2 >, Pk3DLocalInterpolation< Pk3DLocalBasis< D, R, 2 > > > Traits
Definition: refinedp1.hh:151
unsigned int size() const
Number of shape functions in this finite element.
Definition: refinedp1.hh:180
static constexpr GeometryType type()
Definition: refinedp1.hh:187
const Traits::LocalBasisType & localBasis() const
Definition: refinedp1.hh:160
Definition: refinedp1.hh:29
const Traits::LocalBasisType & localBasis() const
Definition: refinedp1.hh:44
static constexpr GeometryType type()
Definition: refinedp1.hh:71
unsigned int size() const
Number of shape functions in this finite element.
Definition: refinedp1.hh:64
RefinedP1LocalFiniteElement()
Definition: refinedp1.hh:39
LocalFiniteElementTraits< RefinedP1LocalBasis< D, R, 1 >, Pk1DLocalCoefficients< 2 >, Pk1DLocalInterpolation< Pk1DLocalBasis< D, R, 2 > > > Traits
Definition: refinedp1.hh:35
const Traits::LocalInterpolationType & localInterpolation() const
Definition: refinedp1.hh:58
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: refinedp1.hh:51
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
Linear Lagrange shape functions on a uniformly refined reference element.
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.80.0 (May 2, 22:35, 2024)