Dune Core Modules (2.9.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// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5#ifndef DUNE_REFINED_P0_LOCALFINITEELEMENT_HH
6#define DUNE_REFINED_P0_LOCALFINITEELEMENT_HH
7
9
10#include <dune/localfunctions/common/localfiniteelementtraits.hh>
11#include <dune/localfunctions/lagrange/p0.hh>
12
13#include "refinedp0/refinedp0localbasis.hh"
14#include "refinedp0/refinedp0localcoefficients.hh"
15#include "refinedp0/refinedp0localinterpolation.hh"
16
20namespace Dune
21{
22
25 template<class D, class R, int dim>
27 {
29
30 public:
31 // We steal the p0 traits since they exist for all dim.
32 // This allows to instantiate the type and access the Traits.
34 };
35
38 template<class D, class R>
40 {
41 public:
47 RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,1> > > Traits;
48
52 {}
53
56 const typename Traits::LocalBasisType& localBasis () const
57 {
58 return basis_;
59 }
60
64 {
65 return coefficients_;
66 }
67
71 {
72 return interpolation_;
73 }
74
76 unsigned int size () const
77 {
78 return basis_.size();
79 }
80
83 static constexpr GeometryType type ()
84 {
86 }
87
88 private:
91 RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,1> > interpolation_;
92 };
93
96 template<class D, class R>
98 {
99 public:
105 RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,2> > > Traits;
106
110 {}
111
114 const typename Traits::LocalBasisType& localBasis () const
115 {
116 return basis_;
117 }
118
122 {
123 return coefficients_;
124 }
125
129 {
130 return interpolation_;
131 }
132
134 unsigned int size () const
135 {
136 return basis_.size();
137 }
138
141 static constexpr GeometryType type ()
142 {
144 }
145
146 private:
148 RefinedP0LocalCoefficients<2> coefficients_;
149 RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,2> > interpolation_;
150 };
151
154 template<class D, class R>
156 {
157 public:
163 RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,3> > > Traits;
164
168 {}
169
172 const typename Traits::LocalBasisType& localBasis () const
173 {
174 return basis_;
175 }
176
180 {
181 return coefficients_;
182 }
183
187 {
188 return interpolation_;
189 }
190
192 unsigned int size () const
193 {
194 return basis_.size();
195 }
196
199 static constexpr GeometryType type ()
200 {
202 }
203
204 private:
206 RefinedP0LocalCoefficients<3> coefficients_;
207 RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,3> > interpolation_;
208 };
209
210
211}
212
213#endif
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:125
const Traits::LocalBasisType & localBasis() const
Definition: refinedp0.hh:56
static constexpr GeometryType type()
Definition: refinedp0.hh:83
RefinedP0LocalFiniteElement()
Definition: refinedp0.hh:51
const Traits::LocalInterpolationType & localInterpolation() const
Definition: refinedp0.hh:70
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: refinedp0.hh:63
LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 1 >, RefinedP0LocalCoefficients< 1 >, RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 1 > > > Traits
Definition: refinedp0.hh:47
unsigned int size() const
Number of shape functions in this finite element.
Definition: refinedp0.hh:76
unsigned int size() const
Number of shape functions in this finite element.
Definition: refinedp0.hh:134
RefinedP0LocalFiniteElement()
Definition: refinedp0.hh:109
static constexpr GeometryType type()
Definition: refinedp0.hh:141
LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 2 >, RefinedP0LocalCoefficients< 2 >, RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 2 > > > Traits
Definition: refinedp0.hh:105
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: refinedp0.hh:121
const Traits::LocalInterpolationType & localInterpolation() const
Definition: refinedp0.hh:128
const Traits::LocalBasisType & localBasis() const
Definition: refinedp0.hh:114
RefinedP0LocalFiniteElement()
Definition: refinedp0.hh:167
const Traits::LocalBasisType & localBasis() const
Definition: refinedp0.hh:172
const Traits::LocalInterpolationType & localInterpolation() const
Definition: refinedp0.hh:186
static constexpr GeometryType type()
Definition: refinedp0.hh:199
unsigned int size() const
Number of shape functions in this finite element.
Definition: refinedp0.hh:192
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: refinedp0.hh:179
LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 3 >, RefinedP0LocalCoefficients< 3 >, RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 3 > > > Traits
Definition: refinedp0.hh:163
Local finite element that is piecewise P0 on a once uniformly refined reference geometry.
Definition: refinedp0.hh:27
constexpr GeometryType line
GeometryType representing a line.
Definition: type.hh:512
constexpr GeometryType triangle
GeometryType representing a triangle.
Definition: type.hh:518
constexpr GeometryType tetrahedron
GeometryType representing a tetrahedron.
Definition: type.hh:530
Dune namespace.
Definition: alignedallocator.hh:13
traits helper struct
Definition: localfiniteelementtraits.hh:13
LB LocalBasisType
Definition: localfiniteelementtraits.hh:16
LC LocalCoefficientsType
Definition: localfiniteelementtraits.hh:20
LI LocalInterpolationType
Definition: localfiniteelementtraits.hh:24
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 (Dec 21, 23:30, 2024)