dune-localfunctions  2.4.1-rc2
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 
15 namespace 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:
112  Q1FiniteElementFactory() : Base(lfe) {}
113  };
114 
115  template<class Geometry, class RF>
118 }
119 
120 #endif
traits helper struct
Definition: localfiniteelementtraits.hh:10
unsigned int size() const
Number of shape functions in this finite element.
Definition: q1.hh:64
Q1LocalFiniteElement * clone() const
Definition: q1.hh:76
The local Q1 finite element on cubes.
Definition: q1.hh:24
LocalFiniteElementTraits< Q1LocalBasis< D, R, dim >, Q1LocalCoefficients< dim >, Q1LocalInterpolation< dim, Q1LocalBasis< D, R, dim > > > Traits
Definition: q1.hh:30
const Traits::LocalBasisType & localBasis() const
Definition: q1.hh:44
Factory for ScalarLocalToGlobalFiniteElementAdaptor objects.
Definition: localtoglobaladaptors.hh:244
Layout map for Q1 elements.
Definition: q1localcoefficients.hh:22
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: q1.hh:51
Definition: brezzidouglasmarini1cube2dlocalbasis.hh:14
LI LocalInterpolationType
Definition: localfiniteelementtraits.hh:22
LC LocalCoefficientsType
Definition: localfiniteelementtraits.hh:18
GeometryType type() const
Definition: q1.hh:71
const Traits::LocalInterpolationType & localInterpolation() const
Definition: q1.hh:58
Lagrange shape functions of order 1 on the reference cube.
Definition: q1localbasis.hh:24
LB LocalBasisType
Definition: localfiniteelementtraits.hh:14
Definition: q1localinterpolation.hh:13
Q1LocalFiniteElement(const Q1LocalFiniteElement &o)
Definition: q1.hh:39
Q1FiniteElementFactory()
default constructor
Definition: q1.hh:112
Factory for global-valued Q1 elements.
Definition: q1.hh:95
Q1LocalFiniteElement()
Definition: q1.hh:34