dune-localfunctions  2.9.0
p0.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 // SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
4 // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5 #ifndef DUNE_P0LOCALFINITEELEMENT_HH
6 #define DUNE_P0LOCALFINITEELEMENT_HH
7 
8 #include <dune/geometry/type.hh>
9 
11 #include "p0/p0localbasis.hh"
14 
15 namespace Dune
16 {
17 
23  template<class D, class R, int d>
25  {
26  public:
31 
34  P0LocalFiniteElement (const GeometryType& type)
35  : interpolation(type), gt(type)
36  {}
37 
40  const typename Traits::LocalBasisType& localBasis () const
41  {
42  return basis;
43  }
44 
48  {
49  return coefficients;
50  }
51 
55  {
56  return interpolation;
57  }
58 
60  unsigned int size () const
61  {
62  return 1;
63  }
64 
67  GeometryType type () const
68  {
69  return gt;
70  }
71 
72  private:
73  P0LocalBasis<D,R,d> basis;
74  P0LocalCoefficients coefficients;
76  GeometryType gt;
77  };
78 
79 }
80 
81 #endif
Definition: bdfmcube.hh:18
traits helper struct
Definition: localfiniteelementtraits.hh:13
LB LocalBasisType
Definition: localfiniteelementtraits.hh:16
LC LocalCoefficientsType
Definition: localfiniteelementtraits.hh:20
LI LocalInterpolationType
Definition: localfiniteelementtraits.hh:24
Constant shape function.
Definition: p0localbasis.hh:30
Layout map for P0 elements.
Definition: p0localcoefficients.hh:24
Definition: p0localinterpolation.hh:18
The local p0 finite element on all types of reference elements.
Definition: p0.hh:25
const Traits::LocalInterpolationType & localInterpolation() const
Definition: p0.hh:54
P0LocalFiniteElement(const GeometryType &type)
Definition: p0.hh:34
unsigned int size() const
The number of shape functions – here: 1.
Definition: p0.hh:60
GeometryType type() const
Definition: p0.hh:67
LocalFiniteElementTraits< P0LocalBasis< D, R, d >, P0LocalCoefficients, P0LocalInterpolation< P0LocalBasis< D, R, d > > > Traits
Definition: p0.hh:30
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: p0.hh:47
const Traits::LocalBasisType & localBasis() const
Definition: p0.hh:40