Dune Core Modules (2.9.1)

refinedp1.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 (C) 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_LOCALFUNCTIONS_REFINED_REFINEDP1_HH
6#define DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH
7
9
10#include <dune/localfunctions/common/localfiniteelementtraits.hh>
11#include <dune/localfunctions/lagrange/p0.hh>
12
13#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
15
16namespace Dune
17{
18
25 template<class D, class R, int dim>
27 {
28 public:
32 Impl::LagrangeSimplexLocalCoefficients<dim,2>,
33 Impl::LagrangeSimplexLocalInterpolation<Impl::LagrangeSimplexLocalBasis<D,R,dim,2> > > Traits;
34
38 {}
39
42 const typename Traits::LocalBasisType& localBasis () const
43 {
44 return basis_;
45 }
46
50 {
51 return coefficients_;
52 }
53
57 {
58 return interpolation_;
59 }
60
62 unsigned int size () const
63 {
64 return basis_.size();
65 }
66
69 static constexpr GeometryType type ()
70 {
71 return GeometryTypes::simplex(dim);
72 }
73
74 private:
75 RefinedP1LocalBasis<D,R,dim> basis_;
76 Impl::LagrangeSimplexLocalCoefficients<dim,2> coefficients_;
77 // Yes, the template argument here really is LagrangeSimplexLocalBasis, even though this is not
78 // the local basis of the refined locale finite element: The reason is that LagrangeSimplexLocalInterpolation
79 // uses this argument to determine the polynomial order, and RefinedP1LocalBasis returns order 1
80 // whereas order 2 is needed here.
81 Impl::LagrangeSimplexLocalInterpolation<Impl::LagrangeSimplexLocalBasis<D,R,dim,2> > interpolation_;
82 };
83
84}
85
86#endif // DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:126
Piecewise linear continuous Lagrange functions on a uniformly refined simplex element.
Definition: refinedp1.hh:27
static constexpr GeometryType type()
The element type that this finite element is defined on.
Definition: refinedp1.hh:69
unsigned int size() const
Number of shape functions of this finite element.
Definition: refinedp1.hh:62
RefinedP1LocalFiniteElement()
Default constructor.
Definition: refinedp1.hh:37
const Traits::LocalInterpolationType & localInterpolation() const
Evaluates all degrees of freedom for a given function.
Definition: refinedp1.hh:56
LocalFiniteElementTraits< RefinedP1LocalBasis< D, R, dim >, Impl::LagrangeSimplexLocalCoefficients< dim, 2 >, Impl::LagrangeSimplexLocalInterpolation< Impl::LagrangeSimplexLocalBasis< D, R, dim, 2 > > > Traits
Export all types used by this implementation.
Definition: refinedp1.hh:33
const Traits::LocalCoefficientsType & localCoefficients() const
Produces the assignments of the degrees of freedom to the element subentities.
Definition: refinedp1.hh:49
const Traits::LocalBasisType & localBasis() const
The set of shape functions.
Definition: refinedp1.hh:42
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition: type.hh:464
Dune namespace.
Definition: alignedallocator.hh:13
Linear Lagrange shape functions on a uniformly refined reference element.
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 21, 23:30, 2024)