dune-fem  2.4.1-rc
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > Class Template Reference

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/function/combinedfunction/combinedfunction.hh>

Inheritance diagram for Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >:
Inheritance graph

Public Types

typedef ContainedDiscreteFunctionImp ContainedDiscreteFunctionType
 Discrete function this discrete function belongs to. More...
 
typedef ContainedDiscreteFunctionType SubDiscreteFunctionType
 
typedef DiscreteFunctionTraits< ThisTypeTraits
 Traits class with all necessary type definitions. More...
 
typedef BaseType::GridType GridType
 Grid implementation. More...
 
typedef BaseType::GridPartType GridPartType
 GridPart implementation. More...
 
typedef BaseType::DiscreteFunctionType DiscreteFunctionType
 
typedef BaseType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
 the combined discrete function type More...
 
typedef Traits::ContainedDiscreteFunctionSpaceType ContainedDiscreteFunctionSpaceType
 Contained discrete function space. More...
 
typedef ContainedDiscreteFunctionSpaceType SubDiscreteFunctionSpaceType
 
typedef BaseType::DofType DofType
 Intrinsic type used for dofs (typically a float type) More...
 
typedef BaseType::RangeFieldType RangeFieldType
 Intrinsic type used for range field (like DofType) More...
 
typedef BaseType::DomainFieldType DomainFieldType
 Intrinsic type used for the domain field. More...
 
typedef BaseType::RangeType RangeType
 Vector type used for the range field. More...
 
typedef BaseType::DomainType DomainType
 Vector type used for the domain field. More...
 
typedef Traits::MapperType MapperType
 Mapper type (from the space) More...
 
typedef BaseType::DofIteratorType DofIteratorType
 Iterator over dof container. More...
 
typedef BaseType::ConstDofIteratorType ConstDofIteratorType
 Read-only iterator over dof container. More...
 
typedef BaseType::DofBlockPtrType DofBlockPtrType
 
typedef BaseType::ConstDofBlockPtrType ConstDofBlockPtrType
 
typedef BaseType::LocalDofVectorAllocatorType LocalDofVectorAllocatorType
 
enum  
 size of the dof blocks More...
 
typedef BaseType::DiscreteFunctionInterfaceType DiscreteFunctionInterfaceType
 
typedef DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType
 type of jacobian More...
 
typedef DiscreteFunctionSpaceType::HessianRangeType HessianRangeType
 type of hessian More...
 
typedef Traits::DofVectorType DofVectorType
 type of DofVector More...
 
typedef Traits::LocalDofVectorType LocalDofVectorType
 type of LocalDofVector More...
 
typedef BaseType::LocalFunctionType LocalFunctionType
 type of local functions More...
 
typedef BaseType::DofBlockType DofBlockType
 
typedef BaseType::ConstDofBlockType ConstDofBlockType
 
typedef BaseType::EntityType EntityType
 
typedef DofVectorType::SizeType SizeType
 size type of the block vector More...
 
enum  
 size of the dof blocks More...
 
typedef BaseType::MappingType MappingType
 type of mapping base class for this discrete function More...
 
typedef LoadBalanceLeafData< ThisTypeDefaultLoadBalanceContainsCheckType
 
typedef DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType FunctionSpaceType
 type of function space this function belongs to More...
 
typedef CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > FunctionType
 type of the implementation (Barton-Nackman) More...
 

Public Member Functions

 CombinedDiscreteFunction (const ContainedDiscreteFunctionType &func)
 
 CombinedDiscreteFunction (const std::string &name, const ContainedDiscreteFunctionSpaceType &spc)
 
 CombinedDiscreteFunction (const std::string &name, const DiscreteFunctionSpaceType &spc)
 
 CombinedDiscreteFunction (const ThisType &other)
 
 ~CombinedDiscreteFunction ()
 Destructor. More...
 
void clear ()
 set all degrees of freedom to zero More...
 
void assign (const ThisType &g)
 
