4#ifndef DUNE_PDELAB_FINITEELEMENTMAP_SERENDIPITYFEM_HH
5#define DUNE_PDELAB_FINITEELEMENTMAP_SERENDIPITYFEM_HH
9#include "serendipity.hh"
10#include <dune/pdelab/finiteelementmap/finiteelementmap.hh>
17 template<
typename GV,
typename D,
typename R, std::
size_t k>
19 :
public SimpleLocalFiniteElementMap< Dune::SerendipityLocalFiniteElement<D,R,GV::dimension,k> >
27 bool fixedSize()
const
32 bool hasDOFs(
int codim)
const
37 return codim == GV::dimension;
39 if (GV::dimension != 2 && GV::dimension != 3){
40 DUNE_THROW(NotImplemented,
"SerendipityLocalFiniteElementMap with k = 2 is only implemented for d = 2,3");
43 if(codim == GV::dimension || codim == (GV::dimension-1)){
50 DUNE_THROW(NotImplemented,
"SerendipityLocalFiniteElementMap is only implemented for k <= 2");
54 std::size_t size(GeometryType gt)
const
59 return gt.isVertex() ? 1 : 0;
62 if (GV::dimension != 2 && GV::dimension != 3)
63 DUNE_THROW(NotImplemented,
"SerendipityLocalFiniteElementMap with k = 2 is only implemented for d = 2,3");
65 return (gt.isVertex() || gt.isLine() ) ? 1 : 0;
68 DUNE_THROW(NotImplemented,
"SerendipityLocalFiniteElementMap is only implemented for k <= 2");
72 std::size_t maxLocalSize()
const
74 const auto d = GV::dimension;
79 return 2*(k+1)+2*(k-1);
82 return 4*(k+1)+8*(k-1);
Definition: serendipityfem.hh:20