dune-pdelab  2.5-dev
monomfem.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_PDELAB_FINITEELEMENTMAP_MONOMFEM_HH
5 #define DUNE_PDELAB_FINITEELEMENTMAP_MONOMFEM_HH
6 
7 #include <cstddef>
8 
9 #include <dune/geometry/type.hh>
10 
11 #include<dune/localfunctions/monomial.hh>
12 
13 #include"finiteelementmap.hh"
15 
16 namespace Dune {
17  namespace PDELab {
18 
21  template<class D, class R, int d, int p>
23  : public SimpleLocalFiniteElementMap< Dune::MonomialLocalFiniteElement<D,R,d,p> >
24  {
25  public:
26 
27  MonomLocalFiniteElementMap (const Dune::GeometryType& type)
28  : SimpleLocalFiniteElementMap< Dune::MonomialLocalFiniteElement<D,R,d,p> >(Dune::MonomialLocalFiniteElement<D,R,d,p>(type)), _gt(type)
29  {
30  }
31 
32  bool fixedSize() const
33  {
34  return true;
35  }
36 
37  bool hasDOFs(int codim) const
38  {
39  return codim == 0;
40  }
41 
42  std::size_t size(GeometryType gt) const
43  {
44  return gt == _gt ? Dune::MonomImp::Size<d,p>::val : 0;
45  }
46 
47  std::size_t maxLocalSize() const
48  {
49  return MonomImp::Size<d,p>::val;
50  }
51 
52  private:
53  const GeometryType _gt;
54 
55  };
56 
58 
65  template<class Geometry, class RF, std::size_t p>
67  : public GeometryFiniteElementMap<
68  MonomialFiniteElementFactory<Geometry, RF, p>
69  >
70  {
71  typedef MonomialFiniteElementFactory<Geometry, RF, p> FEFactory;
73 
74  static FEFactory feFactory;
75 
76  public:
77  MonomFiniteElementMap() : Base(feFactory) { }
78  };
79 
80  template<class GV, class RF, std::size_t p>
81  typename MonomFiniteElementMap<GV, RF, p>::FEFactory
83 
84  }
85 }
86 
87 #endif // DUNE_PDELAB_FINITEELEMENTMAP_MONOMFEM_HH
MonomLocalFiniteElementMap(const Dune::GeometryType &type)
Definition: monomfem.hh:27
For backward compatibility – Do not use this!
Definition: adaptivity.hh:27
Generic finite element map for global finite elements created with a geometry.
Definition: global.hh:19
std::size_t size(GeometryType gt) const
Definition: monomfem.hh:42
MonomFiniteElementMap()
Definition: monomfem.hh:77
simple implementation where all entities have the same finite element
Definition: finiteelementmap.hh:95
bool fixedSize() const
Definition: monomfem.hh:32
std::size_t maxLocalSize() const
Definition: monomfem.hh:47
const P & p
Definition: constraints.hh:147
Global-valued finite element map for Monom elements.
Definition: monomfem.hh:66
bool hasDOFs(int codim) const
Definition: monomfem.hh:37