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
366 template< class Point >
367 RangeType evaluate ( const Point &p ) const
368 {
369 RangeType val;
370 evaluate( p, val );
371 return val;
372 }
373
375 template< class Point >
376 JacobianRangeType jacobian ( const Point &p ) const
377 {
378 JacobianRangeType jac;
379 jacobian( p, jac );
380 return jac;
381 }
382
384 template< class Point >
385 HessianRangeType hessian ( const Point &p ) const
386 {
387 HessianRangeType h;
388 hessian( p, h );
389 return h;
390 }
391
392 void bind ( const EntityType &entity ) { init( entity ); }
393 void unbind () {}
394 template <class IntersectionType>
395 void bind(const IntersectionType &intersection, IntersectionSide side)
396 {
397 // store local copy to avoid problems with casting to temporary types
398 const EntityType entity = side==IntersectionSide::in? intersection.inside(): intersection.outside();
399 bind( entity );
400 }
401
402 const GridFunctionType &gridFunction () const { return gridFunction_; }
403
404 private:
405 const GridFunctionType &gridFunction_;
406 };
407 };
408
409 template< class GF >
410 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 > >
411 {
412 static_assert( !std::is_reference<GF>::value );
413 struct Type
414 {
415 typedef GF GridFunctionType;
416 typedef std::decay_t<GF> GridFunctionDecayType;
417 typedef typename GridFunctionDecayType::GridPartType GridPartType;
418 typedef typename GridFunctionDecayType::EntityType EntityType;
419 typedef typename GridFunctionDecayType::RangeFieldType RangeFieldType;
420 typedef typename GridFunctionDecayType::DomainType DomainType;
421 typedef typename GridFunctionDecayType::RangeType RangeType;
422 typedef typename GridFunctionDecayType::JacobianRangeType JacobianRangeType;
423 typedef typename GridFunctionDecayType::HessianRangeType HessianRangeType;
424 typedef typename GridFunctionDecayType::FunctionSpaceType FunctionSpaceType;
425
426 template<class Arg, std::enable_if_t<std::is_constructible<GF, Arg>::value, int> = 0>
427 explicit Type ( Arg&& gridFunction )
428 : gridFunction_( std::forward<Arg>(gridFunction) )
429#ifdef TESTTHREADING
430 , thread_(-1)
431#endif
432 {
433 // if (MPIManager::thread()==0 || MPIManager::thread()==1) std::cout << "[" << MPIManager::thread() << "]: CLF " << &gridFunction_ << std::endl;
434 }
435 template<class Arg, std::enable_if_t<std::is_constructible<GF, Arg>::value, int> = 0>
436 explicit Type ( const EntityType &entity, Arg&& gridFunction )
437 : gridFunction_( std::forward<Arg>(gridFunction) )
438#ifdef TESTTHREADING
439 , thread_(-1)
440#endif
441 {
442 bind(entity);
443 }
444
445 template <class Point>
446 void evaluate(const Point &x, RangeType &ret) const
447 {
448 gridFunction().evaluate(x,ret);
449 }
450 template <class Point>
451 void jacobian(const Point &x, JacobianRangeType &ret) const
452 {
453 gridFunction().jacobian(x,ret);
454 }
455 template <class Point>
456 void hessian(const Point &x, HessianRangeType &ret) const
457 {
458 gridFunction().hessian(x,ret);
459 }
460 unsigned int order() const { return gridFunction().order(); }
461
463 template< class Point >
464 RangeType evaluate ( const Point &p ) const
465 {
466 RangeType val;
467 evaluate( p, val );
468 return val;
469 }
470
472 template< class Point >
473 JacobianRangeType jacobian ( const Point &p ) const
474 {
475 JacobianRangeType jac;
476 jacobian( p, jac );
477 return jac;
478 }
479
481 template< class Point >
482 HessianRangeType hessian ( const Point &p ) const
483 {
484 HessianRangeType h;
485 hessian( p, h );
486 return h;
487 }
488
489 template< class Quadrature, class ... Vectors >
490 void evaluateQuadrature ( const Quadrature &quad, Vectors & ... values ) const
491 {
492 static_assert( sizeof...( Vectors ) > 0, "evaluateQuadrature needs to be called with at least one vector." );
493 evaluateFullQuadrature( PriorityTag<42>(), quad, values... );
494 }
495 template< class Quadrature, class Jacobians >
496 void jacobianQuadrature ( const Quadrature &quadrature, Jacobians &jacobians ) const
497 { jacobianQuadrature(quadrature,jacobians, PriorityTag<42>() ); }
498 template< class Quadrature, class Hessians >
499 void hessianQuadrature ( const Quadrature &quadrature, Hessians &hessians ) const
500 { hessianQuadrature(quadrature,hessians, PriorityTag<42>() ); }
501
502 void bind ( const EntityType &entity )
503 {
504#ifdef TESTTHREADING
505 if (thread_ == -1) thread_ = MPIManager::thread();
506 if (thread_ != MPIManager::thread())
507 {
508 std::cout << "wrong thread number\n";
509 assert(0);
510 std::abort();
511 }
512#endif
513 gridFunction_.bind( entity );
514 }
515 void unbind ()
516 {
517#ifdef TESTTHREADING
518 if (thread_ != MPIManager::thread())
519 {
520 std::cout << "wrong thread number\n";
521 assert(0);
522 std::abort();
523 }
524#endif
525 gridFunction_.unbind();
526 }
527 template <class IntersectionType>
528 void bind(const IntersectionType &intersection, IntersectionSide side)
529 {
530#ifdef TESTTHREADING
531 if (thread_ == -1) thread_ = MPIManager::thread();
532 if (thread_ != MPIManager::thread())
533 {
534 std::cout << "wrong thread number\n";
535 assert(0);
536 std::abort();
537 }
538#endif
539 defaultIntersectionBind(gridFunction_,intersection, side);
540 }
541
542 const EntityType& entity() const
543 {
544 return gridFunction_.entity();
545 }
546
547 const GridFunctionDecayType &gridFunction () const { return gridFunction_; }
548
549 private:
550 template< class Quadrature, class ... Vectors, class GF_=GridFunctionDecayType >
551 auto evaluateFullQuadrature ( PriorityTag<1>, const Quadrature &quad, Vectors & ... values ) const
552 -> std::enable_if_t< std::is_void< decltype( std::declval< const GF_& >().evaluateQuadrature(quad,values...))>::value >
553 { gridFunction().evaluateQuadrature(quad,values...); }
554 template< class Quadrature, class ... Vectors >
555 void evaluateFullQuadrature ( PriorityTag<0>, const Quadrature &quad, Vectors & ... values ) const
556 { std::ignore = std::make_tuple( ( evaluateSingleQuadrature( quad, values ), 1 ) ... ); }
557
558 template< class Quadrature, class Jacobians, class GF_=GridFunctionDecayType>
559 auto jacobianQuadrature ( const Quadrature &quadrature, Jacobians &jacobians, PriorityTag<1> ) const
560 -> std::enable_if_t< std::is_void< decltype( std::declval< const GF_& >().jacobianQuadrature(quadrature,jacobians))>::value >
561 { gridFunction().jacobianQuadrature(quadrature,jacobians); }
562 template< class Quadrature, class Jacobians >
563 void jacobianQuadrature ( const Quadrature &quadrature, Jacobians &jacobians, PriorityTag<0> ) const
564 {
565 for( const auto qp : quadrature )
566 jacobians[ qp.index() ] = jacobian( qp );
567 }
568
569 template< class Quadrature, class Hessians, class GF_=GridFunctionDecayType >
570 auto hessianQuadrature ( const Quadrature &quadrature, Hessians &hessians, PriorityTag<1> ) const
571 -> std::enable_if_t< std::is_void< decltype( std::declval< const GF_& >().hessianQuadrature(quadrature,hessians))>::value >
572 { gridFunction().hessianQuadrature(quadrature,hessians); }
573 template< class Quadrature, class Hessians >
574 void hessianQuadrature ( const Quadrature &quadrature, Hessians &hessians, PriorityTag<0> ) const
575 {
576 for( const auto qp : quadrature )
577 hessians[ qp.index() ] = hessian( qp );
578 }
579
580 template< class Quadrature, class Vector >
581 auto evaluateSingleQuadrature ( const Quadrature &quad, Vector &v ) const
582 -> std::enable_if_t< std::is_same< std::decay_t< decltype(v[ 0 ]) >, RangeType >::value >
583 {
584 for( const auto qp : quad )
585 v[ qp.index() ] = evaluate( qp );
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 ]) >, JacobianRangeType >::value >
590 { jacobianQuadrature(quad,v); }
591 template< class Quadrature, class Vector >
592 auto evaluateSingleQuadrature ( const Quadrature &quad, Vector &v ) const
593 -> std::enable_if_t< std::is_same< std::decay_t< decltype(v[ 0 ]) >, HessianRangeType >::value >
594 { hessianQuadrature(quad,v); }
595
596 GridFunctionType gridFunction_;
597#ifdef TESTTHREADING
598 int thread_;
599#endif
600 };
601 };
602 } // namespace Impl
603
604
605 template< class GridFunction >
606 using ConstLocalFunction = typename Impl::ConstLocalFunction< GridFunction >::Type;
608 template<class T, class SFINAE = void>
610 : std::false_type
611 {};
612
614 template<class T>
615 struct IsConstLocalFunction<T, std::enable_if_t<!std::is_same<T, std::decay_t<T> >{}> >
616 : IsConstLocalFunction<std::decay_t<T> >
617 {};
618
620 template<class T>
622 T,
623 std::enable_if_t<(std::is_same<T, std::decay_t<T> >{}
624 && std::is_same<T, Fem::ConstLocalFunction<typename T::GridFunctionType> >{}
625 )> >
626 : std::true_type
627 {};
628
629
633 template<class F, std::enable_if_t<!IsConstLocalFunction<F>::value, int> = 0>
634 constexpr auto constLocalFunction(F&& f)
635 {
636 return Fem::ConstLocalFunction<std::decay_t<F> >(std::forward<F>(f));
637 }
638
640 template<class F, std::enable_if_t<IsConstLocalFunction<F>::value, int> = 0>
641 constexpr decltype(auto) constLocalFunction(F&& f)
642 {
643 return std::forward<F>(f);
644 }
645
646 template<class F, class Entity>
647 constexpr auto constLocalFunction(F&& f, const Entity &entity)
648 {
649 return Dune::Fem::ConstLocalFunction<std::decay_t<F> >(entity,std::forward<F>(f));
650 }
651
652 } // namespace Fem
653
654} // namespace Dune
655
656#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:415
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:415
FunctionSpaceType::DomainType DomainType
type of domain vectors, i.e., type of coordinates
Definition: localfunction.hh:105
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:302
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:107
void axpy(const PointType &x, const RangeType &factor)
axpy operation for local function
Definition: localfunction.hh:233
FunctionSpaceType::JacobianRangeType JacobianRangeType
type of the Jacobian, i.e., type of evaluated Jacobian matrix
Definition: localfunction.hh:109
LocalDofVectorType::size_type SizeType
type of index
Definition: localfunction.hh:92
void clear()
set all DoFs to zero
Definition: localfunction.hh:195
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:189
const BasisFunctionSetType & basisFunctionSet() const
obtain the basis function set for this local function
Definition: localfunction.hh:296
LocalDofVector LocalDofVectorType
type of local Dof Vector
Definition: localfunction.hh:86
SizeType size() const
obtain the number of local DoFs
Definition: localfunction.hh:360
const LocalDofVectorType & localDofVector() const
return const reference to local Dof Vector
Definition: localfunction.hh:415
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
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:611
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 24, 22:29, 2024)