DUNE-FEM (unstable)

const.hh
1#ifndef DUNE_FEM_FUNCTION_LOCALFUNCTION_CONST_HH
2#define DUNE_FEM_FUNCTION_LOCALFUNCTION_CONST_HH
3
4#include <algorithm>
5#include <type_traits>
6#include <utility>
7
9
10#include <dune/fem/misc/mpimanager.hh>
11#include <dune/fem/function/localfunction/mutable.hh>
12#include <dune/fem/function/localfunction/localfunction.hh>
13#include <dune/fem/common/intersectionside.hh>
14
15namespace Dune
16{
17
18 namespace Fem
19 {
20
21 // External Forward Declerations
22 // -----------------------------
23
24 template< class >
25 struct DiscreteFunctionTraits;
26
27 class HasLocalFunction;
28 class IsDiscreteFunction;
29 struct BindableFunction;
30
31 // BasicConstLocalFunction
32 // -----------------------
33
34 template < class BasisFunctionSet, class LocalDofVector >
35 class BasicConstLocalFunction
36 : public LocalFunction< BasisFunctionSet, LocalDofVector >
37 {
38 typedef BasicConstLocalFunction< BasisFunctionSet, LocalDofVector > ThisType;
39 typedef LocalFunction< BasisFunctionSet, LocalDofVector > BaseType;
40
41 public:
43 typedef typename BaseType::DofType DofType;
44
46 typedef typename BaseType :: EntityType EntityType;
47
49 typedef typename BaseType :: BasisFunctionSetType BasisFunctionSetType;
50
52 typedef typename BaseType :: LocalDofVectorType LocalDofVectorType;
53
55 typedef typename BaseType::SizeType SizeType;
56
58 BasicConstLocalFunction () {}
59
60 explicit BasicConstLocalFunction ( const BasisFunctionSetType & basisFunctionSet ) : BaseType( basisFunctionSet ) {}
61
62 explicit BasicConstLocalFunction ( const LocalDofVectorType &localDofVector ) : BaseType( localDofVector ) {}
63
64 BasicConstLocalFunction ( const BasisFunctionSetType &basisFunctionSet, const LocalDofVectorType &localDofVector )
65 : BaseType( basisFunctionSet, localDofVector )
66 {}
67
68 explicit BasicConstLocalFunction ( LocalDofVectorType &&localDofVector ) : BaseType( localDofVector ) {}
69
70 BasicConstLocalFunction ( const BasisFunctionSetType &basisFunctionSet, LocalDofVectorType &&localDofVector )
71 : BaseType( basisFunctionSet, localDofVector )
72 {}
73
74 BasicConstLocalFunction ( const BaseType &other ) : BaseType( other ) {}
75
76 BasicConstLocalFunction ( const ThisType &other ) : BaseType( static_cast<const BaseType &>( other ) ) {}
77 BasicConstLocalFunction ( ThisType && other ) : BaseType( static_cast<BaseType&&>(other) ) {}
78
79 const DofType &operator[] ( SizeType i ) const { return static_cast< const BaseType & >( *this )[ i ]; }
80 const DofType &operator[] ( SizeType i ) { return static_cast< const BaseType & >( *this )[ i ]; }
81
83
84 protected:
85 using BaseType::clear;
86 using BaseType::assign;
87 using BaseType::operator +=;
88 using BaseType::operator -=;
89 using BaseType::axpy;
90 };
91
109 template< class DiscreteFunction >
111 : public BasicConstLocalFunction<
112 typename DiscreteFunctionTraits< std::remove_const_t< DiscreteFunction > >::DiscreteFunctionSpaceType::BasisFunctionSetType,
113 Dune::DynamicVector< typename DiscreteFunctionTraits< std::remove_const_t< DiscreteFunction > >::DofType,
114 typename DiscreteFunctionTraits< std::remove_const_t< DiscreteFunction > >::LocalDofVectorAllocatorType
115 :: template rebind< typename DiscreteFunctionTraits< std::remove_const_t< DiscreteFunction > > ::DofType > ::other > >
116 {
118 typedef BasicConstLocalFunction< typename DiscreteFunctionTraits< std::remove_const_t< DiscreteFunction > >::DiscreteFunctionSpaceType::BasisFunctionSetType,
120 typename DiscreteFunctionTraits< std::remove_const_t< DiscreteFunction > > :: LocalDofVectorAllocatorType
121 :: template rebind< typename DiscreteFunctionTraits< std::remove_const_t< DiscreteFunction > >::DofType >::other > >
122 BaseType;
123
124 public:
125 typedef std::remove_const_t< DiscreteFunction > DiscreteFunctionType;
126 typedef typename DiscreteFunctionType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType;
127 typedef typename DiscreteFunctionSpaceType::GridPartType GridPartType;
128 typedef typename DiscreteFunctionSpaceType::FunctionSpaceType FunctionSpaceType;
129
130 typedef DiscreteFunctionType GridFunctionType;
131
132 typedef typename BaseType::DofType DofType;
133 typedef typename BaseType::EntityType EntityType;
134 typedef typename GridPartType::IntersectionType IntersectionType;
136 typedef typename BaseType::LocalDofVectorType LocalDofVectorType;
137 typedef typename BaseType::DomainType DomainType;
138 typedef typename BaseType::RangeType RangeType;
139 typedef typename BaseType::JacobianRangeType JacobianRangeType;
141
155 explicit ConstLocalDiscreteFunction ( const DiscreteFunctionType &df )
156 : BaseType( LocalDofVectorType( df.localDofVectorAllocator() ) )
157 , discreteFunction_( &df )
158#ifdef TESTTHREADING
159 , thread_(-1)
160#endif
161 {}
162
165 : BaseType( localFunction.basisFunctionSet(), LocalDofVectorType( localFunction.size(), localFunction.discreteFunction().localDofVectorAllocator() ) )
166 , discreteFunction_( &localFunction.discreteFunction() )
167#ifdef TESTTHREADING
168 , thread_(-1)
169#endif
170 {
171 std::copy( localFunction.localDofVector().begin(), localFunction.localDofVector().end(), localDofVector().begin() );
172 }
173
187 ConstLocalDiscreteFunction ( const DiscreteFunctionType &df, const EntityType &entity )
188 : BaseType( df.space().basisFunctionSet( entity ), LocalDofVectorType( df.localDofVectorAllocator() ) )
189 , discreteFunction_( &df )
190#ifdef TESTTHREADING
191 , thread_(-1)
192#endif
193 {
194 discreteFunction().getLocalDofs( entity, localDofVector() );
195 }
196 ConstLocalDiscreteFunction ( const EntityType &entity, const DiscreteFunctionType &df )
197 : BaseType( df.space().basisFunctionSet( entity ), LocalDofVectorType( df.localDofVectorAllocator() ) )
198 , discreteFunction_( &df )
199#ifdef TESTTHREADING
200 , thread_(-1)
201#endif
202 {
203 discreteFunction().getLocalDofs( entity, localDofVector() );
204 }
205
207 ConstLocalDiscreteFunction ( const ThisType &other )
208 : BaseType( static_cast<const BaseType &>( other ) )
209 , discreteFunction_( other.discreteFunction_ )
210#ifdef TESTTHREADING
211 , thread_(-1)
212#endif
213 {}
214
216 ConstLocalDiscreteFunction ( ThisType &&other )
217 : BaseType( static_cast< BaseType &&>( other ) )
218 , discreteFunction_( other.discreteFunction_ )
219#ifdef TESTTHREADING
220 , thread_(-1)
221#endif
222 {}
223
224 using BaseType::localDofVector;
225
226 using BaseType::evaluate;
227 using BaseType::jacobian;
228 using BaseType::hessian;
229
235 template< class Point >
236 RangeType evaluate ( const Point &p ) const
237 {
238 RangeType val;
239 evaluate( p, val );
240 return val;
241 }
242
251 template< class Point >
252 JacobianRangeType jacobian ( const Point &p ) const
253 {
254 JacobianRangeType jac;
255 jacobian( p, jac );
256 return jac;
257 }
258
267 template< class Point >
268 HessianRangeType hessian ( const Point &p ) const
269 {
271 hessian( p, h );
272 return h;
273 }
274
276 void init ( const EntityType &entity )
277 {
278#ifdef TESTTHREADING
279 if (thread_ == -1) thread_ = MPIManager::thread();
280 if (thread_ != MPIManager::thread())
281 {
282 std::cout << "wrong thread number\n";
283 assert(0);
284 std::abort();
285 }
286#endif
287 BaseType::init( discreteFunction().space().basisFunctionSet( entity ) );
288 discreteFunction().getLocalDofs( entity, localDofVector() );
289 }
290
291 void bind ( const EntityType &entity ) { init( entity ); }
292 void unbind ()
293 {
294#ifdef TESTTHREADING
295 if (thread_ != MPIManager::thread())
296 {
297 std::cout << "wrong thread number\n";
298 assert(0);
299 std::abort();
300 }
301#endif
302 }
303 void bind(const IntersectionType &intersection, IntersectionSide side)
304 {
305 // store local copy to avoid problems with casting to temporary types
306 const EntityType entity = side==IntersectionSide::in? intersection.inside(): intersection.outside();
307 bind( entity );
308 }
309
310 const DiscreteFunctionType &discreteFunction() const { return *discreteFunction_; }
311 const GridFunctionType &gridFunction() const { return discreteFunction(); }
312
313 protected:
314 const DiscreteFunctionType* discreteFunction_;
315#ifdef TESTTHREADING
316 int thread_;
317#endif
318 };
319
320
321
322 // ConstLocalFunction
323 // ------------------
324
325 namespace Impl
326 {
327
328 template< class GF, class = void >
329 struct ConstLocalFunction;
330
331 template< class GF >
332 struct ConstLocalFunction< GF, std::enable_if_t< std::is_base_of< Fem::HasLocalFunction, GF >::value && std::is_base_of< Fem::IsDiscreteFunction, GF >::value > >
333 {
334 typedef ConstLocalDiscreteFunction< GF > Type;
335 };
336
337 template< class GF >
338 struct ConstLocalFunction< GF, std::enable_if_t< std::is_base_of< Fem::HasLocalFunction, GF >::value && !std::is_base_of< Fem::IsDiscreteFunction, GF >::value && std::is_class< typename GF::LocalFunctionType >::value > >
339 {
340 struct Type
341 : public GF::LocalFunctionType
342 {
343 typedef GF GridFunctionType;
344 typedef typename GridFunctionType::LocalFunctionType::EntityType EntityType;
345
346 typedef typename GF::LocalFunctionType::DomainType DomainType;
347 typedef typename GF::LocalFunctionType::RangeType RangeType;
348 typedef typename GF::LocalFunctionType::JacobianRangeType JacobianRangeType;
349 typedef typename GF::LocalFunctionType::HessianRangeType HessianRangeType;
350
351 explicit Type ( const GridFunctionType &gridFunction )
352 : GridFunctionType::LocalFunctionType( gridFunction ),
353 gridFunction_( gridFunction ) {}
354 explicit Type ( const EntityType &entity, const GridFunctionType &gridFunction )
355 : GridFunctionType::LocalFunctionType( gridFunction ),
356 gridFunction_( gridFunction )
357 { bind(entity); }
358
359 using GF::LocalFunctionType::evaluate;
360 using GF::LocalFunctionType::jacobian;
361 using GF::LocalFunctionType::hessian;
362 using GF::LocalFunctionType::init;
363 using GF::LocalFunctionType::entity;
364 using GF::LocalFunctionType::geometry;
365
367 template< class Point >
368 RangeType evaluate ( const Point &p ) const
369 {
370 RangeType val;
371 evaluate( p, val );
372 return val;
373 }
374
376 template< class Point >
377 JacobianRangeType jacobian ( const Point &p ) const
378 {
379 JacobianRangeType jac;
380 jacobian( p, jac );
381 return jac;
382 }
383
385 template< class Point >
386 HessianRangeType hessian ( const Point &p ) const
387 {
388 HessianRangeType h;
389 hessian( p, h );
390 return h;
391 }
392
393 void bind ( const EntityType &entity ) { init( entity ); }
394 void unbind () {}
395 template <class IntersectionType>
396 void bind(const IntersectionType &intersection, IntersectionSide side)
397 {
398 // store local copy to avoid problems with casting to temporary types
399 const EntityType entity = side==IntersectionSide::in? intersection.inside(): intersection.outside();
400 bind( entity );
401 }
402
403 const GridFunctionType &gridFunction () const { return gridFunction_; }
404
405 private:
406 const GridFunctionType &gridFunction_;
407 };
408 };
409
410 template< class GF >
411 struct ConstLocalFunction< GF, std::enable_if_t< std::is_base_of< Fem::BindableFunction, std::decay_t<GF> >::value && !std::is_base_of< Fem::IsDiscreteFunction, std::decay_t<GF> >::value > >
412 {
413 static_assert( !std::is_reference<GF>::value );
414 struct Type
415 {
416 typedef GF GridFunctionType;
417 typedef std::decay_t<GF> GridFunctionDecayType;
418 typedef typename GridFunctionDecayType::GridPartType GridPartType;
419 typedef typename GridFunctionDecayType::EntityType EntityType;
420 typedef typename EntityType::Geometry Geometry;
421 typedef typename GridFunctionDecayType::RangeFieldType RangeFieldType;
422 typedef typename GridFunctionDecayType::DomainType DomainType;
423 typedef typename GridFunctionDecayType::RangeType RangeType;
424 typedef typename GridFunctionDecayType::JacobianRangeType JacobianRangeType;
425 typedef typename GridFunctionDecayType::HessianRangeType HessianRangeType;
426 typedef typename GridFunctionDecayType::FunctionSpaceType FunctionSpaceType;
427
428 template<class Arg, std::enable_if_t<std::is_constructible<GF, Arg>::value, int> = 0>
429 explicit Type ( Arg&& gridFunction )
430 : gridFunction_( std::forward<Arg>(gridFunction) )
431#ifdef TESTTHREADING
432 , thread_(-1)
433#endif
434 {
435 // if (MPIManager::thread()==0 || MPIManager::thread()==1) std::cout << "[" << MPIManager::thread() << "]: CLF " << &gridFunction_ << std::endl;
436 }
437 template<class Arg, std::enable_if_t<std::is_constructible<GF, Arg>::value, int> = 0>
438 explicit Type ( const EntityType &entity, Arg&& gridFunction )
439 : gridFunction_( std::forward<Arg>(gridFunction) )
440#ifdef TESTTHREADING
441 , thread_(-1)
442#endif
443 {
444 bind(entity);
445 }
446
447 template <class Point>
448 void evaluate(const Point &x, RangeType &ret) const
449 {
450 gridFunction().evaluate(x,ret);
451 }
452 template <class Point>
453 void jacobian(const Point &x, JacobianRangeType &ret) const
454 {
455 gridFunction().jacobian(x,ret);
456 }
457 template <class Point>
458 void hessian(const Point &x, HessianRangeType &ret) const
459 {
460 gridFunction().hessian(x,ret);
461 }
462 unsigned int order() const { return gridFunction().order(); }
463
465 template< class Point >
466 RangeType evaluate ( const Point &p ) const
467 {
468 RangeType val;
469 evaluate( p, val );
470 return val;
471 }
472
474 template< class Point >
475 JacobianRangeType jacobian ( const Point &p ) const
476 {
477 JacobianRangeType jac;
478 jacobian( p, jac );
479 return jac;
480 }
481
483 template< class Point >
484 HessianRangeType hessian ( const Point &p ) const
485 {
486 HessianRangeType h;
487 hessian( p, h );
488 return h;
489 }
490
491 template< class Quadrature, class ... Vectors >
492 void evaluateQuadrature ( const Quadrature &quad, Vectors & ... values ) const
493 {
494 static_assert( sizeof...( Vectors ) > 0, "evaluateQuadrature needs to be called with at least one vector." );
495 evaluateFullQuadrature( PriorityTag<42>(), quad, values... );
496 }
497 template< class Quadrature, class Jacobians >
498 void jacobianQuadrature ( const Quadrature &quadrature, Jacobians &jacobians ) const
499 { jacobianQuadrature(quadrature,jacobians, PriorityTag<42>() ); }
500 template< class Quadrature, class Hessians >
501 void hessianQuadrature ( const Quadrature &quadrature, Hessians &hessians ) const
502 { hessianQuadrature(quadrature,hessians, PriorityTag<42>() ); }
503
504 void bind ( const EntityType &entity )
505 {
506#ifdef TESTTHREADING
507 if (thread_ == -1) thread_ = MPIManager::thread();
508 if (thread_ != MPIManager::thread())
509 {
510 std::cout << "wrong thread number\n";
511 assert(0);
512 std::abort();
513 }
514#endif
515 gridFunction_.bind( entity );
516 }
517 void unbind ()
518 {
519#ifdef TESTTHREADING
520 if (thread_ != MPIManager::thread())
521 {
522 std::cout << "wrong thread number\n";
523 assert(0);
524 std::abort();
525 }
526#endif
527 gridFunction_.unbind();
528 }
529 template <class IntersectionType>
530 void bind(const IntersectionType &intersection, IntersectionSide side)
531 {
532#ifdef TESTTHREADING
533 if (thread_ == -1) thread_ = MPIManager::thread();
534 if (thread_ != MPIManager::thread())
535 {
536 std::cout << "wrong thread number\n";
537 assert(0);
538 std::abort();
539 }
540#endif
541 defaultIntersectionBind(gridFunction_,intersection, side);
542 }
543
544 const EntityType& entity() const
545 {
546 return gridFunction_.entity();
547 }
548
549 const Geometry& geometry () const
550 {
551 return gridFunction_.geometry();
552 }
553
554 const GridFunctionDecayType &gridFunction () const { return gridFunction_; }
555
556 private:
557 template< class Quadrature, class ... Vectors, class GF_=GridFunctionDecayType >
558 auto evaluateFullQuadrature ( PriorityTag<1>, const Quadrature &quad, Vectors & ... values ) const
559 -> std::enable_if_t< std::is_void< decltype( std::declval< const GF_& >().evaluateQuadrature(quad,values...))>::value >
560 { gridFunction().evaluateQuadrature(quad,values...); }
561 template< class Quadrature, class ... Vectors >
562 void evaluateFullQuadrature ( PriorityTag<0>, const Quadrature &quad, Vectors & ... values ) const
563 { std::ignore = std::make_tuple( ( evaluateSingleQuadrature( quad, values ), 1 ) ... ); }
564
565 template< class Quadrature, class Jacobians, class GF_=GridFunctionDecayType>
566 auto jacobianQuadrature ( const Quadrature &quadrature, Jacobians &jacobians, PriorityTag<1> ) const
567 -> std::enable_if_t< std::is_void< decltype( std::declval< const GF_& >().jacobianQuadrature(quadrature,jacobians))>::value >
568 { gridFunction().jacobianQuadrature(quadrature,jacobians); }
569 template< class Quadrature, class Jacobians >
570 void jacobianQuadrature ( const Quadrature &quadrature, Jacobians &jacobians, PriorityTag<0> ) const
571 {
572 for( const auto qp : quadrature )
573 jacobians[ qp.index() ] = jacobian( qp );
574 }
575
576 template< class Quadrature, class Hessians, class GF_=GridFunctionDecayType >
577 auto hessianQuadrature ( const Quadrature &quadrature, Hessians &hessians, PriorityTag<1> ) const
578 -> std::enable_if_t< std::is_void< decltype( std::declval< const GF_& >().hessianQuadrature(quadrature,hessians))>::value >
579 { gridFunction().hessianQuadrature(quadrature,hessians); }
580 template< class Quadrature, class Hessians >
581 void hessianQuadrature ( const Quadrature &quadrature, Hessians &hessians, PriorityTag<0> ) const
582 {
583 for( const auto qp : quadrature )
584 hessians[ qp.index() ] = hessian( qp );
585 }
586
587 template< class Quadrature, class Vector >
588 auto evaluateSingleQuadrature ( const Quadrature &quad, Vector &v ) const
589 -> std::enable_if_t< std::is_same< std::decay_t< decltype(v[ 0 ]) >, RangeType >::value >
590 {
591 for( const auto qp : quad )
592 v[ qp.index() ] = evaluate( qp );
593 }
594 template< class Quadrature, class Vector >
595 auto evaluateSingleQuadrature ( const Quadrature &quad, Vector &v ) const
596 -> std::enable_if_t< std::is_same< std::decay_t< decltype(v[ 0 ]) >, JacobianRangeType >::value >
597 { jacobianQuadrature(quad,v); }
598 template< class Quadrature, class Vector >
599 auto evaluateSingleQuadrature ( const Quadrature &quad, Vector &v ) const
600 -> std::enable_if_t< std::is_same< std::decay_t< decltype(v[ 0 ]) >, HessianRangeType >::value >
601 { hessianQuadrature(quad,v); }
602
603 GridFunctionType gridFunction_;
604#ifdef TESTTHREADING
605 int thread_;
606#endif
607 };
608 };
609 } // namespace Impl
610
611
612 template< class GridFunction >
613 using ConstLocalFunction = typename Impl::ConstLocalFunction< GridFunction >::Type;
615 template<class T, class SFINAE = void>
617 : std::false_type
618 {};
619
621 template<class T>
622 struct IsConstLocalFunction<T, std::enable_if_t<!std::is_same<T, std::decay_t<T> >{}> >
623 : IsConstLocalFunction<std::decay_t<T> >
624 {};
625
627 template<class T>
629 T,
630 std::enable_if_t<(std::is_same<T, std::decay_t<T> >{}
631 && std::is_same<T, Fem::ConstLocalFunction<typename T::GridFunctionType> >{}
632 )> >
633 : std::true_type
634 {};
635
636
640 template<class F, std::enable_if_t<!IsConstLocalFunction<F>::value, int> = 0>
641 constexpr auto constLocalFunction(F&& f)
642 {
643 return Fem::ConstLocalFunction<std::decay_t<F> >(std::forward<F>(f));
644 }
645
647 template<class F, std::enable_if_t<IsConstLocalFunction<F>::value, int> = 0>
648 constexpr decltype(auto) constLocalFunction(F&& f)
649 {
650 return std::forward<F>(f);
651 }
652
653 template<class F, class Entity>
654 constexpr auto constLocalFunction(F&& f, const Entity &entity)
655 {
656 return Dune::Fem::ConstLocalFunction<std::decay_t<F> >(entity,std::forward<F>(f));
657 }
658
659 } // namespace Fem
660
661} // namespace Dune
662
663#endif // #ifndef DUNE_FEM_FUNCTION_LOCALFUNCTION_CONST_HH
Iterator begin()
begin iterator
Definition: densevector.hh:347
Construct a vector with a dynamic size.
Definition: dynvector.hh:59
Wrapper class for entities.
Definition: entity.hh:66
IntersectionIteratorType::Intersection IntersectionType
type of intersection
Definition: adaptiveleafgridpart.hh:95
Interface class for basis function sets.
Definition: basisfunctionset.hh:32
A constant local function carrying values for one entity.
Definition: const.hh:116
const LocalDofVectorType & localDofVector() const
return const reference to local Dof Vector
Definition: localfunction.hh:424
ConstLocalDiscreteFunction(ThisType &&other)
move constructor
Definition: const.hh:216
ConstLocalDiscreteFunction(const DiscreteFunctionType &df)
constructor creating a local function without binding it to an entity
Definition: const.hh:155
RangeType evaluate(const Point &p) const
evaluate the local function
Definition: const.hh:236
void init(const EntityType &entity)
interface for local functions :: init
Definition: const.hh:276
ConstLocalDiscreteFunction(const ThisType &other)
copy constructor
Definition: const.hh:207
ConstLocalDiscreteFunction(const DiscreteFunctionType &df, const EntityType &entity)
constructor creating a local function and binding it to an entity
Definition: const.hh:187
ConstLocalDiscreteFunction(const typename DiscreteFunctionType::LocalFunctionType &localFunction)
cast a MutableLocalFunction into this one !!! expensive !!!
Definition: const.hh:164
HessianRangeType hessian(const Point &p) const
evaluate Hessian of the local function
Definition: const.hh:268
JacobianRangeType jacobian(const Point &p) const
evaluate Jacobian of the local function
Definition: const.hh:252
Definition: explicitfieldvector.hh:75
A vector valued function space.
Definition: functionspace.hh:60
interface for local functions
Definition: localfunction.hh:77
const LocalDofVectorType & localDofVector() const
return const reference to local Dof Vector
Definition: localfunction.hh:424
FunctionSpaceType::DomainType DomainType
type of domain vectors, i.e., type of coordinates
Definition: localfunction.hh:108
BasisFunctionSet BasisFunctionSetType
type of basis function set
Definition: localfunction.hh:83
const EntityType & entity() const
obtain the entity, this local function lives on
Definition: localfunction.hh:305
LocalDofVectorType::value_type DofType
type of DoF use with the discrete function
Definition: localfunction.hh:89
FunctionSpaceType::RangeType RangeType
type of range vectors, i.e., type of function values
Definition: localfunction.hh:110
void axpy(const PointType &x, const RangeType &factor)
axpy operation for local function
Definition: localfunction.hh:236
FunctionSpaceType::JacobianRangeType JacobianRangeType
type of the Jacobian, i.e., type of evaluated Jacobian matrix
Definition: localfunction.hh:112
LocalDofVectorType::size_type SizeType
type of index
Definition: localfunction.hh:92
void clear()
set all DoFs to zero
Definition: localfunction.hh:198
BasisFunctionSetType::EntityType EntityType
type of the entity, the local function lives on is given by the space
Definition: localfunction.hh:95
void assign(const LocalFunction< BasisFunctionSet, T > &other)
assign all DoFs of this local function
Definition: localfunction.hh:192
const BasisFunctionSetType & basisFunctionSet() const
obtain the basis function set for this local function
Definition: localfunction.hh:299
LocalDofVector LocalDofVectorType
type of local Dof Vector
Definition: localfunction.hh:86
SizeType size() const
obtain the number of local DoFs
Definition: localfunction.hh:369
const LocalDofVectorType & localDofVector() const
return const reference to local Dof Vector
Definition: localfunction.hh:424
forward declaration
Definition: discretefunction.hh:51
TupleDiscreteFunctionSpace< typename DiscreteFunctions::DiscreteFunctionSpaceType ... > DiscreteFunctionSpaceType
type for the discrete function space this function lives in
Definition: discretefunction.hh:69
actual interface class for quadratures
This file implements a dense vector with a dynamic size.
Dune namespace.
Definition: alignedallocator.hh:13
STL namespace.
Traits class for a DiscreteFunction.
Definition: discretefunction.hh:61
Definition: const.hh:618
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 13, 23:29, 2024)