dune-localfunctions
2.3.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dune
localfunctions
lagrange
q1.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
4
#ifndef DUNE_Q1_LOCALFINITEELEMENT_HH
5
#define DUNE_Q1_LOCALFINITEELEMENT_HH
6
7
#include <dune/geometry/type.hh>
8
9
#include <
dune/localfunctions/common/localfiniteelementtraits.hh
>
10
#include <
dune/localfunctions/common/localtoglobaladaptors.hh
>
11
#include <
dune/localfunctions/lagrange/q1/q1localbasis.hh
>
12
#include <
dune/localfunctions/lagrange/q1/q1localcoefficients.hh
>
13
#include <
dune/localfunctions/lagrange/q1/q1localinterpolation.hh
>
14
15
namespace
Dune
16
{
17
23
template
<
class
D,
class
R,
int
dim>
24
class
Q1LocalFiniteElement
25
{
26
public
:
29
typedef
LocalFiniteElementTraits<Q1LocalBasis<D,R,dim>
,
Q1LocalCoefficients<dim>
,
30
Q1LocalInterpolation<dim,Q1LocalBasis<D,R,dim>
> >
Traits
;
31
34
Q1LocalFiniteElement
()
35
{
36
gt.makeCube(dim);
37
}
38
39
Q1LocalFiniteElement
(
const
Q1LocalFiniteElement
& o) : gt(o.gt)
40
{}
41
44
const
typename
Traits::LocalBasisType
&
localBasis
()
const
45
{
46
return
basis;
47
}
48
51
const
typename
Traits::LocalCoefficientsType
&
localCoefficients
()
const
52
{
53
return
coefficients;
54
}
55
58
const
typename
Traits::LocalInterpolationType
&
localInterpolation
()
const
59
{
60
return
interpolation;
61
}
62
65
GeometryType
type
()
const
66
{
67
return
gt;
68
}
69
70
Q1LocalFiniteElement
*
clone
()
const
71
{
72
return
new
Q1LocalFiniteElement
(*
this
);
73
}
74
75
private
:
76
Q1LocalBasis<D,R,dim>
basis;
77
Q1LocalCoefficients<dim>
coefficients;
78
Q1LocalInterpolation<dim,Q1LocalBasis<D,R,dim>
> interpolation;
79
GeometryType gt;
80
};
81
83
88
template
<
class
Geometry,
class
RF>
89
class
Q1FiniteElementFactory
:
90
public
ScalarLocalToGlobalFiniteElementAdaptorFactory
<
91
Q1LocalFiniteElement<
92
typename Geometry::ctype, RF, Geometry::mydimension
93
>,
94
Geometry
95
>
96
{
97
typedef
Q1LocalFiniteElement
<
98
typename
Geometry::ctype, RF, Geometry::mydimension
99
>
LFE
;
100
typedef
ScalarLocalToGlobalFiniteElementAdaptorFactory<LFE, Geometry>
Base
;
101
102
static
const
LFE
lfe;
103
104
public
:
106
Q1FiniteElementFactory
() :
Base
(lfe) {}
107
};
108
109
template
<
class
Geometry,
class
RF>
110
const
typename
Q1FiniteElementFactory<Geometry, RF>::LFE
111
Q1FiniteElementFactory<Geometry, RF>::lfe;
112
}
113
114
#endif
Generated on Mon Nov 24 2014 20:50:33 for dune-localfunctions by
1.8.1.2