DUNE-FEM (unstable)

p1bubble.hh
1#ifndef SPACE_P1BUBBLE_HH
2#define SPACE_P1BUBBLE_HH
3
4#include <vector>
6#include <dune/geometry/referenceelements.hh>
7#include <dune/grid/common/gridenums.hh>
8
9#include <dune/fem/common/hybrid.hh>
10#include <dune/fem/space/common/functionspace.hh>
11#include <dune/fem/space/common/defaultcommhandler.hh>
12#include <dune/fem/space/common/discretefunctionspace.hh>
13#include <dune/fem/space/common/localrestrictprolong.hh>
14#include <dune/fem/space/mapper/code.hh>
15#include <dune/fem/space/mapper/localkey.hh>
16#include <dune/fem/space/mapper/indexsetdofmapper.hh>
17#include <dune/fem/space/shapefunctionset/simple.hh>
18#include <dune/fem/space/shapefunctionset/selectcaching.hh>
19#include <dune/fem/space/shapefunctionset/vectorial.hh>
20#include <dune/fem/space/basisfunctionset/default.hh>
21
22#include <dune/fem/operator/matrix/istlmatrixadapter.hh>
23
24namespace Dune
25{
26
27 namespace Fem
28 {
29 constexpr int factorial(unsigned int n) { return n <= 1 ? 1 : n * factorial(n-1); }
30
31 // The following would normalize the max of the bubble to 1
32 // std::pow( dimDomain + 1.0, dimDomain + 1.0 );
33
34 // This normalizes the bubble to have mean-value 1 on the refernce element.
35 constexpr int bubbleNormalization(int dimDomain) { return factorial(2*dimDomain + 1); }
36
37 template< int dim >
38 struct BubbleElementLocalKeyMap
39 {
41 BubbleElementLocalKeyMap ( int vertices )
42 {
43 for( int i = 0; i < vertices; ++i )
44 map_.emplace_back( i, dim, 0 );
45 map_.emplace_back( 0, 0, 0 );
46 }
48
49 std::size_t size() const { return map_.size(); }
50
51 LocalKey& localKey ( std::size_t i ) { return map_[ i ]; }
52 const LocalKey& localKey ( std::size_t i ) const { return map_[ i ]; }
53
54 private:
55 std::vector< LocalKey > map_;
56 };
57
58 struct BubbleElementDofMapperCodeFactory
59 {
60 // return the shape functions for a given reference element. If this
61 // is not possible an empty DofMapperCode is returned.
62 template< class RefElement,
63 std::enable_if_t< std::is_same< std::decay_t< decltype( std::declval< const RefElement & >().size( 0 ) ) >, int >::value, int > = 0,
64 std::enable_if_t< std::is_same< std::decay_t< decltype( std::declval< const RefElement & >().type( 0, 0 ) ) >, GeometryType >::value, int > = 0 >
65 DofMapperCode operator() ( const RefElement &refElement ) const
66 {
67 static const int dim = RefElement::dimension;
68 if( refElement.type().isSimplex() )
69 return compile( refElement, BubbleElementLocalKeyMap< dim >(dim+1) );
70 if( refElement.type().isCube() && refElement.type().dim() == 2)
71 return compile( refElement, BubbleElementLocalKeyMap< dim >(pow(2,dim)) );
72 else
73 return DofMapperCode();
74 }
75 };
76
77 // SimplexBubbleElementShapeFunctionSet
78 // ----------------------------------
79
80 template< class FunctionSpace >
81 class SimplexBubbleElementShapeFunctionSet
82 {
83 typedef SimplexBubbleElementShapeFunctionSet< FunctionSpace > ThisType;
84 public:
85 static const int dimDomain = FunctionSpace :: dimDomain;
86 static const int polynomialOrder = dimDomain + 1;
87 static const int numShapeFunctions = dimDomain + 2;
88
89 typedef FunctionSpace FunctionSpaceType;
90 typedef typename FunctionSpace :: DomainType DomainType;
91 typedef typename FunctionSpace :: RangeType RangeType;
92 static_assert( RangeType::dimension == 1, "This is a scalar shapefunction set" );
93 typedef typename FunctionSpace :: JacobianRangeType JacobianRangeType;
94 typedef typename FunctionSpace :: HessianRangeType HessianRangeType;
95
96 SimplexBubbleElementShapeFunctionSet () {}
97
98 template<class GeometryType >
99 SimplexBubbleElementShapeFunctionSet ( const GeometryType& gt )
100 {
101 if( !gt.isSimplex() )
102 DUNE_THROW( NotImplemented, "Wrong geometry type for Cube2DBubblelementShapeFunctionSet." );
103 }
104
105 template< class Point, class Functor >
106 void evaluateEach ( const Point &x, Functor functor ) const
107 {
108 DomainType xRef = coordinate( x );
109 RangeType phi(1), phi0(1);
110 for( int i=0; i< dimDomain; ++i )
111 {
112 functor( i+1, RangeType( xRef[ i ] ) );
113 phi0[ 0 ] -= xRef[ i ];
114 phi[ 0 ] *= xRef[ i ] ;
115 }
116
117 phi[ 0 ] *= phi0[ 0 ] / bubbleNormalization(dimDomain); // std::pow( ( dimDomain + 1.0 ), dimDomain + 1.0 );
118 functor( 0, phi0 );
119 functor( dimDomain +1, phi );
120 }
121
122 template< class Point, class Functor >
123 void jacobianEach ( const Point &x, Functor functor ) const
124 {
125 DomainType xRef = coordinate( x );
126
127 JacobianRangeType jac(0), jac0( -1 );
128 RangeType phi0( 1 );
129
130 functor( 0, jac0 );
131
132 for( int i=0; i< dimDomain; ++i )
133 {
134 phi0[ 0 ] -= xRef[ i ];
135
136 for( int j=1; j < dimDomain; ++j )
137 jac0[ 0 ][ (i+j)%dimDomain ] *= xRef[ i ];
138
139 jac[ 0 ][ i ] = 1;
140 functor( i+1, jac );
141 jac[ 0 ][ i ] = 0;
142 }
143
144 for( int i=0; i< dimDomain; ++i )
145 jac0[ 0 ][ i ] *= -(phi0[ 0 ] - xRef[ i ]);
146 jac0[ 0 ] *= 1.0 / bubbleNormalization(dimDomain); // ::pow( dimDomain + 1.0, dimDomain + 1.0 );
147 functor( dimDomain +1, jac0 );
148 }
149
150 template< class Point, class Functor >
151 void hessianEach ( const Point &x, Functor functor ) const
152 {
153 DUNE_THROW( NotImplemented, "NotImplemented" );
154 DomainType xRef = coordinate( x );
155 HessianRangeType hes;
156 functor( 0, hes );
157 functor( 1, hes );
158 functor( 2, hes );
159 functor( 3, hes );
160 }
161
162 int order () const { return dimDomain + 1; }
163
164 std::size_t size () const { return dimDomain +2; }
165 };
166
167 // 2d cube element taken from
168 // http://arxiv.org/pdf/1507.04417v1.pdf
169 template< class FunctionSpace >
170 class Cube2DBubbleElementShapeFunctionSet
171 {
172 typedef Cube2DBubbleElementShapeFunctionSet< FunctionSpace > ThisType;
173 public:
174 static const int dimDomain = FunctionSpace :: dimDomain;
175 static const int polynomialOrder = dimDomain + 1;
176 static const int numShapeFunctions = dimDomain + 2;
177
178 typedef FunctionSpace FunctionSpaceType;
179 typedef typename FunctionSpace :: DomainType DomainType;
180 typedef typename FunctionSpace :: RangeType RangeType;
181 static_assert( RangeType::dimension == 1, "This is a scalar shapefunction set" );
182 typedef typename FunctionSpace :: JacobianRangeType JacobianRangeType;
183 typedef typename FunctionSpace :: HessianRangeType HessianRangeType;
184
186 Cube2DBubbleElementShapeFunctionSet () {}
187
188 template<class GeometryType >
189 Cube2DBubbleElementShapeFunctionSet ( const GeometryType& gt )
190 {
191 if( !gt.isCube() )
192 DUNE_THROW( NotImplemented, "Wrong geometry type for Cube2DBubblelementShapeFunctionSet." );
193 if( gt.dim() != 2 )
194 DUNE_THROW( NotImplemented, "2DCubeBubbleElementShapeFunctionSet only implemented for dimension = 2." );
195 }
196
197 template< class Point, class Functor >
198 void evaluateEach ( const Point &x, Functor functor ) const
200 {
201 DomainType xRef = coordinate( x );
202 RangeType phi(1), phi0(1);
203 // (1-x)(1-y) -> grad = ( (y-1),(x-1) )
204 phi0[0] = (1.-xRef[0])*(1.-xRef[1]);
205 functor( 0, phi0 );
206 // x(1-y) -> grad = ( (1-y),-x )
207 phi[0] = xRef[0]*(1.-xRef[1]);
208 functor( 1, phi );
209 // (1-x)y -> grad = ( (-y,(1-x) )
210 phi[0] = (1.-xRef[0])*xRef[1];
211 functor( 2, phi );
212 // xy -> grad = ( (y,x) )
213 phi[0] = xRef[0]*xRef[1];
214 functor( 3, phi );
215 // 64 xy phi_0(x,y)^2 -> grad = 128 phi_0 xy grad_0 +
216 // 64 phi_0^2 (y,x)
217 phi[0] = 64.*phi0[0]*phi0[0]*xRef[0]*xRef[1];
218 functor( 4, phi );
219 }
220
221 template< class Point, class Functor >
222 void jacobianEach ( const Point &x, Functor functor ) const
223 {
224 DomainType xRef = coordinate( x );
225
226 JacobianRangeType jac, jac0;
227 RangeType phi0;
228 phi0[0] = (1.-xRef[0])*(1.-xRef[1]);
229 jac0[0] = {xRef[1]-1,xRef[0]-1};
230
231 functor( 0, jac0 );
232 jac[0] = {1-xRef[1],xRef[0]};
233 functor( 1, jac );
234 jac[0] = {xRef[1],1-xRef[0]};
235 functor( 2, jac );
236 jac[0] = {xRef[1],xRef[0]};
237 functor( 3, jac );
238 // 64 xy phi_0(x,y)^2 -> grad = 128 phi_0 xy grad_0 +
239 // 64 phi_0^2 (y,x)
240 jac0[0] *= 128.*phi0*xRef[0]*xRef[1];
241 jac[0] = {xRef[1],xRef[0]};
242 jac[0] *= 64.*phi0*phi0;
243 jac[0] += jac0[0];
244 functor( 4, jac );
245 }
246
247 template< class Point, class Functor >
248 void hessianEach ( const Point &x, Functor functor ) const
249 {
250 DUNE_THROW( NotImplemented, "NotImplemented" );
251 DomainType xRef = coordinate( x );
252 HessianRangeType hes;
253 functor( 0, hes );
254 functor( 1, hes );
255 functor( 2, hes );
256 functor( 3, hes );
257 }
258
259 int order () const { return 4; }
260
261 std::size_t size () const { return 5; }
262 };
263
264 template< class FunctionSpace, class GridPart, class Storage >
265 class BubbleElementSpace;
266
267 // BubbleElementSpaceTraits
268 // ----------------------
269
270 template< class FunctionSpace, class GridPart, class Storage >
271 struct BubbleElementSpaceTraits
272 {
273 typedef BubbleElementSpace< FunctionSpace, GridPart, Storage > DiscreteFunctionSpaceType;
274
275 typedef FunctionSpace FunctionSpaceType;
276 typedef GridPart GridPartType;
277
278 static const int codimension = 0;
279
280 private:
281 typedef typename GridPartType::template Codim< codimension >::EntityType EntityType;
282 public:
283 typedef typename FunctionSpaceType :: ScalarFunctionSpaceType ScalarFunctionSpaceType;
284
285 // defined in shapefunctionset.hh
286 // First check if we have a grid with only one element type
287 // (hybrid // grids are not supported with this space yet)
288 // If it only has one get the topologyId of that element type
289 // (note simplex=0 and cube=2^dim-1)
291 "bubble elements only implemented for grids with a single geometry type" );
292 static const unsigned int topologyId =
294 // now choose either the simplex or the cube implementation of the
295 // bubble space
296 typedef SimplexBubbleElementShapeFunctionSet< ScalarFunctionSpaceType > ScalarSimplexShapeFunctionSetType;
297 typedef Cube2DBubbleElementShapeFunctionSet< ScalarFunctionSpaceType > ScalarCubeShapeFunctionSetType;
298 typedef typename std::conditional< topologyId == 0,
299 ScalarSimplexShapeFunctionSetType, ScalarCubeShapeFunctionSetType >::type
300 ScalarShapeFunctionSetType;
301 // now extend it to a vector valued funcion space
302 typedef VectorialShapeFunctionSet< ScalarShapeFunctionSetType, typename FunctionSpaceType::RangeType > ShapeFunctionSetType;
303 // and add some default functionality
304 typedef DefaultBasisFunctionSet< EntityType, ShapeFunctionSetType > BasisFunctionSetType;
305 // finished with the shape function set
306
307 static const int localBlockSize = FunctionSpaceType::dimRange;
308 static const int polynomialOrder = ScalarShapeFunctionSetType::polynomialOrder;
309
310 typedef IndexSetDofMapper< GridPartType > BlockMapperType;
311 typedef Hybrid::IndexRange< int, FunctionSpaceType::dimRange > LocalBlockIndices;
312
313 template <class DiscreteFunction, class Operation = DFCommunicationOperation::Add >
314 struct CommDataHandle
315 {
316 typedef Operation OperationType;
317 typedef DefaultCommunicationHandler< DiscreteFunction, Operation > Type;
318 };
319 };
320
321 template< class FunctionSpace, class GridPart, class Storage >
322 struct LocalBubbleElementInterpolation
323 {
324 typedef BubbleElementSpaceTraits< FunctionSpace, GridPart, Storage > TraitsType;
325
326 typedef typename FunctionSpace::DomainType DomainType;
327 typedef typename FunctionSpace::DomainFieldType DomainFieldType;
328 typedef typename FunctionSpace::RangeType RangeType;
329 static const int dimDomain = FunctionSpace::dimDomain;
330 static const int dimRange = FunctionSpace::dimRange;
331
332 LocalBubbleElementInterpolation ()
333 : points_( dimDomain + 2, DomainType( 0.0 ) )
334 {
335 for ( int i = 0; i < dimDomain; ++i )
336 points_[ i + 1 ][ i ] = 1.0;
337
338 points_[ dimDomain +1 ] = DomainType( 1.0 / ( dimDomain + 1.0 ) );
339 }
340
341 LocalBubbleElementInterpolation ( const LocalBubbleElementInterpolation & ) = default;
342 LocalBubbleElementInterpolation ( LocalBubbleElementInterpolation && ) = default;
343
345 template< class LocalFunction, class LocalDofVector >
346 void operator() ( const LocalFunction &lf, LocalDofVector &ldv ) const
348 {
349 static_assert( TraitsType::topologyId == 0, "p1Bubble interpolation is only implemented for simplicial grids.");
350
351 RangeType mean(0);
352
353 // standard Lagrange P1 interpolation on the vertices
354 for (int dof = 0; dof < dimDomain + 1; ++dof) {
355 const auto& x = points_[dof];
356 RangeType phi;
357 lf.evaluate( x, phi );
358 for( int i = 0; i < dimRange; ++i ) {
359 ldv[ dimRange * dof + i ] = phi[ i ];
360 mean[i] += phi[i];
361 }
362 }
363
364 // Now for the bubble. If we assume that the bubble is used
365 // for the sole purpose to implement the so called
366 // Mini-Element, then we should have a look at the proof for
367 // its stability. There it show that the bubble DOF is used in
368 // order to ensured that the interpolant of a function f has
369 // the same mean-value on each element as f.
370 RangeType centerValue;
371 lf.evaluate(points_[dimDomain+1], centerValue);
372 int dof = dimDomain + 1;
373 for( int i = 0; i < dimRange; ++i ) {
374 // explicit mid-point rule
375 ldv[ dimRange * dof + i ] = centerValue[i] - mean[i] / (dimDomain + 1.0);
376 }
377 }
378
379 template <class Entity>
380 void bind( const Entity& entity ) {}
381 void unbind() {}
382
383 private:
384 std::vector< DomainType > points_;
385 mutable DomainFieldType entityVolume_;
386 };
387
388 // BubbleElementSpace
389 // ----------------
390
392 template< class FunctionSpace, class GridPart, class Storage = CachingStorage >
394 : public DiscreteFunctionSpaceDefault< BubbleElementSpaceTraits< FunctionSpace, GridPart, Storage > >
396 {
399
400 public:
401 typedef BubbleElementSpaceTraits< FunctionSpace, GridPart, Storage > Traits;
402 typedef typename Traits::ShapeFunctionSetType ShapeFunctionSetType;
403 static const int polynomialOrder = Traits::polynomialOrder;
404
405 typedef typename BaseType::GridPartType GridPartType;
406
407 typedef typename BaseType::BasisFunctionSetType BasisFunctionSetType;
408 typedef typename BaseType::IntersectionType IntersectionType;
409 typedef typename BaseType::EntityType EntityType;
410
411 typedef typename BaseType::BlockMapperType BlockMapperType;
412
413 // type of local interpolation
414 typedef LocalBubbleElementInterpolation< FunctionSpace, GridPart, Storage > InterpolationType;
415
416 // static const InterfaceType defaultInterface = InteriorBorder_InteriorBorder_Interface;
417 static const InterfaceType defaultInterface = GridPartType::indexSetInterfaceType;
418 static const CommunicationDirection defaultDirection = ForwardCommunication;
419
420 BubbleElementSpace ( GridPartType &gridPart,
421 const InterfaceType commInterface = defaultInterface,
422 const CommunicationDirection commDirection = defaultDirection )
423 : BaseType( gridPart, commInterface, commDirection ),
424 blockMapper_( gridPart, BubbleElementDofMapperCodeFactory() )
425 {
426 }
427
429 {
430 }
431
432 bool contains ( const int codim ) const
433 {
434 // forward to mapper since this information is held there
435 return blockMapper().contains( codim );
436 }
437
438 bool continuous () const { return true; }
439
441 bool continuous ( const IntersectionType & intersection ) const
442 {
443 // forward to the subsapces
444 return true;
445 }
446
448 int order () const
449 {
450 return polynomialOrder;
451 }
452
454 template<class Entity>
455 int order ( const Entity &entity ) const
456 {
457 return polynomialOrder;
458 }
459
461 template< class EntityType >
462 BasisFunctionSetType basisFunctionSet ( const EntityType &entity ) const
463 {
464 return BasisFunctionSetType( entity, ShapeFunctionSetType( entity.geometry().type() ) );
465 }
466
470 BlockMapperType &blockMapper () const { return blockMapper_; }
471
472 // Non-interface methods
473
476 InterpolationType interpolation () const
477 {
478 return InterpolationType();
479 }
480
486 [[deprecated]]
487 InterpolationType interpolation ( const EntityType &entity ) const
488 {
489 return interpolation();
490 }
491
492 protected:
493 mutable BlockMapperType blockMapper_;
494 };
495
496 template< class FunctionSpace,
497 class GridPart,
498 class Storage,
499 class NewFunctionSpace >
500 struct DifferentDiscreteFunctionSpace< BubbleElementSpace < FunctionSpace, GridPart, Storage >, NewFunctionSpace >
501 {
502 typedef BubbleElementSpace< NewFunctionSpace, GridPart, Storage > Type;
503 };
504
505 template< class FunctionSpace, class GridPart, class Storage >
506 class DefaultLocalRestrictProlong < BubbleElementSpace< FunctionSpace, GridPart, Storage > >
507 : public EmptyLocalRestrictProlong< BubbleElementSpace< FunctionSpace, GridPart, Storage > >
508 {
509 typedef typename FunctionSpace::DomainType DomainType;
510 typedef typename FunctionSpace::RangeType RangeType;
511 static const int dimDomain = FunctionSpace::dimDomain;
512 static const int dimRange = FunctionSpace::dimRange;
513
514 typedef EmptyLocalRestrictProlong< BubbleElementSpace< FunctionSpace, GridPart, Storage > > BaseType;
515
516 typedef BubbleElementSpaceTraits< FunctionSpace, GridPart, Storage > SpaceTraitsType;
517
518 public:
519 DefaultLocalRestrictProlong( const BubbleElementSpace< FunctionSpace, GridPart, Storage > &space )
520 : BaseType(), points_( dimDomain + 2, DomainType( 0.0 ) ), childCounter_(-1)
521 {
522 for ( int i = 0; i < dimDomain; ++i )
523 points_[ i + 1 ][ i ] = 1.0;
524
525 points_[ dimDomain +1 ] = DomainType( 1.0 / ( dimDomain + 1.0 ) );
526 }
527
528 template< class LFParent, class LFChild, class LocalGeometry >
529 void restrictLocal ( LFParent &lfParent,
530 const LFChild &lfChild,
531 const LocalGeometry &geometryInParent,
532 const bool initialize ) const
533 {
534 static_assert( SpaceTraitsType::topologyId == 0, "p1Bubble restriction and prolongation is only implemented for simplicial grids.");
535
536 // Lagrange P1 on a simplex: restriction just means: forget
537
538 // now for the bubble, if used as Stokes discretization the
539 // bubble should adjust the local mean-value. Mmmh. Ok. Let's
540 // just do something which is not too far off the mark but
541 // much simpler ... the value of the center DOF of the parent
542 // is just the mean value of two center DOFs of the
543 // children. This way refinement and coarsening which directly
544 // follow each other result in just the same function
545 // (although the fine-grid function is not identical to the
546 // course grid function)
547 int dof = dimDomain + 1;
548 if (initialize) {
549 childCounter_ = 1;
550 for( int coordinate = 0; coordinate < dimRange; ++coordinate ) {
551 lfParent[ dimRange * dof + coordinate ] = lfChild[ dimRange * dof + coordinate ];
552 }
553 } else {
554 ++ childCounter_;
555 for( int coordinate = 0; coordinate < dimRange; ++coordinate ) {
556 lfParent[ dimRange * dof + coordinate ] += lfChild[ dimRange * dof + coordinate ];
557 }
558 }
559 }
560
561 template< class LFParent >
562 void restrictFinalize ( LFParent &lfParent ) const
563 {
564 int dof = dimDomain + 1;
565 for( int coordinate = 0; coordinate < dimRange; ++coordinate ) {
566 lfParent[ dimRange * dof + coordinate ] /= (double)childCounter_;
567 }
568#ifndef NDEBUG
569 childCounter_ = -1;
570#endif
571 }
572
573 template< class LFParent, class LFChild, class LocalGeometry >
574 void prolongLocal ( const LFParent &lfParent, LFChild &lfChild,
575 const LocalGeometry &geometryInParent,
576 bool initialize ) const
577 {
578 static_assert( SpaceTraitsType::topologyId == 0, "p1Bubble restriction and prolongation is only implemented for simplicial grids.");
579
580 // P1 Lagrange prolongation: need to install coordinates into the child LF
581 for ( int dof = 0; dof < dimDomain + 1; ++dof) {
582 const DomainType &pointInChild = points_[dof];
583 const DomainType pointInParent = geometryInParent.global( pointInChild );
584 RangeType phi;
585 lfParent.evaluate( pointInParent, phi );
586 for( int coordinate = 0; coordinate < dimRange; ++coordinate ) {
587 lfChild[ dimRange * dof + coordinate ] = phi[ coordinate ];
588 }
589 }
590
591 // but now for the bubble: just copy the DOF value to the children
592 int dof = dimDomain + 1;
593 for( int coordinate = 0; coordinate < dimRange; ++coordinate ) {
594 lfChild[ dimRange * dof + coordinate ] = lfParent[ dimRange * dof + coordinate ];
595 }
596 }
597
598 bool needCommunication () const { return true; }
599 private:
600 std::vector< DomainType > points_;
601 mutable int childCounter_;
602 };
603
604 } // namespace Fem
605
606} // namespace Dune
607
608#endif // SPACE_P1BUBBLE_HH
Wrapper class for entities.
Definition: entity.hh:66
[Class definition for new space]
Definition: p1bubble.hh:396
InterpolationType interpolation() const
return local interpolation object for LocalInterpolation
Definition: p1bubble.hh:476
BlockMapperType & blockMapper() const
obtain the DoF block mapper of this space
Definition: p1bubble.hh:470
bool continuous(const IntersectionType &intersection) const
returns true if the space contains only globally continuous functions
Definition: p1bubble.hh:441
int order() const
get global order of space
Definition: p1bubble.hh:448
BasisFunctionSetType basisFunctionSet(const EntityType &entity) const
get basis function set for given entity
Definition: p1bubble.hh:462
int order(const Entity &entity) const
get global order of space
Definition: p1bubble.hh:455
InterpolationType interpolation(const EntityType &entity) const
return local interpolation for given entity
Definition: p1bubble.hh:487
This is the class with default implementations for discrete function. The methods not marked with hav...
Definition: discretefunctionspace.hh:649
Traits::BasisFunctionSetType BasisFunctionSetType
type of basis function set of this space
Definition: discretefunctionspace.hh:201
GridPartType::IntersectionType IntersectionType
type of the intersections
Definition: discretefunctionspace.hh:226
ExplicitFieldVector< FieldMatrix< RangeFieldType, dimDomain, dimDomain >, dimRange > HessianRangeType
Intrinsic type used for the hessian values has a Dune::FieldMatrix type interface.
Definition: functionspaceinterface.hh:79
FunctionSpaceTraits::DomainFieldType DomainFieldType
Intrinsic type used for values in the domain field (usually a double)
Definition: functionspaceinterface.hh:60
FunctionSpaceTraits::RangeType RangeType
Type of range vector (using type of range field) has a Dune::FieldVector type interface.
Definition: functionspaceinterface.hh:71
@ dimDomain
dimension of domain vector space
Definition: functionspaceinterface.hh:46
@ dimRange
dimension of range vector space
Definition: functionspaceinterface.hh:48
FunctionSpaceTraits::LinearMappingType JacobianRangeType
Intrinsic type used for the jacobian values has a Dune::FieldMatrix type interface.
Definition: functionspaceinterface.hh:75
FunctionSpaceTraits::DomainType DomainType
Type of domain vector (using type of domain field) has a Dune::FieldVector type interface.
Definition: functionspaceinterface.hh:67
FunctionSpaceTraits::ScalarFunctionSpaceType ScalarFunctionSpaceType
corresponding scalar function space
Definition: functionspaceinterface.hh:83
A vector valued function space.
Definition: functionspace.hh:60
A few common exception classes.
#define DUNE_THROW(E,...)
Definition: exceptions.hh:314
bool gt(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test if first greater than second
Definition: float_cmp.cc:158
CommunicationDirection
Define a type for communication direction parameter.
Definition: gridenums.hh:170
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:86
@ ForwardCommunication
communicate as given in InterfaceType
Definition: gridenums.hh:171
Dune namespace
Definition: alignedallocator.hh:13
constexpr std::integral_constant< std::size_t, sizeof...(II)> size(std::integer_sequence< T, II... >)
Return the size of the sequence.
Definition: integersequence.hh:75
static constexpr T factorial(const T &n) noexcept
calculate the factorial of n as a constexpr
Definition: math.hh:93
Specialize with 'true' for if the codimension 0 entity of the grid has only one possible geometry typ...
Definition: capabilities.hh:27
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Jan 10, 23:35, 2026)