dune-localfunctions
2.2.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
41
const
typename
Traits::LocalBasisType
&
localBasis
()
const
42
{
43
return
basis;
44
}
45
48
const
typename
Traits::LocalCoefficientsType
&
localCoefficients
()
const
49
{
50
return
coefficients;
51
}
52
55
const
typename
Traits::LocalInterpolationType
&
localInterpolation
()
const
56
{
57
return
interpolation;
58
}
59
62
GeometryType
type
()
const
63
{
64
return
gt;
65
}
66
67
Q1LocalFiniteElement
*
clone
()
const
68
{
69
return
new
Q1LocalFiniteElement
(*
this
);
70
}
71
72
private
:
73
Q1LocalBasis<D,R,dim>
basis;
74
Q1LocalCoefficients<dim>
coefficients;
75
Q1LocalInterpolation<dim,Q1LocalBasis<D,R,dim>
> interpolation;
76
GeometryType gt;
77
};
78
80
85
template
<
class
Geometry,
class
RF>
86
class
Q1FiniteElementFactory
:
87
public
ScalarLocalToGlobalFiniteElementAdaptorFactory
<
88
Q1LocalFiniteElement<
89
typename Geometry::ctype, RF, Geometry::mydimension
90
>,
91
Geometry
92
>
93
{
94
typedef
Q1LocalFiniteElement
<
95
typename
Geometry::ctype, RF, Geometry::mydimension
96
>
LFE
;
97
typedef
ScalarLocalToGlobalFiniteElementAdaptorFactory<LFE, Geometry>
Base
;
98
99
static
const
LFE
lfe;
100
101
public
:
103
Q1FiniteElementFactory
() :
Base
(lfe) {}
104
};
105
106
template
<
class
Geometry,
class
RF>
107
const
typename
Q1FiniteElementFactory<Geometry, RF>::LFE
108
Q1FiniteElementFactory<Geometry, RF>::lfe;
109
}
110
111
#endif
Generated on Mon May 20 2013 01:06:59 for dune-localfunctions by
1.8.3.1