dune-localfunctions
2.3beta2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dune
localfunctions
refined
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
6
#include <dune/geometry/type.hh>
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
18
namespace
Dune
19
{
20
23
template
<
class
D,
class
R,
int
dim>
24
class
RefinedP0LocalFiniteElement
25
{
26
RefinedP0LocalFiniteElement
() {}
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.
31
typedef
typename
P0LocalFiniteElement<D,R,dim>::Traits
Traits
;
32
};
33
36
template
<
class
D,
class
R>
37
class
RefinedP0LocalFiniteElement
<D,R,1>
38
{
39
public
:
42
typedef
LocalFiniteElementTraits
<
43
RefinedP0LocalBasis<D,R,1>
,
44
RefinedP0LocalCoefficients<1>
,
45
RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,1>
> >
Traits
;
46
49
RefinedP0LocalFiniteElement
()
50
{
51
gt.makeLine();
52
}
53
56
const
typename
Traits::LocalBasisType
& localBasis ()
const
57
{
58
return
basis_;
59
}
60
63
const
typename
Traits::LocalCoefficientsType
& localCoefficients ()
const
64
{
65
return
coefficients_;
66
}
67
70
const
typename
Traits::LocalInterpolationType
& localInterpolation ()
const
71
{
72
return
interpolation_;
73
}
74
77
GeometryType type ()
const
78
{
79
return
gt;
80
}
81
82
RefinedP0LocalFiniteElement
* clone ()
const
83
{
84
return
new
RefinedP0LocalFiniteElement
(*
this
);
85
}
86
87
private
:
88
RefinedP0LocalBasis<D,R,1>
basis_;
89
RefinedP0LocalCoefficients<1>
coefficients_;
90
RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,1>
> interpolation_;
91
GeometryType gt;
92
};
93
96
template
<
class
D,
class
R>
97
class
RefinedP0LocalFiniteElement
<D,R,2>
98
{
99
public
:
102
typedef
LocalFiniteElementTraits
<
103
RefinedP0LocalBasis<D,R,2>
,
104
RefinedP0LocalCoefficients<2>
,
105
RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,2>
> >
Traits
;
106
109
RefinedP0LocalFiniteElement
()
110
{
111
gt.makeTriangle();
112
}
113
116
const
typename
Traits::LocalBasisType
& localBasis ()
const
117
{
118
return
basis_;
119
}
120
123
const
typename
Traits::LocalCoefficientsType
& localCoefficients ()
const
124
{
125
return
coefficients_;
126
}
127
130
const
typename
Traits::LocalInterpolationType
& localInterpolation ()
const
131
{
132
return
interpolation_;
133
}
134
137
GeometryType type ()
const
138
{
139
return
gt;
140
}
141
142
RefinedP0LocalFiniteElement
* clone ()
const
143
{
144
return
new
RefinedP0LocalFiniteElement
(*
this
);
145
}
146
147
private
:
148
RefinedP0LocalBasis<D,R,2>
basis_;
149
RefinedP0LocalCoefficients<2>
coefficients_;
150
RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,2>
> interpolation_;
151
GeometryType gt;
152
};
153
156
template
<
class
D,
class
R>
157
class
RefinedP0LocalFiniteElement
<D,R,3>
158
{
159
public
:
162
typedef
LocalFiniteElementTraits
<
163
RefinedP0LocalBasis<D,R,3>
,
164
RefinedP0LocalCoefficients<3>
,
165
RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,3>
> >
Traits
;
166
169
RefinedP0LocalFiniteElement
()
170
{
171
gt.makeTetrahedron();
172
}
173
176
const
typename
Traits::LocalBasisType
& localBasis ()
const
177
{
178
return
basis_;
179
}
180
183
const
typename
Traits::LocalCoefficientsType
& localCoefficients ()
const
184
{
185
return
coefficients_;
186
}
187
190
const
typename
Traits::LocalInterpolationType
& localInterpolation ()
const
191
{
192
return
interpolation_;
193
}
194
197
GeometryType type ()
const
198
{
199
return
gt;
200
}
201
202
RefinedP0LocalFiniteElement
* clone ()
const
203
{
204
return
new
RefinedP0LocalFiniteElement
(*
this
);
205
}
206
207
private
:
208
RefinedP0LocalBasis<D,R,3>
basis_;
209
RefinedP0LocalCoefficients<3>
coefficients_;
210
RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,3>
> interpolation_;
211
GeometryType gt;
212
};
213
214
215
}
216
217
#endif
Generated on Mon Feb 10 2014 21:19:25 for dune-localfunctions by
1.8.1.2