DUNE PDELab (git)

edges0.5fem.hh
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_EDGES0_5FEM_HH
5#define DUNE_PDELAB_FINITEELEMENTMAP_EDGES0_5FEM_HH
6
7#include <dune/localfunctions/whitney/edges0.5.hh>
8
9#include <dune/pdelab/finiteelementmap/global.hh>
10
11namespace Dune {
12 namespace PDELab {
13
15
23 template<class Geometry, class VertexOrderFactory, class RF>
26 EdgeS0_5FiniteElementFactory<Geometry, RF>, VertexOrderFactory
27 >
28 {
31 FEFactory, VertexOrderFactory
32 > Base;
33
34 static FEFactory &feFactory() {
35 static FEFactory feFactory_;
36 return feFactory_;
37 }
38
39 public:
40
42 static constexpr int dimension = Geometry::mydimension;
43
44 EdgeS0_5FiniteElementMap(const VertexOrderFactory &voFactory) :
45 Base(feFactory(), voFactory)
46 { }
47
48 static constexpr bool fixedSize()
49 {
50 return true;
51 }
52
53 static constexpr bool hasDOFs(int codim)
54 {
55 return Geometry::mydimension - codim == 1;
56 }
57
58 static constexpr std::size_t size(GeometryType gt)
59 {
60 return gt == GeometryTypes::line ? 1 : 0;
61 }
62
63 static constexpr std::size_t maxLocalSize()
64 {
65 // This is a bit of a hack. It only provides an upper bound which is not
66 // sharp for non-cubes. However, a better compile time guess is hard to
67 // obtain from latest dune-localfunctions...
68 return 2 * dimension;
69 }
70
71 };
72 }
73}
74
75#endif // DUNE_PDELAB_FINITEELEMENTMAP_EDGES0_5FEM_HH
static constexpr int mydimension
geometry dimension
Definition: geometry.hh:94
Global-valued finite element map for EdgeS0_5 elements.
Definition: edges0.5fem.hh:28
static constexpr int dimension
The dimension of the finite elements returned by this map.
Definition: edges0.5fem.hh:42
Generic finite element map for global finite elements created with a geometry and a vertex ordering.
Definition: global.hh:62
bool gt(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test if first greater than second
Definition: float_cmp.cc:158
constexpr GeometryType line
GeometryType representing a line.
Definition: type.hh:498
Dune namespace.
Definition: alignedallocator.hh:13
Factory for EdgeS0_5FiniteElement objects.
Definition: edges0.5.hh:103
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 24, 23:30, 2024)