3 #ifndef DUNE_PQK_FACTORY_HH
4 #define DUNE_PQK_FACTORY_HH
8 #include <dune/geometry/type.hh>
29 template<
class D,
class R,
int d,
int k>
45 template<
class D,
class R,
int k>
57 if ((gt.isPrism())and (k==1))
59 if ((gt.isPrism())and (k==2))
61 if ((gt.isPyramid())and (k==1))
63 if ((gt.isPyramid())and (k==2))
73 template<
class D,
class R,
int dim,
int k>
84 static FiniteElementType*
create(
const GeometryType& gt)
111 template<
class D,
class R,
int dim,
int k>
117 typedef typename std::map<GeometryType,FE*>
FEMap;
129 typename FEMap::iterator it = other.
cache_.begin();
130 typename FEMap::iterator end = other.
cache_.end();
132 cache_[it->first] = (it->second)->clone();
137 typename FEMap::iterator it =
cache_.begin();
138 typename FEMap::iterator end =
cache_.end();
144 const FiniteElementType&
get(
const GeometryType& gt)
const
146 typename FEMap::const_iterator it =
cache_.find(gt);
151 DUNE_THROW(Dune::NotImplemented,
"No Pk/Qk like local finite element available for geometry type " << gt <<
" and order " << k);
156 return *(it->second);
static FiniteElementType * create(const GeometryType >)
create finite element for given GeometryType
Definition: pqkfactory.hh:84
First-order Lagrangian finite element on a prism.
Definition: prismp1.hh:20
virtual base class for local finite elements with functions
Definition: virtualinterface.hh:381
PyramidP1LocalFiniteElement< D, R > PyramidP1
Definition: pqkfactory.hh:51
FEMap cache_
Definition: pqkfactory.hh:160
Construct LocalBasisTraits with fixed diff order.
Definition: virtualinterface.hh:57
PQkLocalFiniteElementCache()
Default constructor.
Definition: pqkfactory.hh:124
First-order Lagrangian finite element on a prism.
Definition: pyramidp1.hh:21
class for wrapping a finite element using the virtual interface
Definition: virtualwrappers.hh:19
Definition: brezzidouglasmarini1cube2dlocalbasis.hh:14
The local p0 finite element on all types of reference elements.
Definition: p0.hh:22
static LocalFiniteElementVirtualInterface< T > * create(const GeometryType >)
create finite element for given GeometryType
Definition: pqkfactory.hh:35
PQkLocalFiniteElementCache(const PQkLocalFiniteElementCache &other)
Copy constructor.
Definition: pqkfactory.hh:127
General Lagrange finite element for cubes with arbitrary dimension and polynomial order...
Definition: qk.hh:22
Factory to create any kind of Pk/Qk like element wrapped for the virtual interface.
Definition: pqkfactory.hh:74
FixedOrderLocalBasisTraits< typename P0LocalFiniteElement< D, R, 3 >::Traits::LocalBasisType::Traits, 0 >::Traits T
Definition: pqkfactory.hh:48
QkLocalFiniteElement< D, R, dim, k > Qk
Definition: pqkfactory.hh:80
FixedOrderLocalBasisTraits< typename P0LocalFiniteElement< D, R, d >::Traits::LocalBasisType::Traits, 0 >::Traits T
Definition: pqkfactory.hh:32
Factory that only creates dimension specific local finite elements.
Definition: pqkfactory.hh:30
FixedOrderLocalBasisTraits< typename P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits, 0 >::Traits T
Definition: pqkfactory.hh:115
std::map< GeometryType, FE * > FEMap
Definition: pqkfactory.hh:117
FixedOrderLocalBasisTraits< typename P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits, 0 >::Traits T
Definition: pqkfactory.hh:76
PyramidP2LocalFiniteElement< D, R > PyramidP2
Definition: pqkfactory.hh:52
LocalFiniteElementVirtualInterface< T > FE
Definition: pqkfactory.hh:116
Definition: prismp2.hh:19
A cache that stores all available Pk/Qk like local finite elements for the given dimension and order...
Definition: pqkfactory.hh:112
P0LocalFiniteElement< D, R, dim > P0
Definition: pqkfactory.hh:78
PrismP2LocalFiniteElement< D, R > PrismP2
Definition: pqkfactory.hh:50
PrismP1LocalFiniteElement< D, R > PrismP1
Definition: pqkfactory.hh:49
Definition: pyramidp2.hh:19
FE FiniteElementType
Type of the finite elements stored in this cache.
Definition: pqkfactory.hh:121
static LocalFiniteElementVirtualInterface< T > * create(const GeometryType >)
create finite element for given GeometryType
Definition: pqkfactory.hh:55
PkLocalFiniteElement< D, R, dim, k > Pk
Definition: pqkfactory.hh:79
General Lagrange finite element with arbitrary dimension and polynomial order.
Definition: pk.hh:24
~PQkLocalFiniteElementCache()
Definition: pqkfactory.hh:135
LocalFiniteElementVirtualInterface< T > FiniteElementType
Definition: pqkfactory.hh:77