dune-fem  2.8-git
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 <algorithm>
5 #include <iostream>
6 #include <string>
7 
15 
16 namespace Dune
17 {
18 
19  namespace Fem
20  {
21 
22  //- Forward declarations
23  template< class ContainedDiscreteFunction, int N >
24  class CombinedDiscreteFunction;
25 
26  template< class ContainedDiscreteFunction, int N >
27  class CombinedDiscreteFunctionDofIterator;
28 
29 
30  //- Class definitions
33  template< class ContainedDiscreteFunction, int N >
34  struct DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunction, N > >
35  {
36  typedef ContainedDiscreteFunction ContainedDiscreteFunctionType;
39 
40  typedef typename ContainedDiscreteFunctionType :: DiscreteFunctionSpaceType
44 
45  typedef typename DiscreteFunctionSpaceType :: DomainFieldType DomainFieldType;
46  typedef typename DiscreteFunctionSpaceType :: RangeFieldType RangeFieldType;
47  typedef typename DiscreteFunctionSpaceType :: DomainType DomainType;
48  typedef typename DiscreteFunctionSpaceType :: RangeType RangeType;
49 
50  typedef typename DiscreteFunctionSpaceType :: JacobianRangeType JacobianRangeType;
51 
53  typedef typename DiscreteFunctionSpaceType :: MapperType MapperType;
54  typedef typename DiscreteFunctionSpaceType :: GridType GridType;
55  typedef typename DiscreteFunctionSpaceType :: GridPartType GridPartType;
56 
60 
61  typedef typename ContainedDiscreteFunctionType :: DofBlockType DofBlockType;
62  typedef typename ContainedDiscreteFunctionType :: ConstDofBlockType
64  typedef typename ContainedDiscreteFunctionType :: DofBlockPtrType
66  typedef typename ContainedDiscreteFunctionType :: ConstDofBlockPtrType
68 
72 
74  };
75 
76 
80  template <class ContainedDiscreteFunctionImp,int N >
82  : public DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >
83  {
86  BaseType;
87 
88  public:
90  typedef ContainedDiscreteFunctionImp ContainedDiscreteFunctionType;
92 
95 
97  typedef typename BaseType::GridType GridType;
98 
101 
104  typedef typename BaseType::DiscreteFunctionType
107  typedef typename BaseType::DiscreteFunctionSpaceType
110  typedef typename Traits::ContainedDiscreteFunctionSpaceType
115  typedef typename BaseType::DofType DofType;
121  typedef typename BaseType::RangeType RangeType;
125  typedef typename Traits::MapperType MapperType;
126 
130  typedef typename BaseType::ConstDofIteratorType
132 
135 
137 
138  using BaseType :: assign; // needs DofIterator!
139  using BaseType :: axpy;
140  using BaseType :: space;
141 
144  : BaseType( "combined_"+func.name(), createSpace( func.space().gridPart() ), LocalDofVectorAllocatorType( &ldvStack_ ) ),
145  ldvStack_( std::max( sizeof( DofType ), sizeof( DofType* ) ) * space().blockMapper().maxNumDofs() * DiscreteFunctionSpaceType::localBlockSize )
146  {
147  for (int i=0; i<N; ++i)
148  func_[i] = new ContainedDiscreteFunctionType(func);
149  }
150 
151  CombinedDiscreteFunction(const std::string &name,
153  : BaseType( "combined_"+name, createSpace( spc.gridPart() ), LocalDofVectorAllocatorType( &ldvStack_ ) ),
154  ldvStack_( std::max( sizeof( DofType ), sizeof( DofType* ) ) * space().blockMapper().maxNumDofs() * DiscreteFunctionSpaceType::localBlockSize )
155  {
156  for (int i=0; i<N; ++i)
157  func_[i] = new ContainedDiscreteFunctionType(name,spc);
158  }
159 
160  CombinedDiscreteFunction(const std::string &name,
161  const DiscreteFunctionSpaceType& spc )
162  : BaseType( "combined_"+name, createSpace( spc.gridPart() ), LocalDofVectorAllocatorType( &ldvStack_) ),
163  ldvStack_( std::max( sizeof( DofType ), sizeof( DofType* ) ) * space().blockMapper().maxNumDofs() * DiscreteFunctionSpaceType::localBlockSize )
164  {
165  for (int i=0; i<N; ++i)
166  {
167  func_[i] = new ContainedDiscreteFunctionType(name,space().containedSpace());
168  }
169  }
170 
174  : BaseType( other.name()+"_copy", createSpace( other.space().gridPart() ), LocalDofVectorAllocatorType( &ldvStack_ ) ),
175  ldvStack_( other.ldvStack_ )
176  {
177  for (int i=0; i<N; ++i)
178  func_[i] = new ContainedDiscreteFunctionType(other.subFunction(i));
179  }
180 
183  {
184  for (int i=0; i<N; ++i)
185  delete func_[i];
186 
187  delete &space();
188  }
189 
191  ThisType& operator= ( const ThisType& ) = delete;
192  ThisType& operator= ( ThisType&& ) = delete;
193 
195  void clear()
196  {
197  for (int i=0; i<N; ++i)
198  func_[i]->clear();
199  }
200 
202  void assign( const ThisType &g )
203  {
204  for( int i=0; i<N; ++i)
205  func_[i]->assign( g.subFunction( i ) );
206  }
207 
209  int size() const
210  {
211  return func_[0]->size()*N;
212  }
213 
216  {
217  for (int i=0; i<N; ++i)
218  *func_[ i ] += g.subFunction( i );
219  return *this;
220  }
221 
224  using BaseType::operator-=;
226  {
227  for( int i = 0; i < N; ++i )
228  *func_[ i ] -= g.subFunction( i );
229  return *this;
230  }
231 
234  {
235  for (int i=0; i<N; ++i)
236  *func_[i] *= scalar;
237  return *this;
238  }
239 
242  {
243  for (int i=0; i<N; ++i)
244  *func_[i] /= scalar;
245  return *this;
246  }
247 
250  void addScaled( const ThisType &g, const RangeFieldType &s )
251  {
252  axpy( g, s );
253  }
254 
257  void axpy( const RangeFieldType &s, const ThisType &g )
258  {
259  for (int i=0; i<N; ++i)
260  func_[i]->axpy( s, g.subFunction( i ) );
261  }
262 
265  {
266  RangeFieldType ret( 0 );
267  for( int i = 0; i < N; ++i )
268  ret += func_[ i ]->scalarProductDofs( other.subFunction( i ) );
269  return ret;
270  }
271 
273  template< class StreamTraits >
275  {
276  for (int i=0; i<N; ++i)
277  func_[i]->read(in);
278  }
280  template< class StreamTraits >
282  {
283  for (int i=0; i<N; ++i)
284  func_[i]->write(out);
285  }
286 
288  void print( std :: ostream &out ) const
289  {
290  for (int i=0; i<N; ++i)
291  func_[i]->print(out);
292  }
293 
295  bool dofsValid () const
296  {
297  bool ret = func_[0]->dofsValid();
298  for (int i=1;i<N;i++)
299  ret |= func_[i]->dofsValid();
300  return ret;
301  }
302 
303  ConstDofBlockPtrType block ( unsigned int index ) const
304  {
305  // This is wrong with the current implementation of CombinedSpace
306  const int containedSize = func_[ 0 ]->space().blockMapper().size();
307  const int component = index / containedSize;
308  const int containedIndex = index % containedSize;
309  const ContainedDiscreteFunctionType& func = *(func_[ component ]);
310  return func.block( containedIndex );
311  }
312 
313  DofBlockPtrType block ( unsigned int index )
314  {
315  // This is wrong with the current implementation of CombinedSpace
316  const int containedSize = func_[ 0 ]->space().blockMapper().size();
317  const int component = index / containedSize;
318  const int containedIndex = index % containedSize;
319  return func_[ component ]->block( containedIndex );
320  }
321 
322  const RangeFieldType &dof(unsigned int index) const
323  {
324  int variable = index / func_[0]->size();
325  int point = index % func_[0]->size();
326  return func_[variable]->dof(point);
327  }
328 
329  RangeFieldType &dof ( unsigned int index )
330  {
331  int variable = index / func_[0]->size();
332  int point = index % func_[0]->size();
333  return func_[variable]->dof(point);
334  }
335 
338  {
339  return ConstDofIteratorType(DofIteratorType(*this));
340  }
343  {
344  return ConstDofIteratorType(DofIteratorType(false,*this));
345  }
348  {
349  return DofIteratorType(*this);
350  }
353  {
354  return DofIteratorType(false,*this);
355  }
356 
358  {
359  return *(func_[i]);
360  }
361 
362  const ContainedDiscreteFunctionType& subFunction( const int i ) const
363  {
364  return *(func_[i]);
365  }
366 
368  {
369  return space().containedSpace();
370  }
371 
372  private:
373  const ThisType& interface() const
374  {
375  return *this;
376  }
377 
378  DiscreteFunctionSpaceType& createSpace( GridPartType& gp )
379  {
380  // we need to delete the space in the destructor
381  return *(new DiscreteFunctionSpaceType( gp ));
382  }
383 
384  typename Traits :: LocalDofVectorStackType ldvStack_;
387  };
388 
392  template <class ContainedDiscreteFunctionImp,int N>
394  : public DofIteratorDefault <
395  typename ContainedDiscreteFunctionImp::DofType ,
396  CombinedDiscreteFunctionDofIterator<ContainedDiscreteFunctionImp,N> >
397  {
398  public:
401  typedef typename Traits::DiscreteFunctionType DiscreteFunctionType;
402  typedef typename Traits::ContainedDiscreteFunctionType ContainedDiscreteFunctionType;
403  typedef typename ContainedDiscreteFunctionType::DofIteratorType ContainedDofIteratorType;
404  typedef typename ContainedDiscreteFunctionType::ConstDofIteratorType ContainedConstDofIteratorType;
405  typedef typename Traits::DofType DofType;
406 
409  df_(const_cast<DiscreteFunctionType&>(df)),
410  comp_(N-1),
411  iter_(df.func_[N-1]->dend()),
412  endIter_(df.func_[N-1]->dend())
413  {}
416  df_(const_cast<DiscreteFunctionType&>(df)),
417  comp_(0),
418  iter_(df.func_[0]->dbegin()),
419  endIter_(df.func_[0]->dend())
420  {}
423  df_(df),
424  comp_(N-1),
425  iter_(df.func_[N-1]->dend()),
426  endIter_(df.func_[N-1]->dend())
427  {}
430  df_(df),
431  comp_(0),
432  iter_(df.func_[0]->dbegin()),
433  endIter_(df.func_[0]->dend())
434  {}
437  df_(other.df_),
438  comp_(other.comp_),
439  iter_(other.iter_),
440  endIter_(other.endIter_)
441  {}
442 
444  ThisType& operator=(const ThisType& other)
445  {
446  df_ = other.df_;
447  comp_ = other.comp_;
448  iter_ = other.iter_;
449  endIter_ = other.endIter_;
450  return *this;
451  }
452 
455  {
456  return *iter_;
457  }
458 
460  const DofType& operator * () const
461  {
462  return *iter_;
463  }
464 
467  {
468  ++iter_;
469  if (iter_==endIter_ && comp_<N-1)
470  {
471  ++comp_;
472  iter_ = df_.func_[comp_]->dbegin();
473  endIter_ = df_.func_[comp_]->dend();
474  }
475  return *this;
476  }
477 
479  bool operator == (const ThisType & I ) const
480  {
481  return (comp_ == I.comp_) && (iter_ == I.iter_);
482  }
483 
485  bool operator != (const ThisType & I ) const
486  {
487  return !((*this) == I);
488  }
489 
490  void reset()
491  {
492  comp_ = 0;
493  iter_ = df_.func_[ 0 ]->dbegin();
494  endIter_ = df_.func_[ 0 ]->dend();
495  }
496 
497  private:
500  mutable int comp_;
501  mutable ContainedDofIteratorType iter_,endIter_;
502 
503  };
504 
505  } // namespace Fem
506 
507 } // namespace Dune
508 
509 #endif // #ifndef DUNE_FEM_FUNCTION_COMBINEDFUNCTION_COMBINEDFUNCTION_HH
Definition: bindguard.hh:11
static double max(const Double &v, const double p)
Definition: double.hh:398
Definition: stackallocator.hh:61
Definition: combinedfunction/combinedfunction.hh:83
CombinedDiscreteFunction(const ThisType &other)
Definition: combinedfunction/combinedfunction.hh:173
RangeFieldType scalarProductDofs(const ThisType &other) const
Definition: combinedfunction/combinedfunction.hh:264
BaseType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
the combined discrete function type
Definition: combinedfunction/combinedfunction.hh:108
DofIteratorType dend()
obtain an iterator pointing behind the last DoF (read-write)
Definition: combinedfunction/combinedfunction.hh:352
RangeFieldType & dof(unsigned int index)
Definition: combinedfunction/combinedfunction.hh:329
DofIteratorType dbegin()
obtain an iterator pointing to the first DoF (read-write)
Definition: combinedfunction/combinedfunction.hh:347
void clear()
set all degrees of freedom to zero
Definition: combinedfunction/combinedfunction.hh:195
DofBlockPtrType block(unsigned int index)
Definition: combinedfunction/combinedfunction.hh:313
void assign(const ThisType &g)
Definition: combinedfunction/combinedfunction.hh:202
ConstDofIteratorType dbegin() const
obtain an iterator pointing to the first DoF (read-only)
Definition: combinedfunction/combinedfunction.hh:337
int size() const
obtain total number of DoFs
Definition: combinedfunction/combinedfunction.hh:209
BaseType::GridPartType GridPartType
GridPart implementation.
Definition: combinedfunction/combinedfunction.hh:100
BaseType ::ConstDofBlockPtrType ConstDofBlockPtrType
Definition: combinedfunction/combinedfunction.hh:134
void axpy(const RangeFieldType &s, const ThisType &g)
axpy operation
Definition: combinedfunction/combinedfunction.hh:257
ContainedDiscreteFunctionType SubDiscreteFunctionType
Definition: combinedfunction/combinedfunction.hh:91
CombinedDiscreteFunction(const std::string &name, const ContainedDiscreteFunctionSpaceType &spc)
Definition: combinedfunction/combinedfunction.hh:151
BaseType::RangeType RangeType
Vector type used for the range field.
Definition: combinedfunction/combinedfunction.hh:121
void read(InStreamInterface< StreamTraits > &in)
read the discrete function from a stream
Definition: combinedfunction/combinedfunction.hh:274
const ContainedDiscreteFunctionType & subFunction(const int i) const
Definition: combinedfunction/combinedfunction.hh:362
Traits::MapperType MapperType
Mapper type (from the space)
Definition: combinedfunction/combinedfunction.hh:125
bool dofsValid() const
check for NaNs
Definition: combinedfunction/combinedfunction.hh:295
ContainedDiscreteFunctionType & subFunction(const int i)
Definition: combinedfunction/combinedfunction.hh:357
BaseType::ConstDofIteratorType ConstDofIteratorType
Read-only iterator over dof container.
Definition: combinedfunction/combinedfunction.hh:131
ThisType & operator+=(const ThisType &g)
Definition: combinedfunction/combinedfunction.hh:215
DiscreteFunctionType & operator*=(const RangeFieldType &scalar)
multiply all DoFs by a scalar factor
Definition: combinedfunction/combinedfunction.hh:233
BaseType ::DofBlockPtrType DofBlockPtrType
Definition: combinedfunction/combinedfunction.hh:133
const RangeFieldType & dof(unsigned int index) const
Definition: combinedfunction/combinedfunction.hh:322
void write(OutStreamInterface< StreamTraits > &out) const
write the discrete function into a stream
Definition: combinedfunction/combinedfunction.hh:281
BaseType::RangeFieldType RangeFieldType
Intrinsic type used for range field (like DofType)
Definition: combinedfunction/combinedfunction.hh:117
CombinedDiscreteFunction(const std::string &name, const DiscreteFunctionSpaceType &spc)
Definition: combinedfunction/combinedfunction.hh:160
BaseType::DofIteratorType DofIteratorType
Iterator over dof container.
Definition: combinedfunction/combinedfunction.hh:128
void addScaled(const ThisType &g, const RangeFieldType &s)
Definition: combinedfunction/combinedfunction.hh:250
BaseType::DomainType DomainType
Vector type used for the domain field.
Definition: combinedfunction/combinedfunction.hh:123
BaseType::GridType GridType
Grid implementation.
Definition: combinedfunction/combinedfunction.hh:97
ConstDofIteratorType dend() const
obtain an iterator pointing behind the last DoF (read-only)
Definition: combinedfunction/combinedfunction.hh:342
BaseType ::LocalDofVectorAllocatorType LocalDofVectorAllocatorType
Definition: combinedfunction/combinedfunction.hh:136
ConstDofBlockPtrType block(unsigned int index) const
Definition: combinedfunction/combinedfunction.hh:303
BaseType::DofType DofType
Intrinsic type used for dofs (typically a float type)
Definition: combinedfunction/combinedfunction.hh:115
ThisType & operator=(const ThisType &)=delete
ThisType & operator-=(const ThisType &g)
Definition: combinedfunction/combinedfunction.hh:225
BaseType::DiscreteFunctionType DiscreteFunctionType
Definition: combinedfunction/combinedfunction.hh:105
DiscreteFunctionTraits< ThisType > Traits
Traits class with all necessary type definitions.
Definition: combinedfunction/combinedfunction.hh:94
ContainedDiscreteFunctionSpaceType SubDiscreteFunctionSpaceType
Definition: combinedfunction/combinedfunction.hh:113
Traits::ContainedDiscreteFunctionSpaceType ContainedDiscreteFunctionSpaceType
Contained discrete function space.
Definition: combinedfunction/combinedfunction.hh:111
ContainedDiscreteFunctionImp ContainedDiscreteFunctionType
Discrete function this discrete function belongs to.
Definition: combinedfunction/combinedfunction.hh:90
~CombinedDiscreteFunction()
Destructor.
Definition: combinedfunction/combinedfunction.hh:182
BaseType::DomainFieldType DomainFieldType
Intrinsic type used for the domain field.
Definition: combinedfunction/combinedfunction.hh:119
CombinedDiscreteFunction(const ContainedDiscreteFunctionType &func)
Constructor.
Definition: combinedfunction/combinedfunction.hh:143
void print(std ::ostream &out) const
Definition: combinedfunction/combinedfunction.hh:288
DiscreteFunctionType & operator/=(const RangeFieldType &scalar)
multiply all DoFs by a scalar factor
Definition: combinedfunction/combinedfunction.hh:241
ContainedDiscreteFunctionSpaceType & subSpace()
Definition: combinedfunction/combinedfunction.hh:367
Iterator over an array of dofs.
Definition: combinedfunction/combinedfunction.hh:397
bool operator!=(const ThisType &I) const
compare
Definition: combinedfunction/combinedfunction.hh:485
Traits::DiscreteFunctionType DiscreteFunctionType
Definition: combinedfunction/combinedfunction.hh:401
CombinedDiscreteFunctionDofIterator(DiscreteFunctionType &df)
Constructor.
Definition: combinedfunction/combinedfunction.hh:429
CombinedDiscreteFunctionDofIterator(bool end, const DiscreteFunctionType &df)
End constructor.
Definition: combinedfunction/combinedfunction.hh:408
CombinedDiscreteFunctionDofIterator(const DiscreteFunctionType &df)
Constructor (const)
Definition: combinedfunction/combinedfunction.hh:415
CombinedDiscreteFunctionDofIterator< ContainedDiscreteFunctionImp, N > ThisType
Definition: combinedfunction/combinedfunction.hh:399
Traits::DofType DofType
Definition: combinedfunction/combinedfunction.hh:405
void reset()
Definition: combinedfunction/combinedfunction.hh:490
ThisType & operator++()
go to next dof
Definition: combinedfunction/combinedfunction.hh:466
ThisType & operator=(const ThisType &other)
Assignment operator.
Definition: combinedfunction/combinedfunction.hh:444
CombinedDiscreteFunctionDofIterator(const ThisType &other)
Copy Constructor.
Definition: combinedfunction/combinedfunction.hh:436
Traits::ContainedDiscreteFunctionType ContainedDiscreteFunctionType
Definition: combinedfunction/combinedfunction.hh:402
bool operator==(const ThisType &I) const
compare
Definition: combinedfunction/combinedfunction.hh:479
CombinedDiscreteFunctionDofIterator(bool end, DiscreteFunctionType &df)
End constructor.
Definition: combinedfunction/combinedfunction.hh:422
DofType & operator*()
return dof
Definition: combinedfunction/combinedfunction.hh:454
DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > > Traits
Definition: combinedfunction/combinedfunction.hh:400
ContainedDiscreteFunctionType::ConstDofIteratorType ContainedConstDofIteratorType
Definition: combinedfunction/combinedfunction.hh:404
ContainedDiscreteFunctionType::DofIteratorType ContainedDofIteratorType
Definition: combinedfunction/combinedfunction.hh:403
DiscreteFunctionSpaceType ::MapperType MapperType
Definition: combinedfunction/combinedfunction.hh:53
CombinedDiscreteFunctionDofIterator< ContainedDiscreteFunctionType, N > DofIteratorType
Definition: combinedfunction/combinedfunction.hh:58
DiscreteFunctionSpaceType ::JacobianRangeType JacobianRangeType
Definition: combinedfunction/combinedfunction.hh:50
CombinedSpace< ContainedDiscreteFunctionSpaceType, N, VariableBased > DiscreteFunctionSpaceType
Definition: combinedfunction/combinedfunction.hh:43
DiscreteFunctionSpaceType ::DomainType DomainType
Definition: combinedfunction/combinedfunction.hh:47
ThreadSafeValue< UninitializedObjectStack > LocalDofVectorStackType
Definition: combinedfunction/combinedfunction.hh:69
DiscreteFunctionSpaceType ::RangeType RangeType
Definition: combinedfunction/combinedfunction.hh:48
DiscreteFunctionSpaceType ::GridType GridType
Definition: combinedfunction/combinedfunction.hh:54
StackAllocator< DofType, LocalDofVectorStackType * > LocalDofVectorAllocatorType
Definition: combinedfunction/combinedfunction.hh:70
ContainedDiscreteFunctionType ::DiscreteFunctionSpaceType ContainedDiscreteFunctionSpaceType
Definition: combinedfunction/combinedfunction.hh:41
CombinedDiscreteFunction< ContainedDiscreteFunctionType, N > DiscreteFunctionType
Definition: combinedfunction/combinedfunction.hh:38
ConstDofIteratorDefault< DofIteratorType > ConstDofIteratorType
Definition: combinedfunction/combinedfunction.hh:59
ContainedDiscreteFunctionType ::DofBlockPtrType DofBlockPtrType
Definition: combinedfunction/combinedfunction.hh:65
ContainedDiscreteFunctionType ::ConstDofBlockType ConstDofBlockType
Definition: combinedfunction/combinedfunction.hh:63
MutableLocalFunction< DiscreteFunctionType > LocalFunctionType
Definition: combinedfunction/combinedfunction.hh:73
DiscreteFunctionSpaceType ::RangeFieldType RangeFieldType
Definition: combinedfunction/combinedfunction.hh:46
DiscreteFunctionSpaceType ::GridPartType GridPartType
Definition: combinedfunction/combinedfunction.hh:55
DiscreteFunctionSpaceType ::DomainFieldType DomainFieldType
Definition: combinedfunction/combinedfunction.hh:45
DynamicReferenceVector< DofType, LocalDofVectorAllocatorType > LocalDofVectorType
Definition: combinedfunction/combinedfunction.hh:71
ContainedDiscreteFunctionType ::DofBlockType DofBlockType
Definition: combinedfunction/combinedfunction.hh:61
ContainedDiscreteFunctionType ::ConstDofBlockPtrType ConstDofBlockPtrType
Definition: combinedfunction/combinedfunction.hh:67
ContainedDiscreteFunction ContainedDiscreteFunctionType
Definition: combinedfunction/combinedfunction.hh:36
RangeFieldType DofType
Definition: combinedfunction/combinedfunction.hh:52
Traits class for a DiscreteFunction.
Definition: common/discretefunction.hh:61
Definition: common/discretefunction.hh:578
Traits ::LocalDofVectorAllocatorType LocalDofVectorAllocatorType
type of LocalDofVector
Definition: common/discretefunction.hh:630
BaseType ::ConstDofBlockPtrType ConstDofBlockPtrType
Definition: common/discretefunction.hh:639
Traits ::ConstDofIteratorType ConstDofIteratorType
type of the const dof iterator
Definition: common/discretefunction.hh:622
BaseType::GridPartType GridPartType
type of the underlying grid part
Definition: common/discretefunction.hh:603
Traits ::DofIteratorType DofIteratorType
type of the dof iterator
Definition: common/discretefunction.hh:620
BaseType ::DofBlockPtrType DofBlockPtrType
Definition: common/discretefunction.hh:638
const std::string & name() const
obtain the name of the discrete function
Definition: common/discretefunction.hh:685
DiscreteFunctionSpaceType ::DomainFieldType DomainFieldType
type of domain field (usually a float type)
Definition: common/discretefunction.hh:615
BaseType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of discrete function space
Definition: common/discretefunction.hh:600
void assign(const DiscreteFunctionInterface< DFType > &g)
Definition: discretefunction_inline.hh:133
const GridPartType & gridPart() const
obtain a reference to the underlying grid part
Definition: common/discretefunction.hh:706
DiscreteFunctionSpaceType ::RangeType RangeType
type of range vector
Definition: common/discretefunction.hh:608
const DiscreteFunctionSpaceType & space() const
obtain a reference to the corresponding DiscreteFunctionSpace
Definition: common/discretefunction.hh:703
DiscreteFunctionSpaceType ::DomainType DomainType
type of domain vector
Definition: common/discretefunction.hh:606
void axpy(const RangeFieldType &s, const DiscreteFunctionInterface< DFType > &g)
axpy operation
Definition: discretefunction_inline.hh:117
DiscreteFunctionSpaceType ::RangeFieldType RangeFieldType
type of range field (usually a float type)
Definition: common/discretefunction.hh:617
DiscreteFunctionSpaceType ::GridType GridType
type of the underlying grid
Definition: common/discretefunction.hh:122
default implementation of DofManagerInterface
Definition: dofiterator.hh:143
Definition: dofiterator.hh:211
abstract interface for an output stream
Definition: streams.hh:46
abstract interface for an input stream
Definition: streams.hh:179
Definition: combinedspace/combinedspace.hh:32
An implementation of DenseVector which uses a std::vector of references as storage.
Definition: storage/referencevector.hh:53