DUNE PDELab (git)

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// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5#ifndef DUNE_P0LOCALFINITEELEMENT_HH
6#define DUNE_P0LOCALFINITEELEMENT_HH
7
9
10#include <dune/localfunctions/common/localfiniteelementtraits.hh>
11#include "p0/p0localbasis.hh"
12#include "p0/p0localcoefficients.hh"
13#include "p0/p0localinterpolation.hh"
14
15namespace Dune
16{
17
23 template<class D, class R, int d>
25 {
26 public:
30 P0LocalInterpolation<P0LocalBasis<D,R,d> > > Traits;
31
35 : interpolation(type), gt(type)
36 {}
37
40 const typename Traits::LocalBasisType& localBasis () const
41 {
42 return basis;
43 }
44
48 {
49 return coefficients;
50 }
51
55 {
56 return interpolation;
57 }
58
60 unsigned int size () const
61 {
62 return 1;
63 }
64
68 {
69 return gt;
70 }
71
72 private:
74 P0LocalCoefficients coefficients;
75 P0LocalInterpolation<P0LocalBasis<D,R,d> > interpolation;
76 GeometryType gt;
77 };
78
79}
80
81#endif
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:114
Definition: p0localbasis.hh:31
Definition: p0localcoefficients.hh:25
The local p0 finite element on all types of reference elements.
Definition: p0.hh:25
P0LocalFiniteElement(const GeometryType &type)
Definition: p0.hh:34
unsigned int size() const
The number of shape functions – here: 1.
Definition: p0.hh:60
GeometryType type() const
Definition: p0.hh:67
const Traits::LocalBasisType & localBasis() const
Definition: p0.hh:40
LocalFiniteElementTraits< P0LocalBasis< D, R, d >, P0LocalCoefficients, P0LocalInterpolation< P0LocalBasis< D, R, d > > > Traits
Definition: p0.hh:30
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: p0.hh:47
const Traits::LocalInterpolationType & localInterpolation() const
Definition: p0.hh:54
Dune namespace.
Definition: alignedallocator.hh:13
traits helper struct
Definition: localfiniteelementtraits.hh:13
LB LocalBasisType
Definition: localfiniteelementtraits.hh:16
LC LocalCoefficientsType
Definition: localfiniteelementtraits.hh:20
LI LocalInterpolationType
Definition: localfiniteelementtraits.hh:24
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 23, 23:29, 2024)