dune-pdelab  2.4-dev
global.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_GLOBAL_HH
5 #define DUNE_PDELAB_FINITEELEMENTMAP_GLOBAL_HH
6 
8 
9 namespace Dune {
10  namespace PDELab {
11 
14 
18  template<class Factory>
20  {
21  Factory& factory;
22 
23  public:
25 
27 
37  GeometryFiniteElementMap(Factory& factory_) : factory(factory_) {}
38 
40 
46  template<class Element>
47  typename Traits::FiniteElementType find(const Element& e) const {
48  return factory.make(e.geometry());
49  }
50  };
51 
54 
60  template<class FEFactory, class VOFactory>
62  {
63  FEFactory& feFactory;
64  const VOFactory& voFactory;
65 
66  public:
68 
70 
81  GeometryVertexOrderFiniteElementMap(FEFactory& feFactory_,
82  const VOFactory & voFactory_) :
83  feFactory(feFactory_), voFactory(voFactory_)
84  {}
85 
87 
93  template<class Element>
94  typename Traits::FiniteElementType find(const Element& e) const {
95  return feFactory.make(e.geometry(), voFactory.make(e));
96  }
97  };
98 
99  } // namespace PDELab
100 } // namespace Dune
101 
102 #endif // DUNE_PDELAB_FINITEELEMENTMAP_GLOBAL_HH
GeometryVertexOrderFiniteElementMap(FEFactory &feFactory_, const VOFactory &voFactory_)
construct GeometryFiniteElementMap
Definition: global.hh:81
Traits::FiniteElementType find(const Element &e) const
Return finite element for the given entity.
Definition: global.hh:47
const E & e
Definition: interpolate.hh:172
FiniteElementMapTraits< typename Factory::FiniteElement > Traits
Definition: global.hh:24
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: global.hh:94
Definition: adaptivity.hh:27
collect types exported by a finite element map
Definition: finiteelementmap.hh:27
Generic finite element map for global finite elements created with a geometry and a vertex ordering...
Definition: global.hh:61
Generic finite element map for global finite elements created with a geometry.
Definition: global.hh:19
GeometryFiniteElementMap(Factory &factory_)
construct GeometryFiniteElementMap
Definition: global.hh:37
FiniteElementMapTraits< typename FEFactory::FiniteElement > Traits
Definition: global.hh:67