dune-pdelab  2.5-dev
powerfem.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_POWERFEM_HH
5 #define DUNE_PDELAB_FINITEELEMENTMAP_POWERFEM_HH
6 
7 #include <cstddef>
8 
9 #include <dune/localfunctions/meta/power.hh>
10 
12 
13 namespace Dune {
14  namespace PDELab {
15 
17 
22  template<class BackendFEM, std::size_t dimR>
24  {
25  typedef typename BackendFEM::Traits::FiniteElementType BackendFE;
26  typedef PowerFiniteElementFactory<BackendFE, dimR> Factory;
27 
28  const BackendFEM &backend;
29  static const Factory factory;
30 
31  public:
34 
36 
47  PowerFiniteElementMap(const BackendFEM& backend_) : backend(backend_) { }
48 
50 
56  template<class Element>
57  typename Traits::FiniteElementType find(const Element& e) const
58  { return factory.make(backend.find(e)); }
59 
60  bool fixedSize() const
61  {
62  return backend.fixedSize();
63  }
64 
65  bool hasDOFs(int codim) const
66  {
67  return backend.hasDOFs(codim);
68  }
69 
70  std::size_t size(GeometryType gt) const
71  {
72  return dimR * backend.size(gt);
73  }
74 
75  std::size_t maxLocalSize() const
76  {
77  return dimR * backend.maxLocalSize();
78  }
79 
80  };
81 
82  template<class BackendFEM, std::size_t dimR>
83  const typename PowerFiniteElementMap<BackendFEM, dimR>::Factory
85 
86  } // namespace PDELab
87 } // namespace Dune
88 
89 #endif // DUNE_PDELAB_FINITEELEMENTMAP_POWERFEM_HH
bool hasDOFs(int codim) const
Definition: powerfem.hh:65
bool fixedSize() const
Definition: powerfem.hh:60
collect types exported by a finite element map
Definition: finiteelementmap.hh:27
Traits::FiniteElementType find(const Element &e) const
Return finite element for the given entity.
Definition: powerfem.hh:57
PowerFiniteElementMap(const BackendFEM &backend_)
construct PowerFiniteElementMap
Definition: powerfem.hh:47
For backward compatibility – Do not use this!
Definition: adaptivity.hh:27
const Entity & e
Definition: localfunctionspace.hh:111
FiniteElementMap for PowerFiniteElements.
Definition: powerfem.hh:23
FiniteElementMapTraits< typename Factory::FiniteElement > Traits
export Traits
Definition: powerfem.hh:33
T FiniteElementType
Type of finite element from local functions.
Definition: finiteelementmap.hh:30
std::size_t maxLocalSize() const
Definition: powerfem.hh:75
std::size_t size(GeometryType gt) const
Definition: powerfem.hh:70