dune-localfunctions
2.3beta2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dune
localfunctions
lagrange
q2.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_Q2_LOCALFINITEELEMENT_HH
4
#define DUNE_Q2_LOCALFINITEELEMENT_HH
5
6
#warning The class Q2LocalFiniteElement from q2.hh is deprecated, and will be removed\
7
after the release of Dune 2.3. Please use QkLocalFiniteElement from qk.hh instead.
8
9
#include <dune/geometry/type.hh>
10
11
#include <
dune/localfunctions/common/localfiniteelementtraits.hh
>
12
#include <
dune/localfunctions/common/localtoglobaladaptors.hh
>
13
#include "
q2/q2localbasis.hh
"
14
#include "
q2/q2localcoefficients.hh
"
15
#include "
q2/q2localinterpolation.hh
"
16
17
namespace
Dune
18
{
19
25
template
<
class
D,
class
R,
int
dim>
26
class
Q2LocalFiniteElement
27
{
28
public
:
31
typedef
LocalFiniteElementTraits<Q2LocalBasis<D,R,dim>
,
Q2LocalCoefficients<dim>
,
32
Q2LocalInterpolation<Q2LocalBasis<D,R,dim>
> >
Traits
;
33
36
Q2LocalFiniteElement
()
37
{
38
gt.makeCube(dim);
39
}
40
43
const
typename
Traits::LocalBasisType
&
localBasis
()
const
44
{
45
return
basis;
46
}
47
50
const
typename
Traits::LocalCoefficientsType
&
localCoefficients
()
const
51
{
52
return
coefficients;
53
}
54
57
const
typename
Traits::LocalInterpolationType
&
localInterpolation
()
const
58
{
59
return
interpolation;
60
}
61
64
GeometryType
type
()
const
65
{
66
return
gt;
67
}
68
69
private
:
70
Q2LocalBasis<D,R,dim>
basis;
71
Q2LocalCoefficients<dim>
coefficients;
72
Q2LocalInterpolation<Q2LocalBasis<D,R,dim>
> interpolation;
73
GeometryType gt;
74
};
75
77
82
template
<
class
Geometry,
class
RF>
83
class
Q2FiniteElementFactory
:
84
public
ScalarLocalToGlobalFiniteElementAdaptorFactory
<
85
Q2LocalFiniteElement<typename Geometry::ctype, RF, Geometry::mydimension>, Geometry
86
>
87
{
88
typedef
Q2LocalFiniteElement<typename Geometry::ctype, RF, Geometry::mydimension>
LFE
;
89
typedef
ScalarLocalToGlobalFiniteElementAdaptorFactory<LFE, Geometry>
Base
;
90
91
static
const
LFE
lfe;
92
93
public
:
95
Q2FiniteElementFactory
() :
Base
(lfe) {}
96
};
97
98
template
<
class
Geometry,
class
RF>
99
const
typename
Q2FiniteElementFactory<Geometry, RF>::LFE
100
Q2FiniteElementFactory<Geometry, RF>::lfe;
101
}
102
103
#endif
Generated on Mon Feb 10 2014 21:19:25 for dune-localfunctions by
1.8.1.2