DUNE PDELab (2.8)

monomfem.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_MONOMFEM_HH
5#define DUNE_PDELAB_FINITEELEMENTMAP_MONOMFEM_HH
6
7#include <cstddef>
8
10
11#include<dune/localfunctions/monomial.hh>
12
13#include"finiteelementmap.hh"
14#include <dune/pdelab/finiteelementmap/global.hh>
15
16namespace Dune {
17 namespace PDELab {
18
21 template<class D, class R, int d, int p>
23 : public SimpleLocalFiniteElementMap< Dune::MonomialLocalFiniteElement<D,R,d,p>,d>
24 {
25 public:
26
29 {
30 }
31
32 static constexpr bool fixedSize()
33 {
34 return true;
35 }
36
37 static constexpr bool hasDOFs(int codim)
38 {
39 return codim == 0;
40 }
41
42 std::size_t size(GeometryType gt) const
43 {
44 return gt == _gt ? MonomialLocalBasis<D,R,d,p>::size() : 0;
45 }
46
47 static constexpr std::size_t maxLocalSize()
48 {
50 }
51
52 private:
53 const GeometryType _gt;
54
55 };
56
58
65 template<class Geometry, class RF, std::size_t p>
68 MonomialFiniteElementFactory<Geometry, RF, p>
69 >
70 {
73
74 static FEFactory feFactory;
75
76 public:
77
79 static constexpr int dimension = Geometry::mydimension;
80
81 MonomFiniteElementMap() : Base(feFactory) { }
82 };
83
84 template<class GV, class RF, std::size_t p>
85 typename MonomFiniteElementMap<GV, RF, p>::FEFactory
86 MonomFiniteElementMap<GV, RF, p>::feFactory;
87
88 }
89}
90
91#endif // DUNE_PDELAB_FINITEELEMENTMAP_MONOMFEM_HH
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:123
@ mydimension
Definition: geometry.hh:90
Factory for global-valued MonomFiniteElement objects.
Definition: monomial.hh:111
static constexpr unsigned int size()
Number of shape functions.
Definition: monomiallocalbasis.hh:215
Monomial basis for discontinuous Galerkin methods.
Definition: monomial.hh:39
Generic finite element map for global finite elements created with a geometry.
Definition: global.hh:20
Global-valued finite element map for Monom elements.
Definition: monomfem.hh:70
static constexpr int dimension
The dimension of the finite elements returned by this map.
Definition: monomfem.hh:79
simple implementation where all entities have the same finite element
Definition: finiteelementmap.hh:101
bool gt(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test if first greater than second
Definition: float_cmp.cc:156
Dune namespace.
Definition: alignedallocator.hh:11
A unique label for each type of element that can occur in a grid.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 22, 23:30, 2024)