3#ifndef DUNE_PQ22DLOCALFINITEELEMENT_HH
4#define DUNE_PQ22DLOCALFINITEELEMENT_HH
8#include <dune/localfunctions/common/virtualinterface.hh>
9#include <dune/localfunctions/common/virtualwrappers.hh>
15 template<
class D,
class R>
16 class PQ22DLocalFiniteElement
20 typedef LocalBasisTraits<D,2,Domain, R,1,Range, Dune::FieldMatrix<R,1,2> > BasisTraits;
24 typedef LocalFiniteElementTraits<
25 LocalBasisVirtualInterface<BasisTraits>,
26 LocalCoefficientsVirtualInterface,
27 LocalInterpolationVirtualInterface< Domain, Range >
33 PQ22DLocalFiniteElement (
const GeometryType &
gt )
36 if (
gt.isTriangle() )
37 setup( Pk2DLocalFiniteElement<D,R,2>() );
38 else if (
gt.isQuadrilateral() )
39 setup( QkLocalFiniteElement<D,R,2,2>() );
42 PQ22DLocalFiniteElement (
const GeometryType &
gt,
const std::vector<unsigned int> vertexmap )
45 if (
gt.isTriangle() )
46 setup( Pk2DLocalFiniteElement<D,R,2>(vertexmap) );
47 else if (
gt.isQuadrilateral() )
48 setup( QkLocalFiniteElement<D,R,2,2>() );
51 PQ22DLocalFiniteElement (
const PQ22DLocalFiniteElement<D, R>& other )
54 fe_ = other.fe_->clone();
57 ~PQ22DLocalFiniteElement ( )
62 const LocalBasis& localBasis ()
const
64 return fe_->localBasis();
67 const LocalCoefficients& localCoefficients ()
const
69 return fe_->localCoefficients();
72 const LocalInterpolation& localInterpolation ()
const
74 return fe_->localInterpolation();
78 unsigned int size ()
const
80 return fe_->localBasis().size();
91 void setup(
const FE& fe)
93 fe_ =
new LocalFiniteElementVirtualImp<FE>(fe);
97 const LocalFiniteElementBase *fe_;
vector space out of a tensor product of fields.
Definition: fvector.hh:93
virtual base class for local finite elements with functions
Definition: virtualinterface.hh:266
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
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:147
Dune namespace.
Definition: alignedallocator.hh:10
LB LocalBasisType
Definition: localfiniteelementtraits.hh:14
LC LocalCoefficientsType
Definition: localfiniteelementtraits.hh:18
LI LocalInterpolationType
Definition: localfiniteelementtraits.hh:22