5#ifndef DUNE_PQ22DLOCALFINITEELEMENT_HH
6#define DUNE_PQ22DLOCALFINITEELEMENT_HH
10#include <dune/localfunctions/common/localfiniteelementvariant.hh>
12#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
13#include <dune/localfunctions/lagrange/lagrangecube.hh>
17 template<
class D,
class R>
18 class PQ22DLocalFiniteElement
20 using LFEVariant = LocalFiniteElementVariant<LagrangeSimplexLocalFiniteElement<D,R,2,2>,
21 LagrangeCubeLocalFiniteElement<D,R,2,2> >;
25 PQ22DLocalFiniteElement (
const GeometryType &
gt )
27 if (
gt.isTriangle() )
28 lfeVariant_ = LagrangeSimplexLocalFiniteElement<D,R,2,2>();
29 else if (
gt.isQuadrilateral() )
30 lfeVariant_ = LagrangeCubeLocalFiniteElement<D,R,2,2>();
33 PQ22DLocalFiniteElement (
const GeometryType &
gt,
const std::vector<unsigned int> vertexmap )
35 if (
gt.isTriangle() )
36 lfeVariant_ = LagrangeSimplexLocalFiniteElement<D,R,2,2>(vertexmap);
37 else if (
gt.isQuadrilateral() )
38 lfeVariant_ = LagrangeCubeLocalFiniteElement<D,R,2,2>();
41 const typename Traits::LocalBasisType& localBasis ()
const
43 return lfeVariant_.localBasis();
46 const typename Traits::LocalCoefficientsType& localCoefficients ()
const
48 return lfeVariant_.localCoefficients();
51 const typename Traits::LocalInterpolationType& localInterpolation ()
const
53 return lfeVariant_.localInterpolation();
57 unsigned int size ()
const
59 return lfeVariant_.size();
64 return lfeVariant_.type();
69 LFEVariant lfeVariant_;
typename Dune::LocalFiniteElementTraits< LocalBasis, LocalCoefficients, LocalInterpolation > Traits
Export LocalFiniteElementTraits.
Definition: localfiniteelementvariant.hh:269
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
Implements a matrix constructed from a given type representing a field and compile-time given number ...
bool gt(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test if first greater than second
Definition: float_cmp.cc:158
Dune namespace.
Definition: alignedallocator.hh:13