dune-fem  2.4.1-rc
basisfunctionset/tuple.hh
Go to the documentation of this file.
1 #ifndef DUNE_FEM_SPACE_BASISFUNCTIONSET_TUPLE_HH
2 #define DUNE_FEM_SPACE_BASISFUNCTIONSET_TUPLE_HH
3 
4 #include <algorithm>
5 #include <array>
6 #include <tuple>
7 #include <vector>
8 
9 #include <dune/common/forloop.hh>
10 #include <dune/common/std/utility.hh>
11 #include <dune/common/tuples.hh>
12 
13 #include <dune/geometry/type.hh>
14 
16 
19 
20 
21 namespace Dune
22 {
23 
24  namespace Fem
25  {
26 
27  // TupleBasisFunctionSet
28  // ---------------------
29 
30  template< class ... BasisFunctionSets >
32  {
34 
35  // Functor Helper structs
36  template< int > struct ComputeOffset;
37  template< int > struct EvaluateAll;
38  template< int > struct JacobianAll;
39  template< int > struct HessianAll;
40  template< int > struct EvaluateAllRanges;
41  template< int > struct JacobianAllRanges;
42  template< int > struct HessianAllRanges;
43  template< int > struct Axpy;
44 
45  // helper class to compute static overall size and offsets
46  template< int ... i >
47  struct Indices
48  {
49  template< int j >
50  static constexpr int size () { return std::tuple_element< j, std::tuple< std::integral_constant< int, i > ... > >::type::value; }
51 
52  template< int ... j >
53  static constexpr Std::integer_sequence< int, size< j >() ... > sizes ( Std::integer_sequence< int, j ... > )
54  {
55  return Std::integer_sequence< int, size< j >() ... >();
56  }
57 
58  template< int j >
59  static constexpr int offset ()
60  {
61  return mysum( sizes( Std::make_integer_sequence< int, j >() ) );
62  }
63 
64  private:
65  template< int ... j >
66  static constexpr int mysum ( Std::integer_sequence< int, j ... > )
67  {
68  return Std::sum( j ... );
69  }
70 
71  static constexpr int mysum ( Std::integer_sequence< int > )
72  {
73  return 0;
74  }
75  };
76 
78  typedef Indices< BasisFunctionSets::FunctionSpaceType::dimRange ... > RangeIndices;
79 
81  typedef std::tuple< BasisFunctionSets ... > BasisFunctionSetTupleType;
82 
84  "TupleBasisFunctionSet needs common DomainType" );
86  typedef typename std::tuple_element< 0, BasisFunctionSetTupleType >::type::FunctionSpaceType ContainedFunctionSpaceType;
87 
89  static const int setSize = sizeof ... ( BasisFunctionSets );
90  static const int setIterationSize = sizeof ... ( BasisFunctionSets )-1;
91 
93  typedef std::array< std::size_t, setSize + 1 > OffsetType;
94 
95  // storage for i-th sub basisfunction
96  struct Storage
97  {
98  typedef std::tuple< std::vector< typename BasisFunctionSets::RangeType > ... > RangeStorageTupleType;
99  typedef std::tuple< std::vector< typename BasisFunctionSets::JacobianRangeType > ... > JacobianStorageTupleType;
100  typedef std::tuple< std::vector< typename BasisFunctionSets::HessianRangeType > ... > HessianStorageTupleType;
101 
102  Storage () {}
103 
104  template< int i >
105  typename std::tuple_element< i, RangeStorageTupleType >::type
106  & rangeStorage() const { return std::get< i >( rangeStorage_ ); }
107 
108  template< int i >
109  typename std::tuple_element< i, JacobianStorageTupleType >::type
110  & jacobianStorage() const { return std::get< i >( jacobianStorage_ ); }
111 
112  template< int i >
113  typename std::tuple_element< i, HessianStorageTupleType >::type
114  & hessianStorage() const { return std::get< i >( hessianStorage_ ); }
115 
116  private:
117  mutable RangeStorageTupleType rangeStorage_;
118  mutable JacobianStorageTupleType jacobianStorage_;
119  mutable HessianStorageTupleType hessianStorage_;
120  };
121 
122  public:
123 
124  // export type of i-th subbasisfunction set
125  template< int i >
127  {
128  typedef typename std::tuple_element< i, BasisFunctionSetTupleType >::type type;
129  };
130 
132  static const int dimDomain = ContainedFunctionSpaceType::dimDomain;
133 
135  static constexpr const int dimRange = Std::sum( static_cast< int >( BasisFunctionSets::FunctionSpaceType::dimRange ) ... );
136 
138  typedef FunctionSpace< typename ContainedFunctionSpaceType::DomainFieldType,
139  typename ContainedFunctionSpaceType::RangeFieldType, dimDomain, dimRange > FunctionSpaceType;
140 
143 
146 
149 
152 
155 
157  "TupleBasisFunctionSet needs common EntityType" );
159  typedef typename std::tuple_element< 0, BasisFunctionSetTupleType >::type::EntityType EntityType;
160 
162  "TupleBasisFunctionSet needs ReferenceElementType" );
164  typedef typename std::tuple_element< 0, BasisFunctionSetTupleType >::type::ReferenceElementType ReferenceElementType;
165 
166  // default constructor, needed by localmatrix
168 
169  // constructor taking a pack of basisFunctionSets
170  TupleBasisFunctionSet ( const BasisFunctionSets & ... basisFunctionSets )
171  : basisFunctionSetTuple_( basisFunctionSets ... )
172  {
173  offset_[ 0 ] = 0;
174  ForLoop< ComputeOffset, 0, setIterationSize >::apply( offset_, basisFunctionSetTuple_ );
175  }
176 
177  // constructor taking a tuple of basisfunction sets
178  TupleBasisFunctionSet ( const BasisFunctionSetTupleType &basisFunctionSetTuple )
179  : basisFunctionSetTuple_( basisFunctionSetTuple )
180  {
181  offset_[ 0 ] = 0;
182  ForLoop< ComputeOffset, 0, setIterationSize >::apply( offset_, basisFunctionSetTuple_ );
183  }
184 
185  // Basis Function Set Interface Methods
186  // ------------------------------------
187 
189  int order () const
190  {
191  return order( Std::index_sequence_for< BasisFunctionSets ... >() );
192  }
193 
195  std::size_t size () const
196  {
197  return size( Std::index_sequence_for< BasisFunctionSets ... >() );
198  }
199 
201  Dune::GeometryType type () const
202  {
203  return std::get< 0 >( basisFunctionSetTuple_ ).type();
204  }
205 
207  const EntityType &entity () const
208  {
209  return std::get< 0 >( basisFunctionSetTuple_ ).entity();
210  }
211 
213  const ReferenceElementType &referenceElement () const
214  {
215  return std::get< 0 >( basisFunctionSetTuple_ ).referenceElement();
216  }
217 
219  template< class Point, class DofVector >
220  void evaluateAll ( const Point &x, const DofVector &dofs, RangeType &value ) const
221  {
222  ForLoop< EvaluateAll, 0, setIterationSize >::apply( x, dofs, value, offset_, basisFunctionSetTuple_ );
223  }
224 
226  template< class Point, class RangeArray >
227  void evaluateAll ( const Point &x, RangeArray &values ) const
228  {
229  assert( values.size() >= size() );
230  ForLoop< EvaluateAllRanges, 0, setIterationSize >::apply( x, values, storage_, offset_, basisFunctionSetTuple_ );
231  }
232 
234  template< class QuadratureType, class DofVector, class RangeArray >
235  void evaluateAll ( const QuadratureType &quad, const DofVector &dofs, RangeArray &ranges ) const
236  {
237  const int nop = quad.nop();
238  for( int qp = 0; qp < nop; ++qp )
239  evaluateAll( quad[ qp ], dofs, ranges[ qp ] );
240  }
241 
243  template< class Point, class DofVector >
244  void jacobianAll ( const Point &x, const DofVector &dofs, JacobianRangeType &jacobian ) const
245  {
246  ForLoop< JacobianAll, 0, setIterationSize >::apply( x, dofs, jacobian, offset_, basisFunctionSetTuple_ );
247  }
248 
250  template< class Point, class JacobianRangeArray >
251  void jacobianAll ( const Point &x, JacobianRangeArray &jacobians ) const
252  {
253  assert( jacobians.size() >= size() );
254  ForLoop< JacobianAllRanges, 0, setIterationSize >::apply( x, jacobians, storage_, offset_, basisFunctionSetTuple_ );
255  }
256 
258  template< class QuadratureType, class DofVector, class JacobianArray >
259  void jacobianAll ( const QuadratureType &quad, const DofVector &dofs, JacobianArray &jacobians ) const
260  {
261  const int nop = quad.nop();
262  for( int qp = 0; qp < nop; ++qp )
263  jacobianAll( quad[ qp ], dofs, jacobians[ qp ] );
264  }
265 
267  template< class Point, class DofVector >
268  void hessianAll ( const Point &x, const DofVector &dofs, HessianRangeType &hessian ) const
269  {
270  ForLoop< HessianAll, 0, setIterationSize >::apply( x, dofs, hessian, offset_, basisFunctionSetTuple_ );
271  }
272 
274  template< class Point, class HessianRangeArray >
275  void hessianAll ( const Point &x, HessianRangeArray &hessians ) const
276  {
277  assert( hessians.size() >= size() );
278  ForLoop< HessianAllRanges, 0, setIterationSize >::apply( x, hessians, storage_, offset_, basisFunctionSetTuple_ );
279  }
280 
282  template< class QuadratureType, class Vector, class DofVector >
283  void axpy ( const QuadratureType &quad, const Vector &values, DofVector &dofs ) const
284  {
285  // call axpy method for each entry of the given vector, e.g. rangeVector or jacobianVector
286  const unsigned int nop = quad.nop();
287  for( unsigned int qp = 0; qp < nop; ++qp )
288  axpy( quad[ qp ], values[ qp ], dofs );
289  }
290 
292  template< class QuadratureType, class VectorA, class VectorB, class DofVector >
293  void axpy ( const QuadratureType &quad, const VectorA &valuesA, const VectorB &valuesB, DofVector &dofs ) const
294  {
295  // call axpy method for each entry of the given vector, e.g. rangeVector or jacobianVector
296  const unsigned int nop = quad.nop();
297  for( unsigned int qp = 0; qp < nop; ++qp )
298  {
299  axpy( quad[ qp ], valuesA[ qp ], dofs );
300  axpy( quad[ qp ], valuesB[ qp ], dofs );
301  }
302  }
303 
305  template< class Point, class DofVector >
306  void axpy ( const Point &x, const RangeType &valueFactor, DofVector &dofs ) const
307  {
308  ForLoop< Axpy, 0, setIterationSize >::apply( x, valueFactor, dofs, offset_, basisFunctionSetTuple_ );
309  }
310 
312  template< class Point, class DofVector >
313  void axpy ( const Point &x, const JacobianRangeType &jacobianFactor, DofVector &dofs ) const
314  {
315  ForLoop< Axpy, 0, setIterationSize >::apply( x, jacobianFactor, dofs, offset_, basisFunctionSetTuple_ );
316  }
317 
319  template< class Point, class DofVector >
320  void axpy ( const Point &x, const RangeType &valueFactor, const JacobianRangeType &jacobianFactor, DofVector &dofs ) const
321  {
322  ForLoop< Axpy, 0, setIterationSize >::apply( x, valueFactor, jacobianFactor, dofs, offset_, basisFunctionSetTuple_ );
323  }
324 
325  /***** NON Interface methods ****/
326 
328  template< int i >
330  {
331  return std::get< i >( basisFunctionSetTuple_ );
332  }
333 
335  std::size_t offset ( int i ) const
336  {
337  return offset_[ i ];
338  }
339 
341  static const int numSubBasisFunctionSets ()
342  {
343  return setSize;
344  }
345 
346  protected:
347  // unroll index sequence and take maxmial order
348  template< std::size_t ... i >
349  int order ( Std::index_sequence< i ... > ) const
350  {
351  return Std::max( std::get< i >( basisFunctionSetTuple_ ).order() ... );
352  }
353 
354  // unroll index sequence and sum up sizes
355  template< std::size_t ... i >
356  std::size_t size ( Std::index_sequence< i ... > ) const
357  {
358  return Std::sum( std::get< i >( basisFunctionSetTuple_ ).size() ... );
359  }
360 
361  private:
362  BasisFunctionSetTupleType basisFunctionSetTuple_;
363  OffsetType offset_;
364 
365  Storage storage_;
366  };
367 
368 
369 
370  // ComputeOffset
371  // -------------
372 
373  template< class ... BasisFunctionSets >
374  template< int i >
375  struct TupleBasisFunctionSet< BasisFunctionSets ... >::
376  ComputeOffset
377  {
378  template< class Tuple >
379  static void apply ( OffsetType &offset, const Tuple &tuple )
380  {
381  offset[ i + 1 ] = offset[ i ] + std::get< i >( tuple ).size();
382  }
383  };
384 
385 
386  // EvaluateAll
387  // -----------
388 
389  template< class ... BasisFunctionSets >
390  template< int i >
391  struct TupleBasisFunctionSet< BasisFunctionSets ... >::
392  EvaluateAll
393  {
394  static const int rangeOffset = RangeIndices::template offset< i >();
395 
396  template< class Point, class DofVector, class Tuple >
397  static void apply ( const Point &x, const DofVector &dofVector, RangeType &values, const OffsetType &offset, const Tuple &tuple )
398  {
399  std::size_t size = std::get< i >( tuple ).size();
400  // get size of this basisFunctionSet
401  typedef typename DofVector::value_type DofType;
402  typename std::tuple_element< i, BasisFunctionSetTupleType >::type::RangeType thisRange;
403 
404  SubDofVector< const DofVector, const DofType > subDofVector( dofVector, size, offset[ i ] );
405  // evaluateAll for this BasisFunctionSet, with View on DofVector
406  std::get< i >( tuple ).evaluateAll( x, subDofVector, thisRange );
407  std::copy( thisRange.begin(), thisRange.end(), values.begin() + rangeOffset );
408  }
409  };
410 
411 
412  // JacobianAll
413  // -----------
414 
415  template< class ... BasisFunctionSets >
416  template< int i >
417  struct TupleBasisFunctionSet< BasisFunctionSets ... >::
418  JacobianAll
419  {
420  static const int rangeOffset = RangeIndices::template offset< i >();
421 
422  template< class Point, class DofVector, class Tuple >
423  static void apply ( const Point &x, const DofVector &dofVector, JacobianRangeType &values, const OffsetType &offset, const Tuple &tuple )
424  {
425  // get size of this basisFunctionSet
426  std::size_t size = std::get< i >( tuple ).size();
427  typedef typename DofVector::value_type DofType;
428  typename std::tuple_element< i, BasisFunctionSetTupleType >::type::JacobianRangeType thisJacobian;
429 
430  SubDofVector< const DofVector, const DofType > subDofVector( dofVector, size, offset[ i ] );
431  // jacobianAll for this BasisFunctionSet, with View on DofVector
432  std::get< i >( tuple ).jacobianAll( x, subDofVector, thisJacobian );
433  std::copy( thisJacobian.begin(), thisJacobian.end(), values.begin() + rangeOffset );
434  }
435  };
436 
437 
438  // HessianAll
439  // ----------
440 
441  template< class ... BasisFunctionSets >
442  template< int i >
443  struct TupleBasisFunctionSet< BasisFunctionSets ... >::
444  HessianAll
445  {
446  static const int rangeOffset = RangeIndices::template offset< i >();
447 
448  template< class Point, class DofVector, class Tuple >
449  static void apply ( const Point &x, const DofVector &dofVector, HessianRangeType &values, const OffsetType &offset, const Tuple &tuple )
450  {
451  // get size of this basisFunctionSet
452  std::size_t size = std::get< i >( tuple ).size();
453  typedef typename DofVector::value_type DofType;
454  typename std::tuple_element< i, BasisFunctionSetTupleType >::type::HessianRangeType thisHessian;
455 
456  SubDofVector< const DofVector, const DofType > subDofVector( dofVector, size, offset[ i ] );
457  // hessianAll for this BasisFunctionSet, with View on DofVector
458  std::get< i >( tuple ).hessianAll( x, subDofVector, thisHessian );
459  std::copy( thisHessian.begin(), thisHessian.end(), values.begin() + rangeOffset );
460  }
461  };
462 
463 
464  // EvaluateAllRanges
465  // -----------------
466 
467  template< class ... BasisFunctionSets >
468  template< int i >
469  struct TupleBasisFunctionSet< BasisFunctionSets ... >::
470  EvaluateAllRanges
471  {
472  typedef typename std::tuple_element< i, typename Storage::RangeStorageTupleType >::type ThisStorage;
473  static const int thisDimRange = std::tuple_element< i, BasisFunctionSetTupleType >::type::FunctionSpaceType::dimRange;
474  static const int rangeOffset = RangeIndices::template offset< i >();
475 
476  template< class Point, class RangeArray, class Tuple >
477  static void apply ( const Point &x, RangeArray &values, const Storage &s, const OffsetType &offset, const Tuple &tuple )
478  {
479  std::size_t size = std::get< i >( tuple ).size();
480  ThisStorage &thisStorage = s.template rangeStorage< i >();
481  thisStorage.resize( size );
482 
483  // misuse SubDofVector
484  std::get< i >( tuple ).evaluateAll( x, thisStorage );
485 
486  for( std::size_t j = 0; j < size; ++j )
487  {
488  values[ j + offset[ i ] ] = RangeType( 0.0 );
489  for( int r = 0; r < thisDimRange; ++r )
490  values[ j + offset[ i ] ][ r + rangeOffset ] = thisStorage[ j ][ r ];
491  }
492  }
493  };
494 
495 
496  // JacobianAllRanges
497  // -----------------
498 
499  template< class ... BasisFunctionSets >
500  template< int i >
501  struct TupleBasisFunctionSet< BasisFunctionSets ... >::
502  JacobianAllRanges
503  {
504  typedef typename std::tuple_element< i, typename Storage::JacobianStorageTupleType >::type ThisStorage;
505  static const int thisDimRange = std::tuple_element< i, BasisFunctionSetTupleType >::type::FunctionSpaceType::dimRange;
506  static const int rangeOffset = RangeIndices::template offset< i >();
507 
508  template< class Point, class RangeArray, class Tuple >
509  static void apply ( const Point &x, RangeArray &values, const Storage &s, const OffsetType &offset, const Tuple &tuple )
510  {
511  std::size_t size = std::get< i >( tuple ).size();
512  ThisStorage &thisStorage = s.template jacobianStorage< i >();
513  thisStorage.resize( size );
514 
515  std::get< i >( tuple ).jacobianAll( x, thisStorage );
516 
517  for( std::size_t j = 0; j < size; ++j )
518  {
519  values[ j + offset[ i ] ] = JacobianRangeType( RangeFieldType( 0.0 ) );
520  for( int r = 0; r < thisDimRange; ++r )
521  values[ j + offset[ i ] ][ r + rangeOffset ] = thisStorage[ j ][ r ];
522  }
523  }
524  };
525 
526 
527  // HessianAllRanges
528  // ----------------
529 
530  template< class ... BasisFunctionSets >
531  template< int i >
532  struct TupleBasisFunctionSet< BasisFunctionSets ... >::
533  HessianAllRanges
534  {
535  typedef typename std::tuple_element< i, typename Storage::HessianStorageTupleType >::type ThisStorage;
536  static const int thisDimRange = std::tuple_element< i, BasisFunctionSetTupleType >::type::FunctionSpaceType::dimRange;
537  static const int rangeOffset = RangeIndices::template offset< i >();
538 
539  template< class Point, class RangeArray, class Tuple >
540  static void apply ( const Point &x, RangeArray &values, const Storage &s, const OffsetType &offset, const Tuple &tuple )
541  {
542  std::size_t size = std::get< i >( tuple ).size();
543  ThisStorage &thisStorage = s.template hessianStorage< i >();
544  thisStorage.resize( size );
545 
546  std::get< i >( tuple ).hessianAll( x, thisStorage );
547 
548  for( std::size_t j = 0; j < size; ++j )
549  {
550  values[ j + offset[ i ] ] = HessianRangeType( RangeFieldType( 0.0 ) );
551  for( int r = 0; r < thisDimRange; ++r )
552  values[ j + offset[ i ] ][ r + rangeOffset ] = thisStorage[ j ][ r ];
553  }
554  }
555  };
556 
557 
558  // Axpy
559  // ----
560 
561  template< class ... BasisFunctionSets >
562  template< int i >
563  struct TupleBasisFunctionSet< BasisFunctionSets ... >::
564  Axpy
565  {
566  typedef typename std::tuple_element< i, BasisFunctionSetTupleType >::type::RangeType ThisRangeType;
567  typedef typename std::tuple_element< i, BasisFunctionSetTupleType >::type::JacobianRangeType ThisJacobianRangeType;
568 
569  static const int rangeOffset = RangeIndices::template offset< i >();
570 
573 
574  // axpy with range type
575  template< class Point, class DofVector, class Tuple >
576  static void apply ( const Point &x, const RangeType &factor, DofVector &dofVector, const OffsetType &offset, const Tuple &tuple )
577  {
578  std::size_t size = std::get< i >( tuple ).size();
579  SubRangeType subFactor( factor );
580  SubDofVector< DofVector, typename DofVector::value_type > subDofVector( dofVector, size, offset[ i ] );
581  std::get< i >( tuple ).axpy( x, (ThisRangeType) subFactor, subDofVector );
582  }
583 
584  // axpy with jacobian range type
585  template< class Point, class DofVector, class Tuple >
586  static void apply ( const Point &x, const JacobianRangeType &factor, DofVector &dofVector, const OffsetType &offset, const Tuple &tuple )
587  {
588  std::size_t size = std::get< i >( tuple ).size();
589  SubJacobianRangeType subFactor( factor );
590  SubDofVector< DofVector, typename DofVector::value_type > subDofVector( dofVector, size, offset[ i ] );
591  std::get< i >( tuple ).axpy( x, (ThisJacobianRangeType) subFactor, subDofVector );
592  }
593 
594  // axpy with range and jacobian range type
595  template< class Point, class DofVector, class Tuple >
596  static void apply ( const Point &x, const RangeType &rangeFactor, const JacobianRangeType &jacobianFactor, DofVector &dofVector, const OffsetType &offset, const Tuple &tuple )
597  {
598  std::size_t size = std::get< i >( tuple ).size();
599  SubRangeType subRangeFactor( rangeFactor );
600  SubJacobianRangeType subJacobianFactor( jacobianFactor );
601  SubDofVector< DofVector, typename DofVector::value_type > subDofVector( dofVector, size, offset[ i ] );
602  std::get< i >( tuple ).axpy( x, (ThisRangeType) subRangeFactor, (ThisJacobianRangeType) subJacobianFactor, subDofVector );
603  }
604  };
605 
606  } // namespace Fem
607 
608 } // namespace Dune
609 
610 #endif // #ifndef DUNE_FEM_SPACE_BASISFUNCTIONSET_TUPLE_HH
FunctionSpaceType::DomainType DomainType
type of Domain Vector
Definition: basisfunctionset/tuple.hh:142
FunctionSpace< typename ContainedFunctionSpaceType::DomainFieldType, typename ContainedFunctionSpaceType::RangeFieldType, dimDomain, dimRange > FunctionSpaceType
type of analytical combiend function space
Definition: basisfunctionset/tuple.hh:139
VectorSpaceTraits< DomainField, RangeField, dimD, dimR >::RangeFieldType RangeFieldType
Intrinsic type used for values in the range field (usually a double)
Definition: functionspaceinterface.hh:62
std::size_t size() const
return size of basis function set
Definition: basisfunctionset/tuple.hh:195
Definition: utility.hh:135
A vector valued function space.
Definition: functionspace.hh:16
void axpy(const QuadratureType &quad, const VectorA &valuesA, const VectorB &valuesB, DofVector &dofs) const
Definition: basisfunctionset/tuple.hh:293
static constexpr T max(T a)
Definition: utility.hh:65
VectorSpaceTraits< DomainField, RangeField, dimD, dimR >::LinearMappingType JacobianRangeType
Intrinsic type used for the jacobian values has a Dune::FieldMatrix type interface.
Definition: functionspaceinterface.hh:74
int order(Std::index_sequence< i... >) const
Definition: basisfunctionset/tuple.hh:349
FieldVector< FieldMatrix< RangeFieldType, dimDomain, dimDomain >, dimRange > HessianRangeType
Intrinsic type used for the hessian values has a Dune::FieldMatrix type interface.
Definition: functionspaceinterface.hh:78
static const int dimDomain
size of domian space
Definition: basisfunctionset/tuple.hh:132
Definition: subobjects.hh:83
static constexpr T sum(T a)
Definition: utility.hh:33
static constexpr const int dimRange
size of range space
Definition: basisfunctionset/tuple.hh:135
Definition: basisfunctionset/tuple.hh:126
void hessianAll(const Point &x, HessianRangeArray &hessians) const
Definition: basisfunctionset/tuple.hh:275
FunctionSpaceType::RangeFieldType RangeFieldType
type of Range Vector field
Definition: basisfunctionset/tuple.hh:148
interface class representing a family of basis function sets
Definition: discontinuousgalerkin/basisfunctionsets.hh:23
const SubBasisFunctionSet< i >::type & subBasisFunctionSet() const
return i-th subbasisfunctionSet
Definition: basisfunctionset/tuple.hh:329
FunctionSpaceType::RangeType RangeType
type of Range Vector
Definition: basisfunctionset/tuple.hh:145
static const int numSubBasisFunctionSets()
return number of subBasisFunctionSets
Definition: basisfunctionset/tuple.hh:341
Dune::GeometryType type() const
Definition: basisfunctionset/tuple.hh:201
Extract Sub dof vector for single coordinate.
Definition: basisfunctionset/vectorial.hh:179
std::tuple_element< i, BasisFunctionSetTupleType >::type type
Definition: basisfunctionset/tuple.hh:128
Definition: coordinate.hh:4
void axpy(const Point &x, const JacobianRangeType &jacobianFactor, DofVector &dofs) const
Definition: basisfunctionset/tuple.hh:313
VectorSpaceTraits< DomainField, RangeField, dimD, dimR >::DomainType DomainType
Type of domain vector (using type of domain field) has a Dune::FieldVector type interface.
Definition: functionspaceinterface.hh:66
int order() const
return order of basis function set, maximal order in the tupleset
Definition: basisfunctionset/tuple.hh:189
void jacobianAll(const Point &x, const DofVector &dofs, JacobianRangeType &jacobian) const
Definition: basisfunctionset/tuple.hh:244
void evaluateAll(const QuadratureType &quad, const DofVector &dofs, RangeArray &ranges) const
Definition: basisfunctionset/tuple.hh:235
std::tuple_element< 0, BasisFunctionSetTupleType >::type::ReferenceElementType ReferenceElementType
type of reference element for this BasisFunctionSet
Definition: basisfunctionset/tuple.hh:162
void evaluateAll(const Point &x, const DofVector &dofs, RangeType &value) const
Definition: basisfunctionset/tuple.hh:220
Definition: basisfunctionset/tuple.hh:31
FunctionSpaceType::JacobianRangeType JacobianRangeType
type of Jacobian Vector/Matrix
Definition: basisfunctionset/tuple.hh:151
void hessianAll(const Point &x, const DofVector &dofs, HessianRangeType &hessian) const
Definition: basisfunctionset/tuple.hh:268
void evaluateAll(const Point &x, RangeArray &values) const
Definition: basisfunctionset/tuple.hh:227
const EntityType & entity() const
return entity
Definition: basisfunctionset/tuple.hh:207
std::size_t size(Std::index_sequence< i... >) const
Definition: basisfunctionset/tuple.hh:356
TupleBasisFunctionSet(const BasisFunctionSets &...basisFunctionSets)
Definition: basisfunctionset/tuple.hh:170
FunctionSpaceType::HessianRangeType HessianRangeType
type of Hessian Matrix
Definition: basisfunctionset/tuple.hh:154
void axpy(const Point &x, const RangeType &valueFactor, const JacobianRangeType &jacobianFactor, DofVector &dofs) const
Definition: basisfunctionset/tuple.hh:320
std::size_t offset(int i) const
return offset of the i-th subbasisfunctionSet in the whole set
Definition: basisfunctionset/tuple.hh:335
void axpy(const Point &x, const RangeType &valueFactor, DofVector &dofs) const
Definition: basisfunctionset/tuple.hh:306
void jacobianAll(const QuadratureType &quad, const DofVector &dofs, JacobianArray &jacobians) const
evaluate the jacobian of all basis functions and store the result in the jacobians array ...
Definition: basisfunctionset/tuple.hh:259
VectorSpaceTraits< DomainField, RangeField, dimD, dimR >::RangeType RangeType
Type of range vector (using type of range field) has a Dune::FieldVector type interface.
Definition: functionspaceinterface.hh:70
std::tuple_element< 0, BasisFunctionSetTupleType >::type::EntityType EntityType
type of Entity the basis function set is initialized on
Definition: basisfunctionset/tuple.hh:157
const ReferenceElementType & referenceElement() const
return entity
Definition: basisfunctionset/tuple.hh:213
void jacobianAll(const Point &x, JacobianRangeArray &jacobians) const
Definition: basisfunctionset/tuple.hh:251
TupleBasisFunctionSet()
Definition: basisfunctionset/tuple.hh:167
TupleBasisFunctionSet(const BasisFunctionSetTupleType &basisFunctionSetTuple)
Definition: basisfunctionset/tuple.hh:178
void axpy(const QuadratureType &quad, const Vector &values, DofVector &dofs) const
Definition: basisfunctionset/tuple.hh:283