dune-fem 2.8.0
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
7#include <dune/common/exceptions.hh>
8
9//- local includes
10#include <dune/fem/version.hh>
13
14// for compatibility
16
17namespace Dune
18{
19
20 namespace Fem
21 {
22
37 //- forward declaration
38 template <class FunctionImp, class GridPartImp>
39 class BasicGridFunctionAdapter;
40
42 template <class FunctionImp, class GridPartImp>
44 {
45 typedef typename std::decay_t< FunctionImp >::FunctionSpaceType FunctionSpaceType;
46
47 typedef typename FunctionSpaceType::RangeFieldType RangeFieldType;
48 typedef typename FunctionSpaceType::DomainFieldType DomainFieldType;
49 typedef typename FunctionSpaceType::RangeType RangeType;
50 typedef typename FunctionSpaceType::DomainType DomainType;
51 typedef typename FunctionSpaceType::JacobianRangeType JacobianRangeType;
52
54
55 typedef GridPartImp GridPartType;
56 typedef typename GridPartType :: GridType GridType;
57 typedef typename GridPartType :: template Codim<0> :: EntityType EntityType;
58 typedef typename GridPartType :: IntersectionType IntersectionType;
60 typedef typename GridPartType :: template Codim<0> :: IteratorType IteratorType;
62 typedef typename GridPartType :: IndexSetType IndexSetType;
63
65 };
66
67
68
69 // BasicGridFunctionAdapter
70 // ------------------------
71
74 template< class FunctionImp, class GridPartImp >
76 : public Function< typename std::decay_t< FunctionImp >::FunctionSpaceType,
77 BasicGridFunctionAdapter< FunctionImp, GridPartImp > >,
78 public HasLocalFunction
79 {
82
83 // Make sure the function is not a discrete functon
84 static_assert( !(std::is_convertible< FunctionImp, HasLocalFunction >::value),
85 "FunctionType may not be a discrete function type." );
86
87 public:
90
92 typedef std::decay_t< FunctionImp > FunctionType;
93
95 typedef GridPartImp GridPartType;
96
99
100 // type of discrete function space
102
105
107 typedef typename DiscreteFunctionSpaceType::DomainFieldType DomainFieldType ;
109 typedef typename DiscreteFunctionSpaceType::RangeFieldType RangeFieldType ;
111 typedef typename DiscreteFunctionSpaceType::DomainType DomainType ;
113 typedef typename DiscreteFunctionSpaceType::RangeType RangeType ;
115 typedef typename DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType;
116
118 typedef typename Traits :: EntityType EntityType;
119 typedef typename Traits :: IntersectionType IntersectionType;
120
121 private:
122 class LocalFunction;
123
124 public:
127
128 // reference to function this local belongs to
130 : space_( gridPart, order ),
131 function_( std::move( f ) ),
132 name_( std::move( name ) )
133 {}
134
135 // reference to function this local belongs to
137 : space_( other.space_ ),
138 function_( other.function_ ),
139 name_( other.name_ )
140 {}
141
143 void evaluate ( const DomainType &global, RangeType &result ) const
144 {
145 function_.evaluate( global, result );
146 }
147
149 void jacobian ( const DomainType &global, JacobianRangeType &result ) const
150 {
151 function_.jacobian(global,result);
152 }
153
156 {
157 return LocalFunctionType( entity, *this );
158 }
159
161 const LocalFunctionType localFunction ( const EntityType &entity ) const
162 {
163 return LocalFunctionType( entity, *this );
164 }
165
167 const std::string &name () const
168 {
169 return name_;
170 }
171
174 {
175 return space_;
176 }
177
178 const GridPartType &gridPart () const
179 {
180 return space().gridPart();
181 }
182
184 inline int order () const
185 {
186 return space().order();
187 }
188
190 inline bool continuous () const
191 {
192 return space().continuous();
193 }
194
195 protected:
197 FunctionImp function_;
198 const std::string name_;
199 };
200
201
202
203 // BasicGridFunctionAdapter::LocalFunction
204 // ---------------------------------------
205
206 template< class Function, class GridPart >
208 {
209 typedef LocalFunction ThisType;
211
212 public:
215
217 typedef typename FunctionSpaceType::DomainFieldType DomainFieldType;
219 typedef typename FunctionSpaceType::RangeFieldType RangeFieldType;
221 static const int dimDomain = GridPart::GridType::dimensionworld;
223 static const int dimRange = FunctionSpaceType::dimRange;
224
226 typedef typename FunctionSpaceType::DomainType DomainType;
228 typedef typename FunctionSpaceType::RangeType RangeType;
230 typedef typename FunctionSpaceType::JacobianRangeType JacobianRangeType;
232 typedef typename FunctionSpaceType::HessianRangeType HessianRangeType;
233
238 typedef typename EntityType::Geometry::LocalCoordinate LocalCoordinateType;
240 static const int dimLocal = LocalCoordinateType::dimension;
241
243 LocalFunction ( const EntityType &entity, const DiscreteFunctionType &df )
244 : function_( &df.function_ ),
245 entity_( &entity ),
246 order_( df.space().order() )
247 {}
248
250 : function_( &df.function_ ),
251 entity_( 0 ),
252 order_( df.space().order() )
253 {}
254
256 LocalFunction ( const LocalFunction &other ) = default;
257
259 template< class PointType >
260 void evaluate ( const PointType &x, RangeType &ret ) const
261 {
262 const auto geometry = entity().geometry();
263 auto global = geometry.global( coordinate( x ) );
264 function().evaluate( global, ret );
265 }
266 template< class PointType >
267 RangeType operator() ( const PointType &x ) const
268 {
269 RangeType ret;
270 evaluate(x,ret);
271 return ret;
272 }
273
275 template< class PointType >
276 void jacobian ( const PointType &x, JacobianRangeType &ret ) const
277 {
278 const auto geometry = entity().geometry();
279 auto global = geometry.global( coordinate( x ) );
280 function().jacobian( global, ret );
281
282 if( dimLocal != dimDomain )
283 {
284 // This computes the projection to the tangential space
285 // (i.e. the hyperplane this entity is contained in). This
286 // is done in a generic way by first projecting to the local
287 // tangential space of the reference elment, and then
288 // projecting back to the ambient space.
289
290 const auto gjt = geometry.jacobianTransposed( coordinate( x ) );
291 const auto gjit = geometry.jacobianInverseTransposed( coordinate( x ) );
292
293 FieldVector< RangeFieldType, dimLocal > tmp;
294 for( auto i = 0; i < dimRange; ++i )
295 {
296 gjit.mtv( ret[ i ], tmp );
297 gjt.mtv( tmp, ret[ i ] );
298 }
299 }
300 }
301
303 template< class PointType >
304 void hessian ( const PointType &x, HessianRangeType &ret ) const
305 {
306 DUNE_THROW( NotImplemented, "Method hessian() not implemented yet" );
307 }
308
310 template < class QuadratureType, class ... Vectors >
311 void evaluateQuadrature( const QuadratureType& quadrature, Vectors& ... values ) const
312 {
313 static_assert( sizeof...( Vectors ) > 0, "evaluateQuadrature needs to be called with at least one vector." );
314 std::ignore = std::make_tuple( ( evaluateQuadratureImp( quadrature, values ), 1 ) ... );
315 }
316
317 int order () const { return order_; }
318
320 void init ( const EntityType &entity )
321 {
322 entity_ = &entity;
323 }
324
325 const EntityType &entity () const
326 {
327 assert( entity_ );
328 return *entity_;
329 }
330
331 protected:
332 template < class QuadratureType, class VectorType >
333 auto evaluateQuadratureImp( const QuadratureType& quadrature, VectorType& values ) const
334 -> std::enable_if_t< std::is_same< std::decay_t< decltype(values[ 0 ] ) >, RangeType >::value >
335 {
336 for( auto qp : quadrature )
337 evaluate( qp, values[ qp.index() ] );
338 }
339
340 template < class QuadratureType, class VectorType >
341 auto evaluateQuadratureImp( const QuadratureType& quadrature, VectorType& values ) const
342 -> std::enable_if_t< std::is_same< std::decay_t< decltype(values[ 0 ] ) >, JacobianRangeType >::value >
343 {
344 for( auto qp : quadrature )
345 jacobian( qp, values[ qp.index() ] );
346 }
347
348 const FunctionType &function () const
349 {
350 return *function_;
351 }
352
356 };
357
358
359
360 // GridFunctionAdapter
361 // -------------------
362
363 template< class Function, class GridPart >
365
366
367
368 // gridFunctionAdapter
369 // -------------------
370
382 template< class Function, class GridPart >
384 gridFunctionAdapter ( std::string name, const Function &function, const GridPart &gridPart, unsigned int order )
385 {
386 return GridFunctionAdapter< Function, GridPart >( std::move( name ), function, gridPart, order );
387 }
388
399 template< class Function, class GridPart >
400 inline static GridFunctionAdapter< Function, GridPart >
401 gridFunctionAdapter ( const Function &function, const GridPart &gridPart, unsigned int order )
402 {
403 return GridFunctionAdapter< Function, GridPart >( std::string(), function, gridPart, order );
404 }
405
417 template< class Function, class GridPart >
418 inline static GridFunctionAdapter< Function, GridPart >
419 gridFunctionAdapter ( std::string name, Function &function, const GridPart &gridPart, unsigned int order )
420 {
421 const Function& cf = function;
422 return gridFunctionAdapter( name, cf, gridPart, order );
423 }
424
435 template< class Function, class GridPart >
436 inline static GridFunctionAdapter< Function, GridPart >
437 gridFunctionAdapter ( Function &function, const GridPart &gridPart, unsigned int order )
438 {
439 const Function& cf = function;
440 return gridFunctionAdapter( cf, gridPart, order );
441 }
442
454 template< class Function, class GridPart >
455 inline static BasicGridFunctionAdapter< Function, GridPart >
456 gridFunctionAdapter ( std::string name, Function &&function, const GridPart &gridPart, unsigned int order )
457 {
458 return BasicGridFunctionAdapter< Function, GridPart >( std::move( name ), std::move( function ), gridPart, order );
459 }
460
471 template< class Function, class GridPart >
472 inline static BasicGridFunctionAdapter< Function, GridPart >
473 gridFunctionAdapter ( Function &&function, const GridPart &gridPart, unsigned int order )
474 {
475 return BasicGridFunctionAdapter< Function, GridPart >( std::string(), std::move( function ), gridPart, order );
476 }
477
478
479
480 namespace
481 {
482 template <class FunctionImp,class GridPartType,bool>
483 struct ConvertDFTypeHelper;
484
485 template <class FunctionImp,class GridPartType>
486 struct ConvertDFTypeHelper<FunctionImp,GridPartType,true>
487 {
488 typedef ConvertDFTypeHelper<FunctionImp,GridPartType,true> ThisType;
489 enum {compatible = std::is_convertible<GridPartType,typename FunctionImp::DiscreteFunctionSpaceType::GridPartType>::value};
490 typedef FunctionImp FunctionType;
491 typedef typename FunctionType::DiscreteFunctionSpaceType DFSType;
492 ConvertDFTypeHelper(const std::string& name,const FunctionImp& func,const GridPartType& gp) :
493 func_(func)
494 {}
495 ConvertDFTypeHelper(const ConvertDFTypeHelper& other) :
496 func_(other.func_)
497 {}
498 const FunctionType& function() const
499 {
500 return func_;
501 }
502 const DFSType& space() const
503 {
504 return func_.space();
505 }
506 private:
507 const FunctionImp& func_;
508 };
509
510 template <class FunctionImp,class GridPartType>
511 struct ConvertDFTypeHelper<FunctionImp,GridPartType,false>
512 : GridFunctionAdapter<FunctionImp,GridPartType>
513 {
514 typedef ConvertDFTypeHelper<FunctionImp,GridPartType,false> ThisType;
518 ConvertDFTypeHelper(const std::string& name,const FunctionImp& func,const GridPartType& gp) :
519 BaseType(name,func,gp)
520 {}
521 ConvertDFTypeHelper(const ConvertDFTypeHelper& other) :
522 BaseType(other)
523 {}
524 const FunctionType& function() const
525 {
526 return *this;
527 }
528 const DFSType& space() const
529 {
530 return BaseType::space();
531 }
532 };
533 }
534
535 template< class FunctionImp, class GridPartImp >
537 : public Function< typename FunctionImp::FunctionSpaceType,
538 ConvertToGridFunction< FunctionImp, GridPartImp > >,
539 public HasLocalFunction
540 {
543 static const bool hasLocalFunction = std::is_convertible< FunctionImp, HasLocalFunction >::value;
544 typedef ConvertDFTypeHelper< FunctionImp, GridPartImp, hasLocalFunction > Helper;
545 typedef typename Helper::FunctionType ConvertedType;
546
547 public:
548 typedef FunctionImp FunctionType;
549 typedef GridPartImp GridPartType;
550
552 typedef typename ConvertedType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType;
553 // type of discrete function space
554 typedef typename ConvertedType::FunctionSpaceType FunctionSpaceType;
555
557 typedef typename DiscreteFunctionSpaceType::GridType GridType;
558
560 typedef typename DiscreteFunctionSpaceType::DomainFieldType DomainFieldType ;
562 typedef typename DiscreteFunctionSpaceType::RangeFieldType RangeFieldType ;
564 typedef typename DiscreteFunctionSpaceType::DomainType DomainType ;
566 typedef typename DiscreteFunctionSpaceType::RangeType RangeType ;
568 typedef typename DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType;
569
571 typedef typename GridPartType :: template Codim<0> :: EntityType EntityType;
572
574 typedef typename ConvertedType::LocalFunctionType LocalFunctionType;
575
577 ConvertToGridFunction ( const std::string &name,
578 const FunctionImp &function,
579 const GridPartType &gridPart )
580 : name_( name ),
581 helper_( name, function, gridPart )
582 {}
583
585 : name_( other.name_ ),
586 helper_( other.helper_ )
587 {}
588
590 void evaluate ( const DomainType &global, RangeType &result ) const
591 {
592 helper_.function().evaluate(global,result);
593 }
594
596 const LocalFunctionType localFunction( const EntityType &entity ) const
597 {
598 return helper_.function().localFunction(entity);
599 }
600
603 {
604 return helper_.function().localFunction(entity);
605 }
606
608 const std::string &name() const
609 {
610 return name_;
611 }
612
614 {
615 return helper_.space();
616 }
617
618 private:
619 const std::string name_;
620 Helper helper_;
621 };
622
623 template< class Function, class GridPart >
624 inline ConvertToGridFunction< Function, GridPart >
625 convertToGridFunction ( const std::string &name,
626 const Function &function,
627 const GridPart &gridPart )
628 {
629 return ConvertToGridFunction< Function, GridPart >( name, function, gridPart );
630 }
631
632 } // namespace Fem
633
634} // namespace Dune
635
637
638#endif // #ifndef DUNE_DISCRETEFUNCTIONADAPTER_HH
FunctionSpaceType::DomainFieldType DomainFieldType
domain field type (from function space)
Definition: gridfunctionadapter.hh:217
const std::string & name() const
obtain the name of the discrete function
Definition: gridfunctionadapter.hh:608
GridPartType::template Codim< 0 >::IteratorType IteratorType
type of iterator
Definition: gridfunctionadapter.hh:60
const LocalFunctionType localFunction(const EntityType &entity) const
Definition: gridfunctionadapter.hh:161
void jacobian(const DomainType &global, JacobianRangeType &result) const
evaluate function on local coordinate local
Definition: gridfunctionadapter.hh:149
GridPartImp GridPartType
Definition: gridfunctionadapter.hh:549
FunctionSpaceType::RangeType RangeType
Definition: gridfunctionadapter.hh:49
const std::string name_
Definition: gridfunctionadapter.hh:198
FunctionSpaceType::DomainFieldType DomainFieldType
Definition: gridfunctionadapter.hh:48
Traits::IntersectionType IntersectionType
Definition: gridfunctionadapter.hh:119
ConvertedType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of discrete function space
Definition: gridfunctionadapter.hh:552
Traits::IntersectionType IntersectionType
Definition: gridfunctionadapter.hh:236
FunctionSpaceType::RangeFieldType RangeFieldType
range field type (from function space)
Definition: gridfunctionadapter.hh:219
GridPartType::template Codim< 0 >::EntityType EntityType
Definition: gridfunctionadapter.hh:57
BasicGridFunctionAdapter(const ThisType &other)
Definition: gridfunctionadapter.hh:136
EntityType::Geometry::LocalCoordinate LocalCoordinateType
local coordinate type
Definition: gridfunctionadapter.hh:238
DiscreteFunctionSpaceType::RangeFieldType RangeFieldType
range type (from function space)
Definition: gridfunctionadapter.hh:109
LocalFunctionType localFunction(const EntityType &entity)
Definition: gridfunctionadapter.hh:602
DiscreteFunctionSpaceType::DomainType DomainType
domain type (from function space)
Definition: gridfunctionadapter.hh:111
void init(const EntityType &entity)
init local function
Definition: gridfunctionadapter.hh:320
ConvertToGridFunction(const ThisType &other)
Definition: gridfunctionadapter.hh:584
void evaluate(const PointType &x, RangeType &ret) const
evaluate local function
Definition: gridfunctionadapter.hh:260
LocalFunction(const DiscreteFunctionType &df)
Definition: gridfunctionadapter.hh:249
FunctionSpaceType::DomainType DomainType
domain type (from function space)
Definition: gridfunctionadapter.hh:226
ConvertedType::FunctionSpaceType FunctionSpaceType
Definition: gridfunctionadapter.hh:554
Traits::FunctionSpaceType FunctionSpaceType
function space type
Definition: gridfunctionadapter.hh:214
GridPartType::IntersectionType IntersectionType
Definition: gridfunctionadapter.hh:58
Traits::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of discrete function space
Definition: gridfunctionadapter.hh:98
void jacobian(const PointType &x, JacobianRangeType &ret) const
jacobian of local function
Definition: gridfunctionadapter.hh:276
FunctionSpaceType::RangeType RangeType
range type (from function space)
Definition: gridfunctionadapter.hh:228
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:333
LocalFunctionType localFunction(const EntityType &entity)
Definition: gridfunctionadapter.hh:155
DiscreteFunctionSpaceType::RangeType RangeType
range type (from function space)
Definition: gridfunctionadapter.hh:113
const EntityType * entity_
Definition: gridfunctionadapter.hh:354
ConvertToGridFunction< Function, GridPart > convertToGridFunction(const std::string &name, const Function &function, const GridPart &gridPart)
Definition: gridfunctionadapter.hh:625
void evaluateQuadrature(const QuadratureType &quadrature, Vectors &... values) const
evaluate function or jacobian of function for given quadrature
Definition: gridfunctionadapter.hh:311
FunctionSpaceType::JacobianRangeType JacobianRangeType
jacobian type (from function space)
Definition: gridfunctionadapter.hh:230
GridPartType::IndexSetType IndexSetType
type of IndexSet
Definition: gridfunctionadapter.hh:62
DiscreteFunctionSpaceAdapter< FunctionSpaceType, GridPartImp > DiscreteFunctionSpaceType
Definition: gridfunctionadapter.hh:53
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:384
LocalFunction(const LocalFunction &other)=default
copy constructor
const DiscreteFunctionSpaceType & space() const
Definition: gridfunctionadapter.hh:613
std::decay_t< FunctionImp > FunctionType
type of function
Definition: gridfunctionadapter.hh:92
GridPartType::template Codim< 0 >::EntityType EntityType
type of codim 0 entity
Definition: gridfunctionadapter.hh:571
void hessian(const PointType &x, HessianRangeType &ret) const
hessian of local function
Definition: gridfunctionadapter.hh:304
DiscreteFunctionSpaceType::GridType GridType
type of grid
Definition: gridfunctionadapter.hh:104
LocalFunction(const EntityType &entity, const DiscreteFunctionType &df)
constructor initializing local function
Definition: gridfunctionadapter.hh:243
DiscreteFunctionSpaceType space_
Definition: gridfunctionadapter.hh:196
FunctionSpaceType::RangeFieldType RangeFieldType
Definition: gridfunctionadapter.hh:47
FunctionImp FunctionType
Definition: gridfunctionadapter.hh:490
GridPartType::GridType GridType
Definition: gridfunctionadapter.hh:56
DiscreteFunctionSpaceType::DomainType DomainType
domain type (from function space)
Definition: gridfunctionadapter.hh:564
std::decay_t< FunctionImp >::FunctionSpaceType FunctionSpaceType
Definition: gridfunctionadapter.hh:45
DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType
jacobian type (from function space)
Definition: gridfunctionadapter.hh:568
FunctionType::DiscreteFunctionSpaceType DFSType
Definition: gridfunctionadapter.hh:517
FunctionSpaceType::DomainType DomainType
Definition: gridfunctionadapter.hh:50
int order() const
Definition: gridfunctionadapter.hh:317
const GridPartType & gridPart() const
Definition: gridfunctionadapter.hh:178
GridPartImp GridPartType
Definition: gridfunctionadapter.hh:55
FunctionType::DiscreteFunctionSpaceType DFSType
Definition: gridfunctionadapter.hh:491
FunctionSpaceType::JacobianRangeType JacobianRangeType
Definition: gridfunctionadapter.hh:51
FunctionImp FunctionType
Definition: gridfunctionadapter.hh:548
BasicGridFunctionAdapter(std::string name, FunctionImp f, const GridPartType &gridPart, unsigned int order=DiscreteFunctionSpaceType::polynomialOrder)
Definition: gridfunctionadapter.hh:129
void evaluate(const DomainType &global, RangeType &result) const
evaluate function on local coordinate local
Definition: gridfunctionadapter.hh:143
BasicGridFunctionAdapter< FunctionImp, GridPartImp > DiscreteFunctionType
Definition: gridfunctionadapter.hh:64
const DiscreteFunctionSpaceType & space() const
obtain a reference to the corresponding DiscreteFunctionSpace
Definition: gridfunctionadapter.hh:173
DiscreteFunctionSpaceType::RangeType RangeType
range type (from function space)
Definition: gridfunctionadapter.hh:566
DiscreteFunctionSpaceType::RangeFieldType RangeFieldType
range type (from function space)
Definition: gridfunctionadapter.hh:562
BasicGridFunctionAdapterTraits< FunctionImp, GridPartImp > Traits
type of traits
Definition: gridfunctionadapter.hh:89
Traits::FunctionSpaceType FunctionSpaceType
Definition: gridfunctionadapter.hh:101
const std::string & name() const
obtain the name of the discrete function
Definition: gridfunctionadapter.hh:167
const LocalFunctionType localFunction(const EntityType &entity) const
Definition: gridfunctionadapter.hh:596
ConvertDFTypeHelper< FunctionImp, GridPartType, false > ThisType
Definition: gridfunctionadapter.hh:514
const EntityType & entity() const
Definition: gridfunctionadapter.hh:325
const FunctionType & function() const
Definition: gridfunctionadapter.hh:348
FunctionSpaceType::HessianRangeType HessianRangeType
hessian type (from function space)
Definition: gridfunctionadapter.hh:232
void evaluate(const DomainType &global, RangeType &result) const
evaluate function on local coordinate local
Definition: gridfunctionadapter.hh:590
ConvertDFTypeHelper< FunctionImp, GridPartType, true > ThisType
Definition: gridfunctionadapter.hh:488
DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType
jacobian type (from function space)
Definition: gridfunctionadapter.hh:115
const FunctionType * function_
Definition: gridfunctionadapter.hh:353
FunctionImp function_
Definition: gridfunctionadapter.hh:197
BasicGridFunctionAdapter< const Function &, GridPart > GridFunctionAdapter
Definition: gridfunctionadapter.hh:364
Traits::EntityType EntityType
entity type
Definition: gridfunctionadapter.hh:235
BaseType FunctionType
Definition: gridfunctionadapter.hh:516
GridFunctionAdapter< FunctionImp, GridPartType > BaseType
Definition: gridfunctionadapter.hh:515
DiscreteFunctionSpaceType::DomainFieldType DomainFieldType
domain type (from function space)
Definition: gridfunctionadapter.hh:107
bool continuous() const
return true, probably
Definition: gridfunctionadapter.hh:190
ConvertedType::LocalFunctionType LocalFunctionType
type of local function to export
Definition: gridfunctionadapter.hh:574
GridPartImp GridPartType
type of grid part
Definition: gridfunctionadapter.hh:95
DiscreteFunctionSpaceType::GridType GridType
type of grid
Definition: gridfunctionadapter.hh:557
ConvertToGridFunction(const std::string &name, const FunctionImp &function, const GridPartType &gridPart)
constructor
Definition: gridfunctionadapter.hh:577
int order_
Definition: gridfunctionadapter.hh:355
Traits::EntityType EntityType
type of codim 0 entity
Definition: gridfunctionadapter.hh:118
int order() const
return true, probably
Definition: gridfunctionadapter.hh:184
LocalFunction LocalFunctionType
type of local function to export
Definition: gridfunctionadapter.hh:126
DiscreteFunctionSpaceType::DomainFieldType DomainFieldType
domain type (from function space)
Definition: gridfunctionadapter.hh:560
STL namespace.
Definition: bindguard.hh:11
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
virtual void operator()(const DomainType &arg, RangeType &dest) const
application operator call evaluate
Definition: common/function.hh:97
BasicGridFunctionAdapter provides local functions for a Function.
Definition: gridfunctionadapter.hh:79
traits of GridFunctionAdapter
Definition: gridfunctionadapter.hh:44
Definition: gridfunctionadapter.hh:208
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:341
Definition: gridfunctionadapter.hh:540
Create Obejct that behaves like a discrete function space without to provide functions with the itera...
Definition: discretefunctionspace.hh:959
@ polynomialOrder
Definition: discretefunctionspace.hh:972
bool continuous() const
returns true if the space contains only globally continuous functions
Definition: discretefunctionspace.hh:1052
const GridPartType & gridPart() const
get a reference to the associated grid partition
Definition: discretefunctionspace.hh:1034
int order() const
get global order of space
Definition: discretefunctionspace.hh:1063
GridPartType::GridType GridType
type of the grid
Definition: discretefunctionspace.hh:975