1#ifndef DUNE_FEM_SPACE_RANNACHERTUREK_HH
2#define DUNE_FEM_SPACE_RANNACHERTUREK_HH
4#if HAVE_DUNE_LOCALFUNCTIONS
7#include <dune/localfunctions/rannacherturek.hh>
17 template<
class FunctionSpace,
class Gr
idPart >
18 class RannacherTurekLocalFiniteElementMap
20 static const int dimLocal = GridPart::dimension;
22 typedef RannacherTurekLocalFiniteElementMap< FunctionSpace, GridPart > ThisType;
24 "GridPart has more than one geometry type." );
26 ^ ((1 << dimLocal)-1)) >> 1 == 0),
27 "Space only defined on cube grids." );
29 typedef GridPart GridPartType;
31 typedef std::tuple< > KeyType;
33 typedef typename FunctionSpace::DomainFieldType DomainFieldType;
34 typedef typename FunctionSpace::RangeFieldType RangeFieldType;
36 typedef RannacherTurekLocalFiniteElement< DomainFieldType, RangeFieldType, dimLocal > LocalFiniteElementType;
37 typedef typename LocalFiniteElementType::Traits::LocalBasisType LocalBasisType;
38 typedef typename LocalFiniteElementType::Traits::LocalCoefficientsType LocalCoefficientsType;
39 typedef typename LocalFiniteElementType::Traits::LocalInterpolationType LocalInterpolationType;
41 template<
class ... Args >
42 RannacherTurekLocalFiniteElementMap (
const GridPart &gridPart, Args ... args )
43 : gridPart_( gridPart ) {}
45 static std::size_t size () {
return 1; }
47 int order ()
const {
return localFe_.localBasis().order(); }
49 template<
class Entity >
50 int order (
const Entity &entity )
const {
return order(); }
52 template<
class Entity >
53 auto operator() (
const Entity &e )
const
55 return std::tuple< std::size_t, const LocalBasisType &, const LocalInterpolationType & >
56 {
static_cast< std::size_t
>( 0 ),
57 localFe_.localBasis(),
58 localFe_.localInterpolation() };
61 bool hasCoefficients (
const GeometryType &type )
const {
return type.isCube(); }
63 const LocalCoefficientsType& localCoefficients (
const GeometryType &type )
const
65 return localFe_.localCoefficients();
68 const GridPartType &gridPart ()
const {
return gridPart_; }
71 LocalFiniteElementType localFe_;
72 const GridPartType &gridPart_;
75 template<
class FunctionSpace,
class Gr
idPart,
class Storage = CachingStorage >
76 using RannacherTurekSpace
77 = LocalFiniteElementSpace< RannacherTurekLocalFiniteElementMap< FunctionSpace, GridPart >, FunctionSpace, Storage >;
80 template<
class FunctionSpace,
class Gr
idPart,
class Storage = CachingStorage >
81 using RannacherTurekDiscreteFunctionSpace
82 = LocalFiniteElementSpace< RannacherTurekLocalFiniteElementMap< FunctionSpace, GridPart >, FunctionSpace, Storage >;
85 namespace Capabilities
88 template<
class FunctionSpace,
class Gr
idPart,
class Storage >
89 struct hasFixedPolynomialOrder< LocalFiniteElementSpace< RannacherTurekLocalFiniteElementMap< FunctionSpace, GridPart >, FunctionSpace, Storage > >
91 static const bool v =
true;
95 template<
class FunctionSpace,
class Gr
idPart,
class Storage >
96 struct hasStaticPolynomialOrder< LocalFiniteElementSpace< RannacherTurekLocalFiniteElementMap< FunctionSpace, GridPart >, FunctionSpace, Storage > >
98 static const bool v =
true;
99 static const int order = 1;
103 template<
class FunctionSpace,
class Gr
idPart,
class Storage >
104 struct isContinuous< LocalFiniteElementSpace< RannacherTurekLocalFiniteElementMap< FunctionSpace, GridPart >, FunctionSpace, Storage > >
106 static const bool v =
false;
110 template<
class FunctionSpace,
class Gr
idPart,
class Storage >
111 struct isLocalized< LocalFiniteElementSpace< RannacherTurekLocalFiniteElementMap< FunctionSpace, GridPart >, FunctionSpace, Storage > >
113 static const bool v =
true;
117 template<
class FunctionSpace,
class Gr
idPart,
class Storage >
118 struct isAdaptive< LocalFiniteElementSpace< RannacherTurekLocalFiniteElementMap< FunctionSpace, GridPart >, FunctionSpace, Storage > >
120 static const bool v =
true;
124 template<
class FunctionSpace,
class Gr
idPart,
class Storage >
125 struct threadSafe< LocalFiniteElementSpace< RannacherTurekLocalFiniteElementMap< FunctionSpace, GridPart >, FunctionSpace, Storage > >
127 static const bool v =
false;
131 template<
class FunctionSpace,
class Gr
idPart,
class Storage >
132 struct viewThreadSafe< LocalFiniteElementSpace< RannacherTurekLocalFiniteElementMap< FunctionSpace, GridPart >, FunctionSpace, Storage > >
134 static const bool v =
true;
Definition: bindguard.hh:11
specialize with 'true' for if the codimension 0 entity of the grid part has only one possible geometr...
Definition: gridpart/common/capabilities.hh:29
static const bool v
Definition: space/common/capabilities.hh:25
static const bool v
Definition: space/common/capabilities.hh:38
static const int order
Definition: space/common/capabilities.hh:39
static const bool v
Definition: space/common/capabilities.hh:51
static const bool v
Definition: space/common/capabilities.hh:69
static const bool v
Definition: space/common/capabilities.hh:82
static const bool v
Definition: space/common/capabilities.hh:95
static const bool v
Definition: space/common/capabilities.hh:109