Dune Core Modules (2.6.0)

p1.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_P1LOCALFINITEELEMENT_HH
4#define DUNE_P1LOCALFINITEELEMENT_HH
5
7
8#include <dune/localfunctions/common/localfiniteelementtraits.hh>
9#include "p1/p1localbasis.hh"
10#include "p1/p1localcoefficients.hh"
11#include "p1/p1localinterpolation.hh"
12
13namespace Dune
14{
15
21 template<class D, class R, int dim>
23 {
24 public:
28 P1LocalInterpolation<dim,P1LocalBasis<D,R,dim> > > Traits;
29
33 {}
34
37 const typename Traits::LocalBasisType& localBasis () const
38 {
39 return basis;
40 }
41
45 {
46 return coefficients;
47 }
48
52 {
53 return interpolation;
54 }
55
57 unsigned int size () const
58 {
59 return basis.size();
60 }
61
64 static constexpr GeometryType type ()
65 {
66 return GeometryTypes::simplex(dim);
67 }
68
69 private:
71 P1LocalCoefficients<dim> coefficients;
72 P1LocalInterpolation<dim,P1LocalBasis<D,R,dim> > interpolation;
73 };
74
75
76
77}
78
79#endif
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:277
Linear Lagrange shape functions on the simplex.
Definition: p1localbasis.hh:28
Local coefficients for simplex P1 elements.
Definition: p1localcoefficients.hh:22
The local p1 finite element on simplices.
Definition: p1.hh:23
static constexpr GeometryType type()
Definition: p1.hh:64
const Traits::LocalInterpolationType & localInterpolation() const
Definition: p1.hh:51
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: p1.hh:44
P1LocalFiniteElement()
Definition: p1.hh:32
unsigned int size() const
Number of shape functions in this finite element.
Definition: p1.hh:57
LocalFiniteElementTraits< P1LocalBasis< D, R, dim >, P1LocalCoefficients< dim >, P1LocalInterpolation< dim, P1LocalBasis< D, R, dim > > > Traits
Definition: p1.hh:28
const Traits::LocalBasisType & localBasis() const
Definition: p1.hh:37
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition: type.hh:696
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 (Nov 24, 23:30, 2024)