Loading [MathJax]/extensions/tex2jax.js

dune-composites (unstable)

serendipityfem.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3
4#ifndef DUNE_PDELAB_FINITEELEMENTMAP_SERENDIPITYFEM_HH
5#define DUNE_PDELAB_FINITEELEMENTMAP_SERENDIPITYFEM_HH
6
7#include <cstddef>
8
9#include "serendipity.hh"
10#include <dune/pdelab/finiteelementmap/finiteelementmap.hh>
11
12namespace Dune {
13 namespace PDELab {
14
17 template<typename GV, typename D, typename R, std::size_t k>
19 : public SimpleLocalFiniteElementMap< Dune::SerendipityLocalFiniteElement<D,R,GV::dimension,k>,GV::dimension>
20 {
21
22 public:
23
24 static_assert(
25 GV::dimension <= 3,
26 "SerendipityLocalFiniteElementMap is only implemented for d = 1,2,3"
27 );
28
29 static_assert(
30 k == 2,
31 "SerendipityLocalFiniteElementMap is only available for k = 2"
32 );
33
35 {}
36
37 static constexpr bool fixedSize()
38 {
39 return true;
40 }
41
42 static constexpr bool hasDOFs(int codim)
43 {
44 return false;
45 }
46
47 static constexpr std::size_t size(GeometryType gt)
48 {
49 return (gt.isVertex() || gt.isLine() ) ? 1 : 0;
50 }
51
52 static constexpr std::size_t maxLocalSize()
53 {
54 const auto d = GV::dimension;
55 if(d == 1){
56 return 3;
57 }
58 if(d == 2){
59 return 12;
60 }
61 if(d == 3){
62 return 20;
63 }
64 }
65
66 };
67
68 }
69}
70
71#endif // DUNE_PDELAB_FINITEELEMENTMAP_SERENDIPITYFEM_HH
Definition: serendipityfem.hh:20
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Apr 15, 23:04, 2025)