Dune Core Modules (2.7.1)

p0.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_P0LOCALFINITEELEMENT_HH
4#define DUNE_P0LOCALFINITEELEMENT_HH
5
7
8#include <dune/localfunctions/common/localfiniteelementtraits.hh>
9#include "p0/p0localbasis.hh"
10#include "p0/p0localcoefficients.hh"
11#include "p0/p0localinterpolation.hh"
12
13namespace Dune
14{
15
21 template<class D, class R, int d>
23 {
24 public:
28 P0LocalInterpolation<P0LocalBasis<D,R,d> > > Traits;
29
33 : interpolation(type), gt(type)
34 {}
35
38 const typename Traits::LocalBasisType& localBasis () const
39 {
40 return basis;
41 }
42
46 {
47 return coefficients;
48 }
49
53 {
54 return interpolation;
55 }
56
58 unsigned int size () const
59 {
60 return 1;
61 }
62
66 {
67 return gt;
68 }
69
70 private:
72 P0LocalCoefficients coefficients;
73 P0LocalInterpolation<P0LocalBasis<D,R,d> > interpolation;
74 GeometryType gt;
75 };
76
77}
78
79#endif
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:279
Constant shape function.
Definition: p0localbasis.hh:28
Layout map for P0 elements.
Definition: p0localcoefficients.hh:22
The local p0 finite element on all types of reference elements.
Definition: p0.hh:23
P0LocalFiniteElement(const GeometryType &type)
Definition: p0.hh:32
unsigned int size() const
The number of shape functions – here: 1.
Definition: p0.hh:58
GeometryType type() const
Definition: p0.hh:65
const Traits::LocalBasisType & localBasis() const
Definition: p0.hh:38
LocalFiniteElementTraits< P0LocalBasis< D, R, d >, P0LocalCoefficients, P0LocalInterpolation< P0LocalBasis< D, R, d > > > Traits
Definition: p0.hh:28
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: p0.hh:45
const Traits::LocalInterpolationType & localInterpolation() const
Definition: p0.hh:52
Dune namespace.
Definition: alignedallocator.hh:14
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 12, 23:30, 2024)