int size () const
 obtain total number of DoFs More...
 
ThisTypeoperator+= (const ThisType &g)
 
ThisTypeoperator-= (const ThisType &g)
 
DiscreteFunctionTypeoperator*= (const RangeFieldType &scalar)
 multiply all DoFs by a scalar factor More...
 
DiscreteFunctionTypeoperator/= (const RangeFieldType &scalar)
 multiply all DoFs by a scalar factor More...
 
void addScaled (const ThisType &g, const RangeFieldType &s)
 
void axpy (const RangeFieldType &s, const ThisType &g)
 axpy operation More...
 
RangeFieldType scalarProductDofs (const ThisType &other) const
 
template<class StreamTraits >
void read (InStreamInterface< StreamTraits > &in)
 read the discrete function from a stream More...
 
template<class StreamTraits >
void write (OutStreamInterface< StreamTraits > &out) const
 write the discrete function into a stream More...
 
void print (std::ostream &out) const
 print all DoFs to a stream (for debugging purposes) More...
 
bool dofsValid () const
 check for NaNs More...
 
ConstDofBlockPtrType block (unsigned int index) const
 
DofBlockPtrType block (unsigned int index)
 
const RangeFieldTypedof (unsigned int index) const
 
RangeFieldTypedof (unsigned int index)
 
ConstDofIteratorType dbegin () const
 obtain an iterator pointing to the first DoF (read-only) More...
 
ConstDofIteratorType dend () const
 obtain an iterator pointing behind the last DoF (read-only) More...
 
DofIteratorType dbegin ()
 obtain an iterator pointing to the first DoF (read-write) More...
 
DofIteratorType dend ()
 obtain an iterator pointing behind the last DoF (read-write) More...
 
ContainedDiscreteFunctionTypesubFunction (const int i)
 
const ContainedDiscreteFunctionTypesubFunction (const int i) const
 
ContainedDiscreteFunctionSpaceTypesubSpace ()
 
const std::string & name () const
 obtain the name of the discrete function More...
 
const DiscreteFunctionSpaceTypespace () const
 obtain a reference to the corresponding DiscreteFunctionSpace More...
 
const GridPartTypegridPart () const
 obtain a reference to the underlying grid part More...
 
LocalFunctionType localFunction (const EntityType &entity)
 obtain a local function for an entity (read-write) More...
 
const LocalFunctionType localFunction (const EntityType &entity) const
 obtain a local function for an entity (read-write) More...
 
DofVectorTypedofVector ()
 
const DofVectorTypedofVector () const
 
int blocks () const
 obtain total number of blocks, i.e. size / blockSize. More...
 
RangeFieldTypeallocDofPointer () const
 allocate a pointer to a consecutive array storing the DoFs More...
 
void freeDofPointer (RangeFieldType *dofPointer)
 allocate a pointer to a consecutive array storing the DoFs More...
 
void freeDofPointerNoCopy (const RangeFieldType *dofPointer) const
 allocate a pointer to a consecutive array storing the DoFs More...
 
void axpy (const RangeFieldType &s, const DiscreteFunctionInterface< DFType > &g)
 axpy operation More...
 
void axpy (const RangeFieldType &s, const DiscreteFunctionInterfaceType &g)
 axpy operation More...
 
RangeFieldType scalarProductDofs (const DiscreteFunctionInterface< DFType > &other) const
 Scalar product between the DoFs of two discrete functions. More...
 
Dune::FieldTraits< RangeFieldType >::real_type normSquaredDofs () const
 Squared small l^2 norm of all dofs. More...
 
void assign (const DiscreteFunctionInterface< DFType > &g)
 
CommDataHandle< Operation >::Type dataHandle (const Operation *operation)
 return reference to data handle object More...
 
void communicate ()
 do default communication of space for this discrete function More...
 
void evaluate (const DomainType &x, RangeType &value) const
 evaluate the function More...
 
