dune-fem  2.4.1-rc
combinedfunction/combinedfunction.hh
Go to the documentation of this file.
1 #ifndef DUNE_FEM_FUNCTION_COMBINEDFUNCTION_COMBINEDFUNCTION_HH
2 #define DUNE_FEM_FUNCTION_COMBINEDFUNCTION_COMBINEDFUNCTION_HH
3 
4 #include <string>
5 #include <vector>
6 
14 
15 namespace Dune
16 {
17 
18  namespace Fem
19  {
20 
21  //- Forward declarations
22  template< class ContainedDiscreteFunction, int N >
24 
25  template< class ContainedDiscreteFunction, int N >
27 
28 
29  //- Class definitions
32  template< class ContainedDiscreteFunction, int N >
33  struct DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunction, N > >
34  {
35  typedef ContainedDiscreteFunction ContainedDiscreteFunctionType;
38 
39  typedef typename ContainedDiscreteFunctionType :: DiscreteFunctionSpaceType
43 
44  typedef typename DiscreteFunctionSpaceType :: DomainFieldType DomainFieldType;
45  typedef typename DiscreteFunctionSpaceType :: RangeFieldType RangeFieldType;
46  typedef typename DiscreteFunctionSpaceType :: DomainType DomainType;
47  typedef typename DiscreteFunctionSpaceType :: RangeType RangeType;
48 
49  typedef typename DiscreteFunctionSpaceType :: JacobianRangeType JacobianRangeType;
50 
51  typedef RangeFieldType DofType;
52  typedef typename DiscreteFunctionSpaceType :: MapperType MapperType;
53  typedef typename DiscreteFunctionSpaceType :: GridType GridType;
54  typedef typename DiscreteFunctionSpaceType :: GridPartType GridPartType;
55 
59 
60  typedef typename ContainedDiscreteFunctionType :: DofBlockType DofBlockType;
61  typedef typename ContainedDiscreteFunctionType :: ConstDofBlockType
63  typedef typename ContainedDiscreteFunctionType :: DofBlockPtrType
65  typedef typename ContainedDiscreteFunctionType :: ConstDofBlockPtrType
67 
71 
73  };
74 
75 
79  template <class ContainedDiscreteFunctionImp,int N >
81  : public DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >
82  {
85  BaseType;
86 
87  public:
89  typedef ContainedDiscreteFunctionImp ContainedDiscreteFunctionType;
90  typedef ContainedDiscreteFunctionType SubDiscreteFunctionType;
91 
94 
96  typedef typename BaseType::GridType GridType;
97 
100 
103  typedef typename BaseType::DiscreteFunctionType
106  typedef typename BaseType::DiscreteFunctionSpaceType
109  typedef typename Traits::ContainedDiscreteFunctionSpaceType
114  typedef typename BaseType::DofType DofType;
120  typedef typename BaseType::RangeType RangeType;
124  typedef typename Traits::MapperType MapperType;
125 
129  typedef typename BaseType::ConstDofIteratorType
131 
134 
136 
137  using BaseType :: assign; // needs DofIterator!
138  using BaseType :: axpy;
139  using BaseType :: space;
140 
141  //- Public methods
145  CombinedDiscreteFunction( const ContainedDiscreteFunctionType& func )
146  : BaseType( "combined_"+func.name(), createSpace( func.space().gridPart() ), LocalDofVectorAllocatorType( &ldvStack_ ) ),
147  ldvStack_( std::max( sizeof( DofType ), sizeof( DofType* ) ) * space().blockMapper().maxNumDofs() * DiscreteFunctionSpaceType::localBlockSize )
148  {
149  for (int i=0; i<N; ++i)
150  {
151  func_[i] = new ContainedDiscreteFunctionType(func);
152  }
153  }
154 
155  CombinedDiscreteFunction(const std::string &name,
157  : BaseType( "combined_"+name, createSpace( spc.gridPart() ), LocalDofVectorAllocatorType( &ldvStack_ ) ),
158  ldvStack_( std::max( sizeof( DofType ), sizeof( DofType* ) ) * space().blockMapper().maxNumDofs() * DiscreteFunctionSpaceType::localBlockSize )
159  {
160  for (int i=0; i<N; ++i)
161  {
162  func_[i] = new ContainedDiscreteFunctionType(name,spc);
163  }
164  }
165 
166  CombinedDiscreteFunction(const std::string &name,
167  const DiscreteFunctionSpaceType& spc )
168  : BaseType( "combined_"+name, createSpace( spc.gridPart() ), LocalDofVectorAllocatorType( &ldvStack_) ),
169  ldvStack_( std::max( sizeof( DofType ), sizeof( DofType* ) ) * space().blockMapper().maxNumDofs() * DiscreteFunctionSpaceType::localBlockSize )
170  {
171  for (int i=0; i<N; ++i)
172  {
173  func_[i] = new ContainedDiscreteFunctionType(name,space().containedSpace());
174  }
175  }
176 
179  CombinedDiscreteFunction(const ThisType &other)
180  : BaseType( other.name()+"_copy", createSpace( other.space().gridPart() ), LocalDofVectorAllocatorType( &ldvStack_ ) ),
181  ldvStack_( other.ldvStack_ )
182  {
183  for (int i=0; i<N; ++i)
184  {
185  func_[i] = new
186  ContainedDiscreteFunctionType(other.subFunction(i));
187  }
188  }
189 
192  {
193  for (int i=0; i<N; ++i)
194  delete func_[i];
195 
196  delete &space();
197  }
198 
199  private:
200  ThisType &operator= ( const ThisType &other );
201 
202  public:
204  inline void clear() {
205  for (int i=0; i<N; ++i)
206  func_[i]->clear();
207  }
208 
210  void assign( const ThisType &g )
211  {
212  for( int i=0; i<N; ++i)
213  func_[i]->assign( g.subFunction( i ) );
214  }
215 
217  int size() const
218  {
219  return func_[0]->size()*N;
220  }
221 
223  ThisType &operator+= ( const ThisType &g )
224  {
225  for (int i=0; i<N; ++i)
226  *func_[ i ] += g.subFunction( i );
227  return *this;
228  }
229 
232  using BaseType::operator-=;
233  ThisType &operator-= ( const ThisType &g )
234  {
235  // std::cout << " special operator -= in combineddf"
236  // << std::endl;
237  for( int i = 0; i < N; ++i )
238  *func_[ i ] -= g.subFunction( i );
239  return *this;
240  }
241 
243  DiscreteFunctionType& operator *= (const RangeFieldType &scalar)
244  {
245  for (int i=0; i<N; ++i)
246  *func_[i] *= scalar;
247  return *this;
248  }
249 
251  DiscreteFunctionType& operator /= (const RangeFieldType &scalar)
252  {
253  for (int i=0; i<N; ++i)
254  *func_[i] /= scalar;
255  return *this;
256  }
257 
260  void addScaled( const ThisType &g, const RangeFieldType &s )
261  {
262  axpy( g, s );
263  }
264 
267  void axpy( const RangeFieldType &s, const ThisType &g )
268  {
269  for (int i=0; i<N; ++i)
270  func_[i]->axpy( s, g.subFunction( i ) );
271  }
272 
274  RangeFieldType scalarProductDofs ( const ThisType &other ) const
275  {
276  RangeFieldType ret( 0 );
277  for( int i = 0; i < N; ++i )
278  ret += func_[ i ]->scalarProductDofs( other.subFunction( i ) );
279  return ret;
280  }
281 
283  template< class StreamTraits >
285  {
286  for (int i=0; i<N; ++i)
287  func_[i]->read(in);
288  }
290  template< class StreamTraits >
291  inline void write ( OutStreamInterface< StreamTraits >& out) const
292  {
293  for (int i=0; i<N; ++i)
294  func_[i]->write(out);
295  }
296 
298  inline void print( std :: ostream &out ) const {
299  for (int i=0; i<N; ++i)
300  func_[i]->print(out);
301  }
302 
304  inline bool dofsValid () const {
305  bool ret = func_[0]->dofsValid();
306  for (int i=1;i<N;i++)
307  ret |= func_[i]->dofsValid();
308  return ret;
309  }
310 
311  inline ConstDofBlockPtrType block ( unsigned int index ) const
312  {
313  // This is wrong with the current implementation of CombinedSpace
314  const int containedSize = func_[ 0 ]->space().blockMapper().size();
315  const int component = index / containedSize;
316  const int containedIndex = index % containedSize;
317  const ContainedDiscreteFunctionType& func = *(func_[ component ]);
318  return func.block( containedIndex );
319  }
320 
321  inline DofBlockPtrType block ( unsigned int index )
322  {
323  // This is wrong with the current implementation of CombinedSpace
324  const int containedSize = func_[ 0 ]->space().blockMapper().size();
325  const int component = index / containedSize;
326  const int containedIndex = index % containedSize;
327  return func_[ component ]->block( containedIndex );
328  }
329 
330  inline const RangeFieldType &dof(unsigned int index) const
331  {
332  /*
333  int variable = index % N;
334  int point = index / N;
335  */
336  int variable = index / func_[0]->size();
337  int point = index % func_[0]->size();
338  return func_[variable]->dof(point);
339  }
340 
341  inline RangeFieldType &dof ( unsigned int index )
342  {
343  /*
344  int variable = index % N;
345  int point = index / N;
346  */
347  int variable = index / func_[0]->size();
348  int point = index % func_[0]->size();
349  return func_[variable]->dof(point);
350  }
351 
353  inline ConstDofIteratorType dbegin () const
354  {
355  return ConstDofIteratorType(DofIteratorType(*this));
356  }
358  inline ConstDofIteratorType dend () const
359  {
360  return ConstDofIteratorType(DofIteratorType(false,*this));
361  }
363  inline DofIteratorType dbegin ()
364  {
365  return DofIteratorType(*this);
366  }
368  inline DofIteratorType dend ()
369  {
370  return DofIteratorType(false,*this);
371  }
372 
373  inline ContainedDiscreteFunctionType& subFunction( const int i )
374  {
375  return *(func_[i]);
376  }
377 
378  inline const ContainedDiscreteFunctionType& subFunction( const int i ) const
379  {
380  return *(func_[i]);
381  }
382 
384  {
385  return space().containedSpace();
386  }
387 
388  //- Forbidden members
389  private:
390  typedef ThisType MyType;
391  const MyType& interface() const { return *this; }
392 
393  DiscreteFunctionSpaceType& createSpace( GridPartType& gp )
394  {
395  // we need to delete the space in the destructor
396  return *(new DiscreteFunctionSpaceType( gp ));
397  }
398 
399  typename Traits :: LocalDofVectorStackType ldvStack_;
400  ContainedDiscreteFunctionType* func_[N];
401  friend class CombinedDiscreteFunctionDofIterator<ContainedDiscreteFunctionType,N>;
402  };
403 
407  template <class ContainedDiscreteFunctionImp,int N>
409  : public DofIteratorDefault <
410  typename ContainedDiscreteFunctionImp::DofType ,
411  CombinedDiscreteFunctionDofIterator<ContainedDiscreteFunctionImp,N> >
412  {
413  public:
416  typedef typename Traits::DiscreteFunctionType DiscreteFunctionType;
417  typedef typename Traits::ContainedDiscreteFunctionType ContainedDiscreteFunctionType;
418  typedef typename ContainedDiscreteFunctionType::DofIteratorType ContainedDofIteratorType;
419  typedef typename ContainedDiscreteFunctionType::ConstDofIteratorType ContainedConstDofIteratorType;
420  typedef typename Traits::DofType DofType;
421 
424  (bool end,const DiscreteFunctionType& df) :
425  df_(const_cast<DiscreteFunctionType&>(df)),
426  comp_(N-1),
427  iter_(df.func_[N-1]->dend()),
428  endIter_(df.func_[N-1]->dend())
429  {}
432  (const DiscreteFunctionType& df) :
433  df_(const_cast<DiscreteFunctionType&>(df)),
434  comp_(0),
435  iter_(df.func_[0]->dbegin()),
436  endIter_(df.func_[0]->dend())
437  {}
440  (bool end,DiscreteFunctionType& df) :
441  df_(df),
442  comp_(N-1),
443  iter_(df.func_[N-1]->dend()),
444  endIter_(df.func_[N-1]->dend())
445  {}
448  (DiscreteFunctionType& df) :
449  df_(df),
450  comp_(0),
451  iter_(df.func_[0]->dbegin()),
452  endIter_(df.func_[0]->dend())
453  {}
455  CombinedDiscreteFunctionDofIterator(const ThisType& other):
456  df_(other.df_),
457  comp_(other.comp_),
458  iter_(other.iter_),
459  endIter_(other.endIter_)
460  {}
461 
463  ThisType& operator=(const ThisType& other) {
464  df_ = other.df_;
465  comp_ = other.comp_;
466  iter_ = other.iter_;
467  endIter_ = other.endIter_;
468  return *this;
469  }
470 
472  DofType& operator *() { return *iter_; }
473 
475  const DofType& operator * () const { return *iter_; }
476 
478  ThisType& operator++ () {
479  ++iter_;
480  if (iter_==endIter_ && comp_<N-1) {
481  ++comp_;
482  iter_ = df_.func_[comp_]->dbegin();
483  endIter_ = df_.func_[comp_]->dend();
484  }
485  return *this;
486  }
487 
489  bool operator == (const ThisType & I ) const { return (comp_ == I.comp_) && (iter_ == I.iter_); }
490 
492  bool operator != (const ThisType & I ) const { return !((*this) == I); }
493 
494  void reset()
495  {
496  comp_ = 0;
497  iter_ = df_.func_[ 0 ]->dbegin();
498  endIter_ = df_.func_[ 0 ]->dend();
499  }
500 
501  private:
502  DiscreteFunctionType& df_;
504  mutable int comp_;
505  mutable ContainedDofIteratorType iter_,endIter_;
506 
507  };
508 
509  } // namespace Fem
510 
511 } // namespace Dune
512 
513 #endif // #ifndef DUNE_FEM_FUNCTION_COMBINEDFUNCTION_COMBINEDFUNCTION_HH
ConstDofIteratorDefault< DofIteratorType > ConstDofIteratorType
Definition: combinedfunction/combinedfunction.hh:58
CombinedDiscreteFunctionDofIterator(const ThisType &other)
Copy Constructor.
Definition: combinedfunction/combinedfunction.hh:455
DiscreteFunctionSpaceType::DomainType DomainType
Definition: combinedfunction/combinedfunction.hh:46
ContainedDiscreteFunctionType::ConstDofIteratorType ContainedConstDofIteratorType
Definition: combinedfunction/combinedfunction.hh:419
ContainedDiscreteFunctionType::DofBlockType DofBlockType
Definition: combinedfunction/combinedfunction.hh:60
BaseType::DofBlockPtrType DofBlockPtrType
Definition: discretefunction.hh:608
Definition: dofiterator.hh:208
BaseType::RangeType RangeType
Vector type used for the range field.
Definition: combinedfunction/combinedfunction.hh:120
void clear()
set all degrees of freedom to zero
Definition: combinedfunction/combinedfunction.hh:204
DiscreteFunctionSpaceType::GridPartType GridPartType
Definition: combinedfunction/combinedfunction.hh:54
ContainedDiscreteFunction ContainedDiscreteFunctionType
Definition: combinedfunction/combinedfunction.hh:35
ContainedDiscreteFunctionType::ConstDofBlockType ConstDofBlockType
Definition: combinedfunction/combinedfunction.hh:62
ThisType & operator=(const ThisType &other)
Assignment operator.
Definition: combinedfunction/combinedfunction.hh:463
RangeFieldType DofType
Definition: combinedfunction/combinedfunction.hh:51
BaseType::LocalDofVectorAllocatorType LocalDofVectorAllocatorType
Definition: combinedfunction/combinedfunction.hh:135
Traits class for a DiscreteFunction.
Definition: discretefunction.hh:60
ConstDofBlockPtrType block(unsigned int index) const
Definition: combinedfunction/combinedfunction.hh:311
DiscreteFunctionSpaceType::MapperType MapperType
Definition: combinedfunction/combinedfunction.hh:52
BaseType::RangeFieldType RangeFieldType
Intrinsic type used for range field (like DofType)
Definition: combinedfunction/combinedfunction.hh:116
Traits::DofIteratorType DofIteratorType
type of the dof iterator
Definition: discretefunction.hh:591
Traits::DofType DofType
Definition: combinedfunction/combinedfunction.hh:420
Construct a vector with a dynamic size.
Definition: referencevector.hh:23
static double max(const Double &v, const double p)
Definition: double.hh:387
Definition: discretefunction.hh:63
Traits::DiscreteFunctionType DiscreteFunctionType
Definition: combinedfunction/combinedfunction.hh:416
ContainedDiscreteFunctionType::DiscreteFunctionSpaceType ContainedDiscreteFunctionSpaceType
Definition: combinedfunction/combinedfunction.hh:40
ContainedDiscreteFunctionType::DofIteratorType ContainedDofIteratorType
Definition: combinedfunction/combinedfunction.hh:418
BaseType::DiscreteFunctionType DiscreteFunctionType
Definition: combinedfunction/combinedfunction.hh:104
BaseType::DomainType DomainType
Vector type used for the domain field.
Definition: combinedfunction/combinedfunction.hh:122
DiscreteFunctionSpaceType::RangeType RangeType
type of range vector
Definition: discretefunction.hh:579
BaseType::DofIteratorType DofIteratorType
Iterator over dof container.
Definition: combinedfunction/combinedfunction.hh:127
void axpy(const T &a, const T &x, T &y)
Definition: space/basisfunctionset/functor.hh:37
RangeFieldType & dof(unsigned int index)
Definition: combinedfunction/combinedfunction.hh:341
DiscreteFunctionSpaceType::RangeFieldType RangeFieldType
Definition: combinedfunction/combinedfunction.hh:45
This file implements a dense vector with a dynamic size.
void write(OutStreamInterface< StreamTraits > &out) const
write the discrete function into a stream
Definition: combinedfunction/combinedfunction.hh:291
DiscreteFunctionSpaceType::RangeFieldType RangeFieldType
type of range field (usually a float type)
Definition: discretefunction.hh:588
bool operator!=(const Double &a, const Double &b)
Definition: double.hh:629
DiscreteFunctionSpaceType::DomainFieldType DomainFieldType
type of domain field (usually a float type)
Definition: discretefunction.hh:586
BaseType::GridPartType GridPartType
type of the underlying grid part
Definition: discretefunction.hh:574
DynamicReferenceVector< DofType, LocalDofVectorAllocatorType > LocalDofVectorType
Definition: combinedfunction/combinedfunction.hh:70
BaseType::DomainFieldType DomainFieldType
Intrinsic type used for the domain field.
Definition: combinedfunction/combinedfunction.hh:118
ContainedDiscreteFunctionImp ContainedDiscreteFunctionType
Discrete function this discrete function belongs to.
Definition: combinedfunction/combinedfunction.hh:89
CombinedDiscreteFunction(const ContainedDiscreteFunctionType &func)
Definition: combinedfunction/combinedfunction.hh:145
void addScaled(const ThisType &g, const RangeFieldType &s)
Definition: combinedfunction/combinedfunction.hh:260
bool operator==(const Double &a, const Double &b)
Definition: double.hh:589
ThreadSafeValue< UninitializedObjectStack > LocalDofVectorStackType
Definition: combinedfunction/combinedfunction.hh:68
MutableLocalFunction< DiscreteFunctionType > LocalFunctionType
Definition: combinedfunction/combinedfunction.hh:72
Definition: coordinate.hh:4
CombinedDiscreteFunction(const std::string &name, const ContainedDiscreteFunctionSpaceType &spc)
Definition: combinedfunction/combinedfunction.hh:155
ConstDofIteratorType dend() const
obtain an iterator pointing behind the last DoF (read-only)
Definition: combinedfunction/combinedfunction.hh:358
BaseType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
the combined discrete function type
Definition: combinedfunction/combinedfunction.hh:107
abstract interface for an input stream
Definition: streams.hh:177
Traits::ConstDofIteratorType ConstDofIteratorType
type of the const dof iterator
Definition: discretefunction.hh:593
Definition: combinedspace/combinedspace.hh:32
BaseType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of discrete function space
Definition: discretefunction.hh:571
ContainedDiscreteFunctionType::ConstDofBlockPtrType ConstDofBlockPtrType
Definition: combinedfunction/combinedfunction.hh:66
~CombinedDiscreteFunction()
Destructor.
Definition: combinedfunction/combinedfunction.hh:191
ConstDofIteratorType dbegin() const
obtain an iterator pointing to the first DoF (read-only)
Definition: combinedfunction/combinedfunction.hh:353
bool dofsValid() const
check for NaNs
Definition: combinedfunction/combinedfunction.hh:304
Double operator*(const Double &a, const Double &b)
Definition: double.hh:495
BaseType::ConstDofBlockPtrType ConstDofBlockPtrType
Definition: combinedfunction/combinedfunction.hh:133
CombinedDiscreteFunctionDofIterator< ContainedDiscreteFunctionImp, N > ThisType
Definition: combinedfunction/combinedfunction.hh:414
DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType
Definition: combinedfunction/combinedfunction.hh:49
STL namespace.
DiscreteFunctionSpaceType::RangeType RangeType
Definition: combinedfunction/combinedfunction.hh:47
DofIteratorType dbegin()
obtain an iterator pointing to the first DoF (read-write)
Definition: combinedfunction/combinedfunction.hh:363
DofBlockPtrType block(unsigned int index)
Definition: combinedfunction/combinedfunction.hh:321
Traits::MapperType MapperType
Mapper type (from the space)
Definition: combinedfunction/combinedfunction.hh:124
BaseType::GridPartType GridPartType
GridPart implementation.
Definition: combinedfunction/combinedfunction.hh:99
Definition: stackallocator.hh:61
CombinedSpace< ContainedDiscreteFunctionSpaceType, N, VariableBased > DiscreteFunctionSpaceType
Definition: combinedfunction/combinedfunction.hh:42
ContainedDiscreteFunctionSpaceType & subSpace()
Definition: combinedfunction/combinedfunction.hh:383
BaseType::ConstDofBlockPtrType ConstDofBlockPtrType
Definition: discretefunction.hh:609
StackAllocator< DofType, LocalDofVectorStackType * > LocalDofVectorAllocatorType
Definition: combinedfunction/combinedfunction.hh:69
void read(InStreamInterface< StreamTraits > &in)
read the discrete function from a stream
Definition: combinedfunction/combinedfunction.hh:284
Iterator over an array of dofs.
Definition: combinedfunction/combinedfunction.hh:26
BaseType::ConstDofIteratorType ConstDofIteratorType
Read-only iterator over dof container.
Definition: combinedfunction/combinedfunction.hh:130
DiscreteFunctionSpaceType::DomainType DomainType
type of domain vector
Definition: discretefunction.hh:577
BaseType::DofType DofType
Intrinsic type used for dofs (typically a float type)
Definition: combinedfunction/combinedfunction.hh:114
void reset()
Definition: combinedfunction/combinedfunction.hh:494
DofIteratorType dend()
obtain an iterator pointing behind the last DoF (read-write)
Definition: combinedfunction/combinedfunction.hh:368
BaseType::DofBlockPtrType DofBlockPtrType
Definition: combinedfunction/combinedfunction.hh:132
CombinedDiscreteFunction< ContainedDiscreteFunctionType, N > DiscreteFunctionType
Definition: combinedfunction/combinedfunction.hh:37
ContainedDiscreteFunctionType::DofBlockPtrType DofBlockPtrType
Definition: combinedfunction/combinedfunction.hh:64
ContainedDiscreteFunctionType SubDiscreteFunctionType
Definition: combinedfunction/combinedfunction.hh:90
CombinedDiscreteFunction(const std::string &name, const DiscreteFunctionSpaceType &spc)
Definition: combinedfunction/combinedfunction.hh:166
ContainedDiscreteFunctionType & subFunction(const int i)
Definition: combinedfunction/combinedfunction.hh:373
void print(std::ostream &out) const
print all DoFs to a stream (for debugging purposes)
Definition: combinedfunction/combinedfunction.hh:298
default implementation of DofManagerInterface
Definition: dofiterator.hh:141
void assign(const ThisType &g)
Definition: combinedfunction/combinedfunction.hh:210
CombinedDiscreteFunctionDofIterator< ContainedDiscreteFunctionType, N > DofIteratorType
Definition: combinedfunction/combinedfunction.hh:57
Definition: const.hh:24
const ContainedDiscreteFunctionType & subFunction(const int i) const
Definition: combinedfunction/combinedfunction.hh:378
ContainedDiscreteFunctionSpaceType SubDiscreteFunctionSpaceType
Definition: combinedfunction/combinedfunction.hh:112
CombinedDiscreteFunction(const ThisType &other)
Definition: combinedfunction/combinedfunction.hh:179
Traits::LocalDofVectorAllocatorType LocalDofVectorAllocatorType
type of LocalDofVector
Definition: discretefunction.hh:601
RangeFieldType scalarProductDofs(const ThisType &other) const
Definition: combinedfunction/combinedfunction.hh:274
DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > > Traits
Definition: combinedfunction/combinedfunction.hh:415
DiscreteFunctionTraits< ThisType > Traits
Traits class with all necessary type definitions.
Definition: combinedfunction/combinedfunction.hh:93
Traits::ContainedDiscreteFunctionSpaceType ContainedDiscreteFunctionSpaceType
Contained discrete function space.
Definition: combinedfunction/combinedfunction.hh:110
int size() const
obtain total number of DoFs
Definition: combinedfunction/combinedfunction.hh:217
Definition: combinedfunction/combinedfunction.hh:23
void axpy(const RangeFieldType &s, const ThisType &g)
axpy operation
Definition: combinedfunction/combinedfunction.hh:267
Traits::ContainedDiscreteFunctionType ContainedDiscreteFunctionType
Definition: combinedfunction/combinedfunction.hh:417
DiscreteFunctionSpaceType::DomainFieldType DomainFieldType
Definition: combinedfunction/combinedfunction.hh:44
const RangeFieldType & dof(unsigned int index) const
Definition: combinedfunction/combinedfunction.hh:330
abstract interface for an output stream
Definition: streams.hh:44
BaseType::GridType GridType
Grid implementation.
Definition: combinedfunction/combinedfunction.hh:96
DiscreteFunctionSpaceType::GridType GridType
Type of the underlying grid.
Definition: discretefunction.hh:117
DiscreteFunctionSpaceType::GridType GridType
Definition: combinedfunction/combinedfunction.hh:53