Dune Core Modules (2.6.0)

q1.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_Q1_LOCALFINITEELEMENT_HH
5#define DUNE_Q1_LOCALFINITEELEMENT_HH
6
8
9#include <dune/localfunctions/common/localfiniteelementtraits.hh>
10#include <dune/localfunctions/common/localtoglobaladaptors.hh>
11#include <dune/localfunctions/lagrange/q1/q1localbasis.hh>
12#include <dune/localfunctions/lagrange/q1/q1localcoefficients.hh>
13#include <dune/localfunctions/lagrange/q1/q1localinterpolation.hh>
14
15namespace Dune
16{
17
23 template<class D, class R, int dim>
25 {
26 public:
27 // user-defined default constructor is required for clang 3.8,
28 // see https://gitlab.dune-project.org/core/dune-localfunctions/merge_requests/60
31
36
39 const typename Traits::LocalBasisType& localBasis () const
40 {
41 return basis;
42 }
43
47 {
48 return coefficients;
49 }
50
54 {
55 return interpolation;
56 }
57
59 unsigned int size () const
60 {
61 return basis.size();
62 }
63
66 static constexpr GeometryType type ()
67 {
68 return GeometryTypes::cube(dim);
69 }
70
71 private:
73 Q1LocalCoefficients<dim> coefficients;
75 };
76
78
83 template<class Geometry, class RF>
86 Q1LocalFiniteElement<
87 typename Geometry::ctype, RF, Geometry::mydimension
88 >,
89 Geometry
90 >
91 {
94 > LFE;
96
97 static const LFE lfe;
98
99 public:
102 };
103
104 template<class Geometry, class RF>
105 const typename Q1FiniteElementFactory<Geometry, RF>::LFE
106 Q1FiniteElementFactory<Geometry, RF>::lfe;
107}
108
109#endif
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:277
@ mydimension
Definition: geometry.hh:90
GridImp::ctype ctype
define type used for coordinates in grid module
Definition: geometry.hh:95
Factory for global-valued Q1 elements.
Definition: q1.hh:91
Q1FiniteElementFactory()
default constructor
Definition: q1.hh:101
Lagrange shape functions of order 1 on the reference cube.
Definition: q1localbasis.hh:27
Layout map for Q1 elements.
Definition: q1localcoefficients.hh:23
The local Q1 finite element on cubes.
Definition: q1.hh:25
const Traits::LocalBasisType & localBasis() const
Definition: q1.hh:39
Q1LocalFiniteElement()
Definition: q1.hh:30
const Traits::LocalInterpolationType & localInterpolation() const
Definition: q1.hh:53
LocalFiniteElementTraits< Q1LocalBasis< D, R, dim >, Q1LocalCoefficients< dim >, Q1LocalInterpolation< dim, Q1LocalBasis< D, R, dim > > > Traits
Definition: q1.hh:35
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: q1.hh:46
static constexpr GeometryType type()
Definition: q1.hh:66
unsigned int size() const
Number of shape functions in this finite element.
Definition: q1.hh:59
Definition: q1localinterpolation.hh:14
Factory for ScalarLocalToGlobalFiniteElementAdaptor objects.
Definition: localtoglobaladaptors.hh:242
constexpr GeometryType cube(unsigned int dim)
Returns a GeometryType representing a hypercube of dimension dim.
Definition: type.hh:705
Dune namespace.
Definition: alignedallocator.hh:10
traits helper struct
Definition: localfiniteelementtraits.hh:11
LB LocalBasisType
Definition: localfiniteelementtraits.hh:14
LC LocalCoefficientsType
Definition: localfiniteelementtraits.hh:18
LI LocalInterpolationType
Definition: localfiniteelementtraits.hh:22
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 (Jul 15, 22:36, 2024)