dune-localfunctions
2.2.1
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: 8; indent-tabs-mode: nil -*-
2
// vi: set ts=8 sw=2 et 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,2>
38
{
39
public
:
42
typedef
LocalFiniteElementTraits
<
43
RefinedP0LocalBasis<D,R,2>
,
44
RefinedP0LocalCoefficients<2>
,
45
RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,2>
> >
Traits
;
46
49
RefinedP0LocalFiniteElement
()
50
{
51
gt.makeTriangle();
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,2>
basis_;
89
RefinedP0LocalCoefficients<2>
coefficients_;
90
RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,2>
> interpolation_;
91
GeometryType gt;
92
};
93
96
template
<
class
D,
class
R>
97
class
RefinedP0LocalFiniteElement
<D,R,3>
98
{
99
public
:
102
typedef
LocalFiniteElementTraits
<
103
RefinedP0LocalBasis<D,R,3>
,
104
RefinedP0LocalCoefficients<3>
,
105
RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,3>
> >
Traits
;
106
109
RefinedP0LocalFiniteElement
()
110
{
111
gt.makeTetrahedron();
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,3>
basis_;
149
RefinedP0LocalCoefficients<3>
coefficients_;
150
RefinedP0LocalInterpolation<RefinedP0LocalBasis<D,R,3>
> interpolation_;
151
GeometryType gt;
152
};
153
154
155
}
156
157
#endif
Generated on Mon May 20 2013 01:06:59 for dune-localfunctions by
1.8.3.1