dune-pdelab  2.0.0
pk2dfem.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil -*-
2 #ifndef DUNE_PDELAB_FINITEELEMENTMAP_PK2DFEM_HH
3 #define DUNE_PDELAB_FINITEELEMENTMAP_PK2DFEM_HH
4 
5 #warning dune/pdelab/finiteelementmap/pk2dfem.hh and Pk2DLocalFiniteElementMap are deprecated, please use dune/pdelab/finiteelementmap/pkfem.hh and PkLocalFiniteElementMap instead
6 
7 #include <dune/common/deprecated.hh>
8 
9 #include <dune/localfunctions/lagrange/pk2d.hh>
10 
13 
14 namespace Dune {
15  namespace PDELab {
16 
19 
20  template<typename GV, typename D, typename R, unsigned int k>
21  class DUNE_DEPRECATED_MSG("Please use PkLocalFiniteElementMap instead") Pk2DLocalFiniteElementMap
22  : public fem::PkLocalFiniteElementMapBase<GV,D,R,k,2>
23  {
24 
25  public:
26 
28  : fem::PkLocalFiniteElementMapBase<GV,D,R,k,2>(gv)
29  {}
30 
31  };
32 
34 
43  template<class Geometry, class VertexOrderFactory, class RF, std::size_t k>
44  class DUNE_DEPRECATED_MSG("Please use PkLocalFiniteElementMap instead") Pk2DFiniteElementMap :
46  Pk2DFiniteElementFactory<Geometry, RF, k>, VertexOrderFactory
47  >
48  {
49  typedef Pk2DFiniteElementFactory<Geometry, RF, k> FEFactory;
51  FEFactory, VertexOrderFactory
52  > Base;
53 
54  static FEFactory &feFactory() {
55  static FEFactory feFactory_;
56  return feFactory_;
57  }
58 
59  public:
60  Pk2DFiniteElementMap(const VertexOrderFactory &voFactory) :
61  Base(feFactory(), voFactory)
62  { }
63 
64  bool fixedSize() const
65  {
66  return true;
67  }
68 
69  std::size_t size(GeometryType gt) const
70  {
71  if (gt.isVertex())
72  return k > 0 ? 1 : 0;
73  if (gt.isLine())
74  return k > 1 ? k - 1 : 0;
75  if (gt.isTriangle())
76  return k > 2 ? (k-2)*(k-1)/2 : (k == 0);
77  return 0;
78  }
79 
80  std::size_t maxLocalSize() const
81  {
82  return (k+1)*(k+2)/2;
83  }
84 
85  };
86  }
87 }
88 
89 #endif // DUNE_PDELAB_FINITEELEMENTMAP_PK2DFEM_HH
std::size_t size(GeometryType gt) const
Definition: pk2dfem.hh:69
std::size_t maxLocalSize() const
Definition: pk2dfem.hh:80
Pk2DFiniteElementMap(const VertexOrderFactory &voFactory)
Definition: pk2dfem.hh:60
Pk2DLocalFiniteElementMap(const GV &gv)
Definition: pk2dfem.hh:27
Generic finite element map for global finite elements created with a geometry and a vertex ordering...
Definition: global.hh:61
bool fixedSize() const
Definition: pk2dfem.hh:64
Global-valued finite element map for Pk2D elements.
Definition: pk2dfem.hh:44