dune-pdelab  2.5-dev
edges0.5fem.hh
Go to the documentation of this file.
1 // -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=8 sw=2 sts=2:
3 
4 #ifndef DUNE_PDELAB_FINITEELEMENTMAP_EDGES0_5FEM_HH
5 #define DUNE_PDELAB_FINITEELEMENTMAP_EDGES0_5FEM_HH
6 
7 #include <dune/localfunctions/whitney/edges0.5.hh>
8 
10 
11 namespace Dune {
12  namespace PDELab {
13 
15 
23  template<class Geometry, class VertexOrderFactory, class RF>
26  EdgeS0_5FiniteElementFactory<Geometry, RF>, VertexOrderFactory
27  >
28  {
29  typedef EdgeS0_5FiniteElementFactory<Geometry, RF> FEFactory;
31  FEFactory, VertexOrderFactory
32  > Base;
33 
34  static FEFactory &feFactory() {
35  static FEFactory feFactory_;
36  return feFactory_;
37  }
38 
39  public:
40 
42  static constexpr int dimension = Geometry::mydimension;
43 
44  EdgeS0_5FiniteElementMap(const VertexOrderFactory &voFactory) :
45  Base(feFactory(), voFactory)
46  { }
47 
48  static constexpr bool fixedSize()
49  {
50  return true;
51  }
52 
53  static constexpr bool hasDOFs(int codim)
54  {
55  return Geometry::mydimension - codim == 1;
56  }
57 
58  static constexpr std::size_t size(GeometryType gt)
59  {
60  return gt == GeometryTypes::line ? 1 : 0;
61  }
62 
63  static constexpr std::size_t maxLocalSize()
64  {
65  // This is a bit of a hack. It only provides an upper bound which is not
66  // sharp for non-cubes. However, a better compile time guess is hard to
67  // obtain from latest dune-localfunctions...
68  return 2 * dimension;
69  }
70 
71  };
72  }
73 }
74 
75 #endif // DUNE_PDELAB_FINITEELEMENTMAP_EDGES0_5FEM_HH
static constexpr std::size_t maxLocalSize()
Definition: edges0.5fem.hh:63
static constexpr std::size_t size(GeometryType gt)
Definition: edges0.5fem.hh:58
Global-valued finite element map for EdgeS0_5 elements.
Definition: edges0.5fem.hh:24
Generic finite element map for global finite elements created with a geometry and a vertex ordering...
Definition: global.hh:61
static constexpr bool fixedSize()
Definition: edges0.5fem.hh:48
EdgeS0_5FiniteElementMap(const VertexOrderFactory &voFactory)
Definition: edges0.5fem.hh:44
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
static constexpr bool hasDOFs(int codim)
Definition: edges0.5fem.hh:53
static constexpr int dimension
The dimension of the finite elements returned by this map.
Definition: edges0.5fem.hh:42