dune-localfunctions 3.0-git
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
14
15namespace Dune
16{
17
23 template<class D, class R, int dim>
25 {
26 public:
31
35 {
36 gt.makeCube(dim);
37 }
38
40 {}
41
44 const typename Traits::LocalBasisType& localBasis () const
45 {
46 return basis;
47 }
48
52 {
53 return coefficients;
54 }
55
59 {
60 return interpolation;
61 }
62
64 unsigned int size () const
65 {
66 return basis.size();
67 }
68
71 GeometryType type () const
72 {
73 return gt;
74 }
75
77 {
78 return new Q1LocalFiniteElement(*this);
79 }
80
81 private:
83 Q1LocalCoefficients<dim> coefficients;
85 GeometryType gt;
86 };
87
89
94 template<class Geometry, class RF>
97 Q1LocalFiniteElement<
98 typename Geometry::ctype, RF, Geometry::mydimension
99 >,
100 Geometry
101 >
102 {
103 typedef Q1LocalFiniteElement<
104 typename Geometry::ctype, RF, Geometry::mydimension
105 > LFE;
107
108 static const LFE lfe;
109
110 public:
113 };
114
115 template<class Geometry, class RF>
116 const typename Q1FiniteElementFactory<Geometry, RF>::LFE
117 Q1FiniteElementFactory<Geometry, RF>::lfe;
118}
119
120#endif
Definition brezzidouglasmarini1cube2d.hh:14
traits helper struct
Definition localfiniteelementtraits.hh:11
LB LocalBasisType
Definition localfiniteelementtraits.hh:14
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:18
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:22
Factory for ScalarLocalToGlobalFiniteElementAdaptor objects.
Definition localtoglobaladaptors.hh:244
The local Q1 finite element on cubes.
Definition q1.hh:25
Q1LocalFiniteElement * clone() const
Definition q1.hh:76
const Traits::LocalBasisType & localBasis() const
Definition q1.hh:44
Q1LocalFiniteElement()
Definition q1.hh:34
const Traits::LocalInterpolationType & localInterpolation() const
Definition q1.hh:58
LocalFiniteElementTraits< Q1LocalBasis< D, R, dim >, Q1LocalCoefficients< dim >, Q1LocalInterpolation< dim, Q1LocalBasis< D, R, dim > > > Traits
Definition q1.hh:30
const Traits::LocalCoefficientsType & localCoefficients() const
Definition q1.hh:51
Q1LocalFiniteElement(const Q1LocalFiniteElement &o)
Definition q1.hh:39
unsigned int size() const
Number of shape functions in this finite element.
Definition q1.hh:64
GeometryType type() const
Definition q1.hh:71
Factory for global-valued Q1 elements.
Definition q1.hh:102
Q1FiniteElementFactory()
default constructor
Definition q1.hh:112
Lagrange shape functions of order 1 on the reference cube.
Definition q1localbasis.hh:27
Layout map for Q1 elements.
Definition q1localcoefficients.hh:23
Definition q1localinterpolation.hh:14