DUNE PDELab (git)

p0fem.hh
1 // -*- tab-width: 4; indent-tabs-mode: nil -*-
2 #ifndef DUNE_PDELAB_FINITEELEMENTMAP_P0FEM_HH
3 #define DUNE_PDELAB_FINITEELEMENTMAP_P0FEM_HH
4 
5 #include <dune/geometry/type.hh>
6 
7 #include<dune/localfunctions/lagrange/p0.hh>
8 #include"finiteelementmap.hh"
9 
10 namespace Dune {
11  namespace PDELab {
12 
15  template<class D, class R, int d>
17  : public SimpleLocalFiniteElementMap<Dune::P0LocalFiniteElement<D,R,d>,d>
18  {
19  public:
20 
23  , _gt(type)
24  {
25  }
26 
27  static constexpr bool fixedSize()
28  {
29  return true;
30  }
31 
32  static constexpr bool hasDOFs(int codim)
33  {
34  return codim == 0;
35  }
36 
37  std::size_t size(GeometryType gt) const
38  {
39  return gt == _gt ? 1 : 0;
40  }
41 
42  static constexpr std::size_t maxLocalSize()
43  {
44  return 1;
45  }
46 
47  private:
48  const GeometryType _gt;
49 
50  };
51 
52  }
53 }
54 
55 #endif // DUNE_PDELAB_FINITEELEMENTMAP_P0FEM_HH
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:114
The local p0 finite element on all types of reference elements.
Definition: p0.hh:25
simple implementation where all entities have the same finite element
Definition: finiteelementmap.hh:101
bool gt(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test if first greater than second
Definition: float_cmp.cc:158
Dune namespace.
Definition: alignedallocator.hh:13
A unique label for each type of element that can occur in a grid.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (May 16, 22:29, 2024)