dune-pdelab  2.4-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  std::size_t size(GeometryType gt) const
66  {
67  return dimR * backend.size(gt);
68  }
69 
70  std::size_t maxLocalSize() const
71  {
72  return dimR * backend.maxLocalSize();
73  }
74 
75  };
76 
77  template<class BackendFEM, std::size_t dimR>
78  const typename PowerFiniteElementMap<BackendFEM, dimR>::Factory
79  PowerFiniteElementMap<BackendFEM, dimR>::factory = Factory();
80 
81  } // namespace PDELab
82 } // namespace Dune
83 
84 #endif // DUNE_PDELAB_FINITEELEMENTMAP_POWERFEM_HH
PowerFiniteElementMap(const BackendFEM &backend_)
construct PowerFiniteElementMap
Definition: powerfem.hh:47
FiniteElementMapTraits< typename Factory::FiniteElement > Traits
export Traits
Definition: powerfem.hh:33
const E & e
Definition: interpolate.hh:172
T FiniteElementType
Type of finite element from local functions.
Definition: finiteelementmap.hh:30
Traits::FiniteElementType find(const Element &e) const
Return finite element for the given entity.
Definition: powerfem.hh:57
FiniteElementMap for PowerFiniteElements.
Definition: powerfem.hh:23
Definition: adaptivity.hh:27
collect types exported by a finite element map
Definition: finiteelementmap.hh:27
std::size_t size(GeometryType gt) const
Definition: powerfem.hh:65
bool fixedSize() const
Definition: powerfem.hh:60
std::size_t maxLocalSize() const
Definition: powerfem.hh:70