dune-fem 2.12-git
Loading...
Searching...
No Matches
gridfunctionadapter.hh
Go to the documentation of this file.
1#ifndef DUNE_FEM_GRIDFUNCTIONADAPTER_HH
2#define DUNE_FEM_GRIDFUNCTIONADAPTER_HH
3
4#include <type_traits>
5#include <utility>
6
8
9//- local includes
10#include <dune/fem/version.hh>
14
15// for compatibility
17
18namespace Dune
19{
20
21 namespace Fem
22 {
23
38 //- forward declaration
39 template <class FunctionImp, class GridPartImp>
40 class BasicGridFunctionAdapter;
41
43 template <class FunctionImp, class GridPartImp>
45 {
47
48 typedef typename FunctionSpaceType::RangeFieldType RangeFieldType;
49 typedef typename FunctionSpaceType::DomainFieldType DomainFieldType;
50 typedef typename FunctionSpaceType::RangeType RangeType;
51 typedef typename FunctionSpaceType::DomainType DomainType;
52 typedef typename FunctionSpaceType::JacobianRangeType JacobianRangeType;
53
55
56 typedef GridPartImp GridPartType;
57 typedef typename GridPartType :: GridType GridType;
58 typedef typename GridPartType :: template Codim<0> :: EntityType EntityType;
59 typedef typename GridPartType :: IntersectionType IntersectionType;
61 typedef typename GridPartType :: template Codim<0> :: IteratorType IteratorType;
63 typedef typename GridPartType :: IndexSetType IndexSetType;
64
66 };
67
68
69
70 // BasicGridFunctionAdapter
71 // ------------------------
72
75 template< class FunctionImp, class GridPartImp >
77 : public Function< typename std::decay_t< FunctionImp >::FunctionSpaceType,
78 BasicGridFunctionAdapter< FunctionImp, GridPartImp > >,
79 public HasLocalFunction
80 {
83
84 // Make sure the function is not a discrete functon
86 "FunctionType may not be a discrete function type." );
87
88 public:
91
94
96 typedef GridPartImp GridPartType;
97
100
101 // type of discrete function space
103
106
108 typedef typename DiscreteFunctionSpaceType::DomainFieldType DomainFieldType ;
110 typedef typename DiscreteFunctionSpaceType::RangeFieldType RangeFieldType ;
112 typedef typename DiscreteFunctionSpaceType::DomainType DomainType ;
114 typedef typename DiscreteFunctionSpaceType::RangeType RangeType ;
116 typedef typename DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType;
117
119 typedef typename Traits :: EntityType EntityType;
120 typedef typename Traits :: IntersectionType IntersectionType;
121
122 private:
123 class LocalFunction;
124
125 public:
128
129 // reference to function this local belongs to
131 : space_( gridPart, order ),
132 function_( std::move( f ) ),
133 name_( std::move( name ) )
134 {}
135
136 // reference to function this local belongs to
138 : space_( other.space_ ),
139 function_( other.function_ ),
140 name_( other.name_ )
141 {}
142
144 void evaluate ( const DomainType &global, RangeType &result ) const
145 {
146 function_.evaluate( global, result );
147 }
148
150 void jacobian ( const DomainType &global, JacobianRangeType &result ) const
151 {
152 function_.jacobian(global,result);
153 }
154
157 {
158 return LocalFunctionType( entity, *this );
159 }
160
162 const LocalFunctionType localFunction ( const EntityType &entity ) const
163 {
164 return LocalFunctionType( entity, *this );
165 }
166
168 const std::string &name () const
169 {
170 return name_;
171 }
172
175 {
176 return space_;
177 }
178
179 const GridPartType &gridPart () const
180 {
181 return space().gridPart();
182 }
183
185 inline int order () const
186 {
187 return space().order();
188 }
189
191 inline bool continuous () const
192 {
193 return space().continuous();
194 }
195
196 protected:
198 FunctionImp function_;
200 };
201
202
203
204 // BasicGridFunctionAdapter::LocalFunction
205 // ---------------------------------------
206
207 template< class Function, class GridPart >
209 : public EntityGeometryStorage< typename Traits::EntityType >
210 {
212 typedef LocalFunction ThisType;
214
215 public:
218
220 typedef typename FunctionSpaceType::DomainFieldType DomainFieldType;
222 typedef typename FunctionSpaceType::RangeFieldType RangeFieldType;
224 static const int dimDomain = GridPart::GridType::dimensionworld;
226 static const int dimRange = FunctionSpaceType::dimRange;
227
229 typedef typename FunctionSpaceType::DomainType DomainType;
231 typedef typename FunctionSpaceType::RangeType RangeType;
233 typedef typename FunctionSpaceType::JacobianRangeType JacobianRangeType;
235 typedef typename FunctionSpaceType::HessianRangeType HessianRangeType;
236
239 typedef typename EntityType::Geometry Geometry;
242 typedef typename EntityType::Geometry::LocalCoordinate LocalCoordinateType;
244 static const int dimLocal = LocalCoordinateType::dimension;
245
247 LocalFunction ( const EntityType &entity, const DiscreteFunctionType &df )
248 : BaseType( entity ),
249 function_( &df.function_ ),
250 order_( df.space().order() )
251 {}
252
254 : BaseType(),
255 function_( &df.function_ ),
256 order_( df.space().order() )
257 {}
258
259 using BaseType :: entity;
260 using BaseType :: geometry;
261 using BaseType :: bind;
262 using BaseType :: unbind;
263
265 LocalFunction ( const LocalFunction &other ) = default;
266
268 template< class PointType >
269 void evaluate ( const PointType &x, RangeType &ret ) const
270 {
271 auto global = geometry().global( coordinate( x ) );
272 function().evaluate( global, ret );
273 }
274 template< class PointType >
275 RangeType operator() ( const PointType &x ) const
276 {
277 RangeType ret;
278 evaluate(x,ret);
279 return ret;
280 }
281
283 template< class PointType >
284 void jacobian ( const PointType &x, JacobianRangeType &ret ) const
285 {
286 const auto &geom = geometry();
287 auto global = geom.global( coordinate( x ) );
288 function().jacobian( global, ret );
289
290 if( dimLocal != dimDomain )
291 {
292 // This computes the projection to the tangential space
293 // (i.e. the hyperplane this entity is contained in). This
294 // is done in a generic way by first projecting to the local
295 // tangential space of the reference elment, and then
296 // projecting back to the ambient space.
297
298 const auto gjt = geom.jacobianTransposed( coordinate( x ) );
299 const auto gjit = geom.jacobianInverseTransposed( coordinate( x ) );
300
302 for( auto i = 0; i < dimRange; ++i )
303 {
304 gjit.mtv( ret[ i ], tmp );
305 gjt.mtv( tmp, ret[ i ] );
306 }
307 }
308 }
309
311 template< class PointType >
312 void hessian ( const PointType &x, HessianRangeType &ret ) const
313 {
314 DUNE_THROW( NotImplemented, "Method hessian() not implemented yet" );
315 }
316
318 template < class QuadratureType, class ... Vectors >
319 void evaluateQuadrature( const QuadratureType& quadrature, Vectors& ... values ) const
320 {
321 static_assert( sizeof...( Vectors ) > 0, "evaluateQuadrature needs to be called with at least one vector." );
322 std::ignore = std::make_tuple( ( evaluateQuadratureImp( quadrature, values ), 1 ) ... );
323 }
324
325 int order () const { return order_; }
326
328 void init ( const EntityType &entity )
329 {
330 BaseType::bind( entity );
331 }
332
333 protected:
334 template < class QuadratureType, class VectorType >
335 auto evaluateQuadratureImp( const QuadratureType& quadrature, VectorType& values ) const
336 -> std::enable_if_t< std::is_same< std::decay_t< decltype(values[ 0 ] ) >, RangeType >::value >
337 {
338 for( auto qp : quadrature )
339 evaluate( qp, values[ qp.index() ] );
340 }
341
342 template < class QuadratureType, class VectorType >
343 auto evaluateQuadratureImp( const QuadratureType& quadrature, VectorType& values ) const
344 -> std::enable_if_t< std::is_same< std::decay_t< decltype(values[ 0 ] ) >, JacobianRangeType >::value >
345 {
346 for( auto qp : quadrature )
347 jacobian( qp, values[ qp.index() ] );
348 }
349
350 const FunctionType &function () const
351 {
352 return *function_;
353 }
354
357 };
358
359
360
361 // GridFunctionAdapter
362 // -------------------
363
364 template< class Function, class GridPart >
366
367
368
369 // gridFunctionAdapter
370 // -------------------
371
383 template< class Function, class GridPart >
385 gridFunctionAdapter ( std::string name, const Function &function, const GridPart &gridPart, unsigned int order )
386 {
387 return GridFunctionAdapter< Function, GridPart >( std::move( name ), function, gridPart, order );
388 }
389
400 template< class Function, class GridPart >
401 inline static GridFunctionAdapter< Function, GridPart >
402 gridFunctionAdapter ( const Function &function, const GridPart &gridPart, unsigned int order )
403 {
404 return GridFunctionAdapter< Function, GridPart >( std::string(), function, gridPart, order );
405 }
406
418 template< class Function, class GridPart >
419 inline static GridFunctionAdapter< Function, GridPart >
420 gridFunctionAdapter ( std::string name, Function &function, const GridPart &gridPart, unsigned int order )
421 {
422 const Function& cf = function;
423 return gridFunctionAdapter( name, cf, gridPart, order );
424 }
425
436 template< class Function, class GridPart >
437 inline static GridFunctionAdapter< Function, GridPart >
438 gridFunctionAdapter ( Function &function, const GridPart &gridPart, unsigned int order )
439 {
440 const Function& cf = function;
441 return gridFunctionAdapter( cf, gridPart, order );
442 }
443
455 template< class Function, class GridPart >
456 inline static BasicGridFunctionAdapter< Function, GridPart >
457 gridFunctionAdapter ( std::string name, Function &&function, const GridPart &gridPart, unsigned int order )
458 {
459 return BasicGridFunctionAdapter< Function, GridPart >( std::move( name ), std::move( function ), gridPart, order );
460 }
461
472 template< class Function, class GridPart >
473 inline static BasicGridFunctionAdapter< Function, GridPart >
474 gridFunctionAdapter ( Function &&function, const GridPart &gridPart, unsigned int order )
475 {
476 return BasicGridFunctionAdapter< Function, GridPart >( std::string(), std::move( function ), gridPart, order );
477 }
478
479
480
481 namespace
482 {
483 template <class FunctionImp,class GridPartType,bool>
484 struct ConvertDFTypeHelper;
485
486 template <class FunctionImp,class GridPartType>
487 struct ConvertDFTypeHelper<FunctionImp,GridPartType,true>
488 {
489 typedef ConvertDFTypeHelper<FunctionImp,GridPartType,true> ThisType;
491 typedef FunctionImp FunctionType;
492 typedef typename FunctionType::DiscreteFunctionSpaceType DFSType;
493 ConvertDFTypeHelper(const std::string& name,const FunctionImp& func,const GridPartType& gp) :
494 func_(func)
495 {}
496 ConvertDFTypeHelper(const ConvertDFTypeHelper& other) :
497 func_(other.func_)
498 {}
499 const FunctionType& function() const
500 {
501 return func_;
502 }
503 const DFSType& space() const
504 {
505 return func_.space();
506 }
507 private:
508 const FunctionImp& func_;
509 };
510
511 template <class FunctionImp,class GridPartType>
512 struct ConvertDFTypeHelper<FunctionImp,GridPartType,false>
513 : GridFunctionAdapter<FunctionImp,GridPartType>
514 {
515 typedef ConvertDFTypeHelper<FunctionImp,GridPartType,false> ThisType;
519 ConvertDFTypeHelper(const std::string& name,const FunctionImp& func,const GridPartType& gp) :
520 BaseType(name,func,gp)
521 {}
522 ConvertDFTypeHelper(const ConvertDFTypeHelper& other) :
523 BaseType(other)
524 {}
525 const FunctionType& function() const
526 {
527 return *this;
528 }
529 const DFSType& space() const
530 {
531 return BaseType::space();
532 }
533 };
534 }
535
536 template< class FunctionImp, class GridPartImp >
538 : public Function< typename FunctionImp::FunctionSpaceType,
539 ConvertToGridFunction< FunctionImp, GridPartImp > >,
540 public HasLocalFunction
541 {
544 static const bool hasLocalFunction = std::is_convertible< FunctionImp, HasLocalFunction >::value;
545 typedef ConvertDFTypeHelper< FunctionImp, GridPartImp, hasLocalFunction > Helper;
546 typedef typename Helper::FunctionType ConvertedType;
547
548 public:
549 typedef FunctionImp FunctionType;
550 typedef GridPartImp GridPartType;
551
553 typedef typename ConvertedType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType;
554 // type of discrete function space
555 typedef typename ConvertedType::FunctionSpaceType FunctionSpaceType;
556
558 typedef typename DiscreteFunctionSpaceType::GridType GridType;
559
561 typedef typename DiscreteFunctionSpaceType::DomainFieldType DomainFieldType ;
563 typedef typename DiscreteFunctionSpaceType::RangeFieldType RangeFieldType ;
565 typedef typename DiscreteFunctionSpaceType::DomainType DomainType ;
567 typedef typename DiscreteFunctionSpaceType::RangeType RangeType ;
569 typedef typename DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType;
570
572 typedef typename GridPartType :: template Codim<0> :: EntityType EntityType;
573
575 typedef typename ConvertedType::LocalFunctionType LocalFunctionType;
576
579 const FunctionImp &function,
580 const GridPartType &gridPart )
581 : name_( name ),
582 helper_( name, function, gridPart )
583 {}
584
586 : name_( other.name_ ),
587 helper_( other.helper_ )
588 {}
589
591 void evaluate ( const DomainType &global, RangeType &result ) const
592 {
593 helper_.function().evaluate(global,result);
594 }
595
597 const LocalFunctionType localFunction( const EntityType &entity ) const
598 {
599 return helper_.function().localFunction(entity);
600 }
601
604 {
605 return helper_.function().localFunction(entity);
606 }
607
609 const std::string &name() const
610 {
611 return name_;
612 }
613
615 {
616 return helper_.space();
617 }
618
619 private:
620 const std::string name_;
621 Helper helper_;
622 };
623
624 template< class Function, class GridPart >
625 inline ConvertToGridFunction< Function, GridPart >
627 const Function &function,
628 const GridPart &gridPart )
629 {
630 return ConvertToGridFunction< Function, GridPart >( name, function, gridPart );
631 }
632
633 } // namespace Fem
634
635} // namespace Dune
636
638
639#endif // #ifndef DUNE_DISCRETEFUNCTIONADAPTER_HH
const char * name()
virtual void operator()()=0
#define DUNE_THROW(E,...)
const GlobalIndex & global() const
FunctionSpaceType::DomainFieldType DomainFieldType
domain field type (from function space)
Definition gridfunctionadapter.hh:220
const std::string & name() const
obtain the name of the discrete function
Definition gridfunctionadapter.hh:609
GridPartType::template Codim< 0 >::IteratorType IteratorType
type of iterator
Definition gridfunctionadapter.hh:61
const LocalFunctionType localFunction(const EntityType &entity) const
Definition gridfunctionadapter.hh:162
void jacobian(const DomainType &global, JacobianRangeType &result) const
evaluate function on local coordinate local
Definition gridfunctionadapter.hh:150
GridPartImp GridPartType
Definition gridfunctionadapter.hh:550
FunctionSpaceType::RangeType RangeType
Definition gridfunctionadapter.hh:50
const std::string name_
Definition gridfunctionadapter.hh:199
FunctionSpaceType::DomainFieldType DomainFieldType
Definition gridfunctionadapter.hh:49
Traits::IntersectionType IntersectionType
Definition gridfunctionadapter.hh:120
ConvertedType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of discrete function space
Definition gridfunctionadapter.hh:553
Traits::IntersectionType IntersectionType
Definition gridfunctionadapter.hh:240
FunctionSpaceType::RangeFieldType RangeFieldType
range field type (from function space)
Definition gridfunctionadapter.hh:222
GridPartType::template Codim< 0 >::EntityType EntityType
Definition gridfunctionadapter.hh:58
BasicGridFunctionAdapter(const ThisType &other)
Definition gridfunctionadapter.hh:137
EntityType::Geometry::LocalCoordinate LocalCoordinateType
local coordinate type
Definition gridfunctionadapter.hh:242
DiscreteFunctionSpaceType::RangeFieldType RangeFieldType
range type (from function space)
Definition gridfunctionadapter.hh:110
LocalFunctionType localFunction(const EntityType &entity)
Definition gridfunctionadapter.hh:603
DiscreteFunctionSpaceType::DomainType DomainType
domain type (from function space)
Definition gridfunctionadapter.hh:112
void init(const EntityType &entity)
init local function
Definition gridfunctionadapter.hh:328
ConvertToGridFunction(const ThisType &other)
Definition gridfunctionadapter.hh:585
void evaluate(const PointType &x, RangeType &ret) const
evaluate local function
Definition gridfunctionadapter.hh:269
LocalFunction(const DiscreteFunctionType &df)
Definition gridfunctionadapter.hh:253
FunctionSpaceType::DomainType DomainType
domain type (from function space)
Definition gridfunctionadapter.hh:229
ConvertedType::FunctionSpaceType FunctionSpaceType
Definition gridfunctionadapter.hh:555
Traits::FunctionSpaceType FunctionSpaceType
function space type
Definition gridfunctionadapter.hh:217
GridPartType::IntersectionType IntersectionType
Definition gridfunctionadapter.hh:59
Traits::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of discrete function space
Definition gridfunctionadapter.hh:99
void jacobian(const PointType &x, JacobianRangeType &ret) const
jacobian of local function
Definition gridfunctionadapter.hh:284
FunctionSpaceType::RangeType RangeType
range type (from function space)
Definition gridfunctionadapter.hh:231
auto evaluateQuadratureImp(const QuadratureType &quadrature, VectorType &values) const -> std::enable_if_t< std::is_same< std::decay_t< decltype(values[0]) >, RangeType >::value >
Definition gridfunctionadapter.hh:335
LocalFunctionType localFunction(const EntityType &entity)
Definition gridfunctionadapter.hh:156
DiscreteFunctionSpaceType::RangeType RangeType
range type (from function space)
Definition gridfunctionadapter.hh:114
ConvertToGridFunction< Function, GridPart > convertToGridFunction(const std::string &name, const Function &function, const GridPart &gridPart)
Definition gridfunctionadapter.hh:626
void evaluateQuadrature(const QuadratureType &quadrature, Vectors &... values) const
evaluate function or jacobian of function for given quadrature
Definition gridfunctionadapter.hh:319
FunctionSpaceType::JacobianRangeType JacobianRangeType
jacobian type (from function space)
Definition gridfunctionadapter.hh:233
GridPartType::IndexSetType IndexSetType
type of IndexSet
Definition gridfunctionadapter.hh:63
DiscreteFunctionSpaceAdapter< FunctionSpaceType, GridPartImp > DiscreteFunctionSpaceType
Definition gridfunctionadapter.hh:54
static GridFunctionAdapter< Function, GridPart > gridFunctionAdapter(std::string name, const Function &function, const GridPart &gridPart, unsigned int order)
convert a function to a grid function
Definition gridfunctionadapter.hh:385
LocalFunction(const LocalFunction &other)=default
copy constructor
const DiscreteFunctionSpaceType & space() const
Definition gridfunctionadapter.hh:614
std::decay_t< FunctionImp > FunctionType
type of function
Definition gridfunctionadapter.hh:93
GridPartType::template Codim< 0 >::EntityType EntityType
type of codim 0 entity
Definition gridfunctionadapter.hh:572
void hessian(const PointType &x, HessianRangeType &ret) const
hessian of local function
Definition gridfunctionadapter.hh:312
DiscreteFunctionSpaceType::GridType GridType
type of grid
Definition gridfunctionadapter.hh:105
LocalFunction(const EntityType &entity, const DiscreteFunctionType &df)
constructor initializing local function
Definition gridfunctionadapter.hh:247
DiscreteFunctionSpaceType space_
Definition gridfunctionadapter.hh:197
FunctionSpaceType::RangeFieldType RangeFieldType
Definition gridfunctionadapter.hh:48
FunctionImp FunctionType
Definition gridfunctionadapter.hh:491
EntityType::Geometry Geometry
Definition gridfunctionadapter.hh:239
GridPartType::GridType GridType
Definition gridfunctionadapter.hh:57
DiscreteFunctionSpaceType::DomainType DomainType
domain type (from function space)
Definition gridfunctionadapter.hh:565
std::decay_t< FunctionImp >::FunctionSpaceType FunctionSpaceType
Definition gridfunctionadapter.hh:46
DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType
jacobian type (from function space)
Definition gridfunctionadapter.hh:569
FunctionType::DiscreteFunctionSpaceType DFSType
Definition gridfunctionadapter.hh:518
FunctionSpaceType::DomainType DomainType
Definition gridfunctionadapter.hh:51
int order() const
Definition gridfunctionadapter.hh:325
const GridPartType & gridPart() const
Definition gridfunctionadapter.hh:179
GridPartImp GridPartType
Definition gridfunctionadapter.hh:56
FunctionType::DiscreteFunctionSpaceType DFSType
Definition gridfunctionadapter.hh:492
FunctionSpaceType::JacobianRangeType JacobianRangeType
Definition gridfunctionadapter.hh:52
FunctionImp FunctionType
Definition gridfunctionadapter.hh:549
BasicGridFunctionAdapter(std::string name, FunctionImp f, const GridPartType &gridPart, unsigned int order=DiscreteFunctionSpaceType::polynomialOrder)
Definition gridfunctionadapter.hh:130
void evaluate(const DomainType &global, RangeType &result) const
evaluate function on local coordinate local
Definition gridfunctionadapter.hh:144
BasicGridFunctionAdapter< FunctionImp, GridPartImp > DiscreteFunctionType
Definition gridfunctionadapter.hh:65
const DiscreteFunctionSpaceType & space() const
obtain a reference to the corresponding DiscreteFunctionSpace
Definition gridfunctionadapter.hh:174
DiscreteFunctionSpaceType::RangeType RangeType
range type (from function space)
Definition gridfunctionadapter.hh:567
DiscreteFunctionSpaceType::RangeFieldType RangeFieldType
range type (from function space)
Definition gridfunctionadapter.hh:563
BasicGridFunctionAdapterTraits< FunctionImp, GridPartImp > Traits
type of traits
Definition gridfunctionadapter.hh:90
Traits::FunctionSpaceType FunctionSpaceType
Definition gridfunctionadapter.hh:102
const std::string & name() const
obtain the name of the discrete function
Definition gridfunctionadapter.hh:168
const LocalFunctionType localFunction(const EntityType &entity) const
Definition gridfunctionadapter.hh:597
ConvertDFTypeHelper< FunctionImp, GridPartType, false > ThisType
Definition gridfunctionadapter.hh:515
const FunctionType & function() const
Definition gridfunctionadapter.hh:350
FunctionSpaceType::HessianRangeType HessianRangeType
hessian type (from function space)
Definition gridfunctionadapter.hh:235
void evaluate(const DomainType &global, RangeType &result) const
evaluate function on local coordinate local
Definition gridfunctionadapter.hh:591
ConvertDFTypeHelper< FunctionImp, GridPartType, true > ThisType
Definition gridfunctionadapter.hh:489
DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType
jacobian type (from function space)
Definition gridfunctionadapter.hh:116
const FunctionType * function_
Definition gridfunctionadapter.hh:355
FunctionImp function_
Definition gridfunctionadapter.hh:198
BasicGridFunctionAdapter< const Function &, GridPart > GridFunctionAdapter
Definition gridfunctionadapter.hh:365
Traits::EntityType EntityType
entity type
Definition gridfunctionadapter.hh:238
BaseType FunctionType
Definition gridfunctionadapter.hh:517
GridFunctionAdapter< FunctionImp, GridPartType > BaseType
Definition gridfunctionadapter.hh:516
DiscreteFunctionSpaceType::DomainFieldType DomainFieldType
domain type (from function space)
Definition gridfunctionadapter.hh:108
bool continuous() const
return true, probably
Definition gridfunctionadapter.hh:191
ConvertedType::LocalFunctionType LocalFunctionType
type of local function to export
Definition gridfunctionadapter.hh:575
GridPartImp GridPartType
type of grid part
Definition gridfunctionadapter.hh:96
DiscreteFunctionSpaceType::GridType GridType
type of grid
Definition gridfunctionadapter.hh:558
ConvertToGridFunction(const std::string &name, const FunctionImp &function, const GridPartType &gridPart)
constructor
Definition gridfunctionadapter.hh:578
int order_
Definition gridfunctionadapter.hh:356
Traits::EntityType EntityType
type of codim 0 entity
Definition gridfunctionadapter.hh:119
int order() const
return true, probably
Definition gridfunctionadapter.hh:185
LocalFunction LocalFunctionType
type of local function to export
Definition gridfunctionadapter.hh:127
DiscreteFunctionSpaceType::DomainFieldType DomainFieldType
domain type (from function space)
Definition gridfunctionadapter.hh:561
STL namespace.
static const Point & coordinate(const Point &x)
Definition coordinate.hh:14
base class for determing whether a function has local functions or not
Definition common/discretefunction.hh:57
Abstract class representing a function.
Definition common/function.hh:50
BasicGridFunctionAdapter provides local functions for a Function.
Definition gridfunctionadapter.hh:80
traits of GridFunctionAdapter
Definition gridfunctionadapter.hh:45
Definition gridfunctionadapter.hh:210
auto evaluateQuadratureImp(const QuadratureType &quadrature, VectorType &values) const -> std::enable_if_t< std::is_same< std::decay_t< decltype(values[0]) >, JacobianRangeType >::value >
Definition gridfunctionadapter.hh:343
Definition gridfunctionadapter.hh:541
Create Obejct that behaves like a discrete function space without to provide functions with the itera...
Definition discretefunctionspace.hh:1000
bool continuous() const
returns true if the space contains only globally continuous functions
Definition discretefunctionspace.hh:1093
const GridPartType & gridPart() const
get a reference to the associated grid partition
Definition discretefunctionspace.hh:1075
int order() const
get global order of space
Definition discretefunctionspace.hh:1104
@ polynomialOrder
Definition discretefunctionspace.hh:1013
GridPartType::GridType GridType
type of the grid
Definition discretefunctionspace.hh:1016
implementation of entity and geometry storage for basis function set and local functions
Definition entitygeometry.hh:35
T make_tuple(T... args)