void evaluate (const DomainType &x, RangeType &value) const
 evaluate the function More...
 
void jacobian (const DomainType &x, JacobianRangeType &jacobian) const
 evaluate the Jacobian of the function More...
 
void jacobian (const DomainType &x, JacobianRangeType &jacobian) const
 evaluate the Jacobian of the function More...
 
void hessian (const DomainType &x, HessianRangeType &hessian) const
 evaluate the hessian of the function (const DomainType &x,HessianRangeType &hessian) const More...
 
void hessian (const DomainType &x, HessianRangeType &hessian) const
 evaluate the hessian of the function More...
 
DiscreteFunctionTypeoperator+= (const DiscreteFunctionInterface< DFType > &g)
 add another discrete function to this one More...
 
DiscreteFunctionTypeoperator-= (const DiscreteFunctionInterface< DFType > &g)
 substract all degrees of freedom from given discrete function using the dof iterators More...
 
void enableDofCompression ()
 Enable this discrete function for dof compression, i.e. during grdi changes a dof compression is done when the DofManagers compress is called. More...
 
bool operator== (const DiscreteFunctionInterface< DFType > &g) const
 
bool operator!= (const DiscreteFunctionInterface< DFType > &g) const
 
LocalDofVectorAllocatorTypelocalDofVectorAllocator () const
 obtain the local function storage More...
 
void addScaledLocalDofs (const EntityType &entity, const RangeFieldType &s, const LocalDofs &localDofs)
 add scaled local Dofs to dof vector More...
 
void addLocalDofs (const EntityType &entity, const LocalDofs &localDofs)
 add local Dofs to dof vector More...
 
void setLocalDofs (const EntityType &entity, const LocalDofs &localDofs)
 set local Dofs to dof vector More...
 
void getLocalDofs (const EntityType &entity, LocalDofVectorType &localDofs)
 get local Dofs and store a reference to it in the LocalDofVector More...
 
void getLocalDofs (const EntityType &entity, Dune::DynamicVector< DofType, A > &localDofs) const
 get local Dofs and store the values in LocalDofVector More...
 
DefaultLoadBalanceContainsCheckType defaultLoadBalanceContainsCheck () const
 
virtual void operator() (const DomainType &arg, RangeType &dest) const
 application operator call evaluate More...
 
void operator() (const DomainType &arg, RangeType &dest) const
 Application operator that applies all operators in the linear combination stack. More...
 

Protected Member Functions

virtual void backup () const
 
virtual void restore ()
 
virtual void insertSubData ()
 
virtual void removeSubData ()
 
void evaluateGlobal (const DomainType &x, Functor functor) const
 evaluate functor in global coordinate More...
 
const CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > & asImp () const
 
CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > & asImp ()
 
virtual void * pointer ()
 

Static Protected Member Functions

static const CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > & asImp (const ThisType &other)
 
static CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > & asImp (ThisType &other)
 

Protected Attributes

const DiscreteFunctionSpaceTypedfSpace_
 
LocalDofVectorAllocatorType ldvAllocator_
 
DebugLock dofPointerLock_
 
std::string name_
 
ScalarProductType scalarProduct_
 

Detailed Description

template<class ContainedDiscreteFunctionImp, int N>
class Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >

A class for combining N discrete function of the same type to a vector valued function

Member Typedef Documentation

template<class ContainedDiscreteFunctionImp , int N>
typedef BaseType :: ConstDofBlockPtrType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::ConstDofBlockPtrType
template<class ContainedDiscreteFunctionImp , int N>
typedef BaseType::ConstDofIteratorType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::ConstDofIteratorType

Read-only iterator over dof container.

template<class ContainedDiscreteFunctionImp , int N>
typedef Traits::ContainedDiscreteFunctionSpaceType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::ContainedDiscreteFunctionSpaceType

Contained discrete function space.

template<class ContainedDiscreteFunctionImp , int N>
typedef ContainedDiscreteFunctionImp Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::ContainedDiscreteFunctionType

Discrete function this discrete function belongs to.

template<class ContainedDiscreteFunctionImp , int N>
typedef BaseType::DiscreteFunctionSpaceType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::DiscreteFunctionSpaceType

the combined discrete function type

template<class ContainedDiscreteFunctionImp , int N>
typedef BaseType::DiscreteFunctionType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::DiscreteFunctionType

Discrete function type (identical to this type, needed as Barton-Nackman parameter

template<class ContainedDiscreteFunctionImp , int N>
typedef BaseType :: DofBlockPtrType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::DofBlockPtrType
typedef BaseType :: DofBlockType Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DofBlockType
inherited
template<class ContainedDiscreteFunctionImp , int N>
typedef BaseType::DofIteratorType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::DofIteratorType

Iterator over dof container.

template<class ContainedDiscreteFunctionImp , int N>
typedef BaseType::DofType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::DofType

Intrinsic type used for dofs (typically a float type)

typedef Traits :: DofVectorType Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DofVectorType
inherited

type of DofVector

template<class ContainedDiscreteFunctionImp , int N>
typedef BaseType::DomainFieldType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::DomainFieldType

Intrinsic type used for the domain field.

template<class ContainedDiscreteFunctionImp , int N>
typedef BaseType::DomainType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::DomainType

Vector type used for the domain field.

typedef BaseType :: EntityType Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::EntityType
inherited
typedef DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType Dune::Fem::Function< DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType , CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::FunctionSpaceType
inherited

type of function space this function belongs to

typedef CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > Dune::Fem::Function< DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType , CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::FunctionType
inherited

type of the implementation (Barton-Nackman)

template<class ContainedDiscreteFunctionImp , int N>
typedef BaseType::GridPartType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::GridPartType

GridPart implementation.

template<class ContainedDiscreteFunctionImp , int N>
typedef BaseType::GridType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::GridType

Grid implementation.

type of hessian

type of jacobian

template<class ContainedDiscreteFunctionImp , int N>
typedef BaseType :: LocalDofVectorAllocatorType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::LocalDofVectorAllocatorType

type of LocalDofVector

type of local functions

template<class ContainedDiscreteFunctionImp , int N>
typedef Traits::MapperType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::MapperType

Mapper type (from the space)

typedef BaseType :: MappingType Dune::Fem::DiscreteFunctionInterface< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::MappingType
inherited

type of mapping base class for this discrete function

template<class ContainedDiscreteFunctionImp , int N>
typedef BaseType::RangeFieldType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::RangeFieldType

Intrinsic type used for range field (like DofType)

template<class ContainedDiscreteFunctionImp , int N>
typedef BaseType::RangeType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::RangeType

Vector type used for the range field.

typedef DofVectorType::SizeType Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::SizeType
inherited

size type of the block vector

template<class ContainedDiscreteFunctionImp , int N>
typedef ContainedDiscreteFunctionSpaceType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::SubDiscreteFunctionSpaceType
template<class ContainedDiscreteFunctionImp , int N>
typedef ContainedDiscreteFunctionType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::SubDiscreteFunctionType
template<class ContainedDiscreteFunctionImp , int N>
typedef DiscreteFunctionTraits< ThisType > Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::Traits

Traits class with all necessary type definitions.

Member Enumeration Documentation

anonymous enum
inherited

size of the dof blocks

anonymous enum
inherited

size of the dof blocks

Constructor & Destructor Documentation

template<class ContainedDiscreteFunctionImp , int N>
Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::CombinedDiscreteFunction ( const ContainedDiscreteFunctionType func)
inline

Constructor WARNING: here we have to use a const cast for the function space!

template<class ContainedDiscreteFunctionImp , int N>
Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::CombinedDiscreteFunction ( const std::string &  name,
const ContainedDiscreteFunctionSpaceType spc 
)
inline
template<class ContainedDiscreteFunctionImp , int N>
Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::CombinedDiscreteFunction ( const std::string &  name,
const DiscreteFunctionSpaceType spc 
)
inline
template<class ContainedDiscreteFunctionImp , int N>
Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::CombinedDiscreteFunction ( const ThisType other)
inline

Copy constructor The copy constructor copies the dofs

References Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::subFunction().

template<class ContainedDiscreteFunctionImp , int N>
Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::~CombinedDiscreteFunction ( )
inline

Destructor.

Member Function Documentation

void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::addLocalDofs ( const EntityType entity,
const LocalDofs &  localDofs 
)
inlineinherited

add local Dofs to dof vector

template<class ContainedDiscreteFunctionImp , int N>
void Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::addScaled ( const ThisType g,
const RangeFieldType s 
)
inline

References Dune::Fem::axpy().

void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::addScaledLocalDofs ( const EntityType entity,
const RangeFieldType s,
const LocalDofs &  localDofs 
)
inlineinherited

add scaled local Dofs to dof vector

RangeFieldType* Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::allocDofPointer ( ) const
inlineinherited

allocate a pointer to a consecutive array storing the DoFs

To support external packages, it is often required to have the DoFs in a consecutive array. This function ensures this, making a copy if necessary.

Note
The allocated pointer has to be freed by freeDofPointer.
Only one DoF pointer may be allocated at a time.
Returns
a pointer to a consecutive copy of the DoF vector
Note
The default implementation make a copy of the DoF vector using the DoF iterators.
static const CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > & Dune::Fem::BartonNackmanInterface< Function< DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType, CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > > , CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::asImp ( const ThisType other)
inlinestaticprotectedinherited
static CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > & Dune::Fem::BartonNackmanInterface< Function< DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType, CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > > , CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::asImp ( ThisType other)
inlinestaticprotectedinherited
const CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > & Dune::Fem::BartonNackmanInterface< Function< DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType, CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > > , CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::asImp ( ) const
inlineprotectedinherited
CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > & Dune::Fem::BartonNackmanInterface< Function< DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType, CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > > , CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::asImp ( )
inlineprotectedinherited
template<class ContainedDiscreteFunctionImp , int N>
void Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::assign ( const ThisType g)
inline
void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::assign ( const DiscreteFunctionInterface< DFType > &  g)
inherited

template<class ContainedDiscreteFunctionImp , int N>
void Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::axpy ( const RangeFieldType s,
const ThisType g 
)
inline

axpy operation

Adds s * g to this discrete function.

Parameters
[in]sscalar value to scale g with
[in]gdiscrete function to add

References Dune::Fem::axpy(), and Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::subFunction().

void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::axpy ( const RangeFieldType s,
const DiscreteFunctionInterface< DFType > &  g 
)
inherited

axpy operation

Adds s * g to this discrete function.

Parameters
[in]sscalar value to scale g with
[in]gdiscrete function to add
void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::axpy ( const RangeFieldType s,
const DiscreteFunctionInterfaceType g 
)
inlineinherited

axpy operation

Adds s * g to this discrete function.

Parameters
[in]sscalar value to scale g with
[in]gdiscrete function to add

References Dune::Fem::DiscreteFunctionInterface< Impl >::dofVector().

virtual void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::backup ( ) const
inlineprotectedvirtualinherited
template<class ContainedDiscreteFunctionImp , int N>
ConstDofBlockPtrType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::block ( unsigned int  index) const
inline
template<class ContainedDiscreteFunctionImp , int N>
DofBlockPtrType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::block ( unsigned int  index)
inline
int Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::blocks ( ) const
inlineinherited

obtain total number of blocks, i.e. size / blockSize.

The number of blocks of DoFs (degrees of freedom) can also be seen as the size of the discrete function divided by the blockSize.

Returns
total number of DoFs blocks
template<class ContainedDiscreteFunctionImp , int N>
void Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::clear ( )
inline

set all degrees of freedom to zero

void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::communicate ( )
inlineinherited

do default communication of space for this discrete function

References Dune::Fem::ThreadManager::singleThreadMode().

CommDataHandle< Operation >:: Type Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::dataHandle ( const Operation *  operation)
inherited

return reference to data handle object

template<class ContainedDiscreteFunctionImp , int N>
ConstDofIteratorType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::dbegin ( ) const
inline

obtain an iterator pointing to the first DoF (read-only)

Returns
a DoF iterator pointing to first DoF (degre of freedom)
template<class ContainedDiscreteFunctionImp , int N>
DofIteratorType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::dbegin ( )
inline

obtain an iterator pointing to the first DoF (read-write)

Returns
a DoF iterator pointing to first DoF (degre of freedom)
DefaultLoadBalanceContainsCheckType Dune::Fem::DiscreteFunctionInterface< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::defaultLoadBalanceContainsCheck ( ) const
inlineinherited
template<class ContainedDiscreteFunctionImp , int N>
ConstDofIteratorType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::dend ( ) const
inline

obtain an iterator pointing behind the last DoF (read-only)

Returns
a DoF iterator pointing behind the last DoF (degree of freedom)
template<class ContainedDiscreteFunctionImp , int N>
DofIteratorType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::dend ( )
inline

obtain an iterator pointing behind the last DoF (read-write)

Returns
a DoF iterator pointing behind the last DoF (degree of freedom)
template<class ContainedDiscreteFunctionImp , int N>
const RangeFieldType& Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::dof ( unsigned int  index) const
inline
template<class ContainedDiscreteFunctionImp , int N>
RangeFieldType& Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::dof ( unsigned int  index)
inline
template<class ContainedDiscreteFunctionImp , int N>
bool Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::dofsValid ( ) const
inline

check for NaNs

Returns
if one of the DoFs is NaN false is returned, otherwise true
DofVectorType& Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::dofVector ( )
inlineinherited
const DofVectorType& Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::dofVector ( ) const
inlineinherited
void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::enableDofCompression ( )
inlineinherited

Enable this discrete function for dof compression, i.e. during grdi changes a dof compression is done when the DofManagers compress is called.

Note
The default implementation does nothing.

References Dune::Fem::operator==().

void Dune::Fem::Function< DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType , CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::evaluate ( const DomainType x,
RangeType value 
) const
inlineinherited

evaluate the function

Parameters
[in]xevaluation point
[out]valuevalue of the function in x
void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::evaluate ( const DomainType x,
RangeType value 
) const
inlineinherited

evaluate the function

Parameters
[in]xevaluation point
[out]valuevalue of the function in x
void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::evaluateGlobal ( const DomainType x,
Functor  functor 
) const
protectedinherited

evaluate functor in global coordinate

void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::freeDofPointer ( RangeFieldType dofPointer)
inlineinherited

allocate a pointer to a consecutive array storing the DoFs

This method serves two purposes:

  • The user cannot know, if the DoF array returned by allocDofPointer has to be freed.
  • If the DoF array is just a copy, the DoFs shall be stored back into the discrete function.
Note
The pointer must have been allocated by allocDofPointer.
Only one DoF pointer may be allocated at a time.
Parameters
[in]dofPointerpointer to the dof array previously allocated by allocDofPointer
Note
The default implementation make a copy of the DoF vector using the DoF iterators.
void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::freeDofPointerNoCopy ( const RangeFieldType dofPointer) const
inlineinherited

allocate a pointer to a consecutive array storing the DoFs

This method serves sincet the user cannot know, if the DoF array returned by allocDofPointer has to be freed.

Note
The pointer must have been allocated by allocDofPointer.
Only one DoF pointer may be allocated at a time.
DoFs are NOT stored back into the discrete function.
Parameters
[in]dofPointerpointer to the dof array previously allocated by allocDofPointer
Note
The default implementation make a copy of the DoF vector using the DoF iterators.
void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::getLocalDofs ( const EntityType entity,
LocalDofVectorType localDofs 
)
inlineinherited

get local Dofs and store a reference to it in the LocalDofVector

void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::getLocalDofs ( const EntityType entity,
Dune::DynamicVector< DofType, A > &  localDofs 
) const
inlineinherited

get local Dofs and store the values in LocalDofVector

const GridPartType& Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::gridPart ( ) const
inlineinherited

obtain a reference to the underlying grid part

void Dune::Fem::Function< DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType , CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::hessian ( const DomainType x,
HessianRangeType hessian 
) const
inlineinherited

evaluate the hessian of the function

Parameters
[in]xevaluation point
[out]hessianvalue of the hessian in x
void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::hessian ( const DomainType x,
HessianRangeType hessian 
) const
inlineinherited

evaluate the hessian of the function (const DomainType &x,HessianRangeType &hessian) const

Parameters
[in]xevaluation point
[out]hessianvalue of the hessian in x (const DomainType &x,HessianRangeType &hessian) const
virtual void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::insertSubData ( )
protectedvirtualinherited

Reimplemented from Dune::Fem::PersistentObject.

void Dune::Fem::Function< DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType , CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::jacobian ( const DomainType x,
JacobianRangeType jacobian 
) const
inlineinherited

evaluate the Jacobian of the function

Parameters
[in]xevaluation point
[out]jacobianvalue of the Jacobian in x
void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::jacobian ( const DomainType x,
JacobianRangeType jacobian 
) const
inlineinherited

evaluate the Jacobian of the function

Parameters
[in]xevaluation point
[out]jacobianvalue of the Jacobian in x
LocalDofVectorAllocatorType& Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::localDofVectorAllocator ( ) const
inlineinherited

obtain the local function storage

Returns
a reference to the local function storage
LocalFunctionType Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::localFunction ( const EntityType entity)
inlineinherited

obtain a local function for an entity (read-write)

Parameters
[in]entityEntity to focus view of discrete function
Returns
a local function associated with the entity
const LocalFunctionType Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::localFunction ( const EntityType entity) const
inlineinherited

obtain a local function for an entity (read-write)

Parameters
[in]entityEntity to focus view of discrete function
Returns
a local function associated with the entity
const std::string& Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::name ( ) const
inlineinherited

obtain the name of the discrete function

Returns
string holding name of discrete function
Dune::FieldTraits< RangeFieldType >::real_type Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::normSquaredDofs ( ) const
inlineinherited

Squared small l^2 norm of all dofs.

Note
This is already parallel, so do not sum over all processes after calling scalarProductDofs!
It is assumed that the discrete function has been communicated (i.e., every local DoF hat the value of the corresponding global DoF).
Returns
the squared norm of the DoF-vectors

References Dune::Fem::real().

bool Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::operator!= ( const DiscreteFunctionInterface< DFType > &  g) const
inlineinherited
virtual void Dune::Fem::Function< DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType , CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::operator() ( const DomainType arg,
RangeType dest 
) const
inlinevirtualinherited

application operator call evaluate

Parameters
[in]argargument
[out]destdestination, i.e. f(arg)
void Dune::Fem::Mapping< DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType::DomainFieldType , DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType::RangeFieldType , DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType::DomainType , DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType::RangeType >::operator() ( const DomainType arg,
RangeType dest 
) const
inlineinherited

Application operator that applies all operators in the linear combination stack.

Parameters
[in]argargument
[out]destdestination
template<class ContainedDiscreteFunctionImp , int N>
DiscreteFunctionType& Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::operator*= ( const RangeFieldType scalar)
inline

multiply all DoFs by a scalar factor

Parameters
[in]scalarfactor to muliply all DoFs by
Returns
a reference to this discrete function (i.e. *this)
template<class ContainedDiscreteFunctionImp , int N>
ThisType& Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::operator+= ( const ThisType g)
inline
DiscreteFunctionType& Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::operator+= ( const DiscreteFunctionInterface< DFType > &  g)
inherited

add another discrete function to this one

Parameters
[in]gdiscrete function to add
Returns
a reference to this discrete function (i.e. *this)
template<class ContainedDiscreteFunctionImp , int N>
ThisType& Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::operator-= ( const ThisType g)
inline
DiscreteFunctionType& Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::operator-= ( const DiscreteFunctionInterface< DFType > &  g)
inherited

substract all degrees of freedom from given discrete function using the dof iterators

Parameters
[in]gdiscrete function which is substracted from this discrete function
Returns
reference to this (i.e. *this)
template<class ContainedDiscreteFunctionImp , int N>
DiscreteFunctionType& Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::operator/= ( const RangeFieldType scalar)
inline

multiply all DoFs by a scalar factor

Parameters
[in]scalarfactor to muliply all DoFs by
Returns
a reference to this discrete function (i.e. *this)
bool Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::operator== ( const DiscreteFunctionInterface< DFType > &  g) const
inlineinherited
virtual void* Dune::Fem::PersistentObject::pointer ( )
inlineprotectedvirtualinherited
template<class ContainedDiscreteFunctionImp , int N>
void Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::print ( std::ostream &  out) const
inline

print all DoFs to a stream (for debugging purposes)

Parameters
[in]outstream to print to
template<class ContainedDiscreteFunctionImp , int N>
template<class StreamTraits >
void Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::read ( InStreamInterface< StreamTraits > &  in)
inline

read the discrete function from a stream

Parameters
[in]instream to read the discrete function from
virtual void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::removeSubData ( )
protectedvirtualinherited

Reimplemented from Dune::Fem::PersistentObject.

virtual void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::restore ( )
inlineprotectedvirtualinherited
template<class ContainedDiscreteFunctionImp , int N>
RangeFieldType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::scalarProductDofs ( const ThisType other) const
inline
RangeFieldType Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::scalarProductDofs ( const DiscreteFunctionInterface< DFType > &  other) const
inlineinherited

Scalar product between the DoFs of two discrete functions.

Note
This is a parallel scalar product, so do not sum over all processes after calling scalarProductDofs!
It is assumed that the discrete function has been communicated (i.e., every local DoF hat the value of the corresponding global DoF).
Parameters
[in]otherdiscrete function to evaluate the scalar product with
Returns
the scalar product of the DoF-vectors
void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::setLocalDofs ( const EntityType entity,
const LocalDofs &  localDofs 
)
inlineinherited

set local Dofs to dof vector

template<class ContainedDiscreteFunctionImp , int N>
int Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::size ( ) const
inline

obtain total number of DoFs

The number of DoFs (degrees of freedom) can also be seen as the size of the discrete function, i.e., the size of the vector that forms this discrete funciton.

Returns
total number of DoFs for this discrete function
const DiscreteFunctionSpaceType& Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::space ( ) const
inlineinherited

obtain a reference to the corresponding DiscreteFunctionSpace

template<class ContainedDiscreteFunctionImp , int N>
ContainedDiscreteFunctionType& Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::subFunction ( const int  i)
inline
template<class ContainedDiscreteFunctionImp , int N>
const ContainedDiscreteFunctionType& Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::subFunction ( const int  i) const
inline
template<class ContainedDiscreteFunctionImp , int N>
ContainedDiscreteFunctionSpaceType& Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::subSpace ( )
inline
template<class ContainedDiscreteFunctionImp , int N>
template<class StreamTraits >
void Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::write ( OutStreamInterface< StreamTraits > &  out) const
inline

write the discrete function into a stream

Parameters
[in]outstream to write the discrete function to

Member Data Documentation

const DiscreteFunctionSpaceType& Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::dfSpace_
protectedinherited
DebugLock Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::dofPointerLock_
mutableprotectedinherited
LocalDofVectorAllocatorType Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::ldvAllocator_
mutableprotectedinherited
std::string Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::name_
protectedinherited
ScalarProductType Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::scalarProduct_
protectedinherited

The documentation for this class was generated from the following file: