DUNE-FEM (unstable)

Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > Class Template Reference

#include <dune/fem/function/combinedfunction/combinedfunction.hh>

Public Types

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

Public Member Functions

 CombinedDiscreteFunction (const ContainedDiscreteFunctionType &func)
 Constructor.
 
 CombinedDiscreteFunction (const ThisType &other)
 
 ~CombinedDiscreteFunction ()
 Destructor.
 
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)
 
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
 
bool dofsValid () const
 check for NaNs More...
 
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...
 
const std::string & name () const
 obtain the name of the discrete function More...
 
std::string & name ()
 obtain the name of the discrete function More...
 
constexpr int order () const
 obtain an upper bound on the polynomial order of the underlying space. More...
 
bool continuous () const
 returns true if the space contains only globally continuous functions More...
 
const DiscreteFunctionSpaceTypespace () const
 obtain a reference to the corresponding DiscreteFunctionSpace More...
 
const GridPartTypegridPart () const
 obtain a reference to the underlying grid part
 
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...
 
LocalFunctionType localFunction ()
 obtain an uninitialized local function (read-write) More...
 
const LocalFunctionType localFunction () const
 obtain an uninitialized local function (read-write) More...
 
int blocks () const
 obtain total number of blocks, i.e. size / blockSize. 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 grid changes a dof compression is done when the DofManagers compress is called. More...
 
void addScaledLocalDofs (const EntityType &entity, const RangeFieldType &s, const LocalDofs &localDofs)
 add scaled local Dofs to dof vector associated with the entity More...
 
void addLocalDofs (const EntityType &entity, const LocalDofs &localDofs)
 add local Dofs to dof vector associated with the entity More...
 
void setLocalDofs (const EntityType &entity, const LocalDofs &localDofs)
 set local Dofs to dof vector associated with the entity More...
 
void getLocalDofs (const EntityType &entity, Vector &localDofs) const
 fill local Dofs to dof vector associated with the entity More...
 
LocalDofVectorAllocatorType & localDofVectorAllocator () const
 obtain the local function storage More...
 
void beginAssemble ()
 Initiate the assemble of values using the LocalContribution concept. More...
 
void endAssemble (const bool communicate=true)
 Finalize the assemble of values using the LocalContribution concept. More...
 
void getLocalDofReferences (const EntityType &entity, LocalDofVectorType &localDofs)
 get local Dofs and store a reference to it in the LocalDofVector
 
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...
 

Static Public Attributes

static constexpr std::size_t blockSize
 size of the dof blocks
 

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
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &out, const DiscreteFunctionInterface< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > > &df)
 write a discrete function into an STL stream More...
 
static 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 ::RangeTypeoperator+ (const 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 > &a, const 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 > &b)
 add two mappings More...
 
static 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 ::RangeTypeoperator- (const 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 > &a, const 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 > &b)
 substract two mappings More...
 
static 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 ::RangeTypeoperator* (const 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 > &mapping, const DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType &factor)
 scale mapping with factor More...
 
static 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 ::RangeTypeoperator* (const DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType &factor, const 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 > &mapping)
 scale mapping with factor More...
 
static 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 ::RangeTypeoperator/ (const 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 > &mapping, const DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType &factor)
 operator / for mappings More...
 
static 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 ::RangeTypeoperator/ (const DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType &factor, const 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 > &mapping)
 operator / for mappings More...
 

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

◆ DiscreteFunctionType

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

Constructor & Destructor Documentation

◆ CombinedDiscreteFunction()

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

Copy constructor The copy constructor copies the dofs

Member Function Documentation

◆ addLocalDofs()

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

add local Dofs to dof vector associated with the entity

Parameters
[in]entityEntity to focus view of discrete function
[in]localDofsthe local dofs vector to be added

◆ addScaled()

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

◆ addScaledLocalDofs()

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 associated with the entity

Parameters
[in]entityEntity to focus view of discrete function
[in]sscaling factor
[in]localDofsthe local dofs vector to be added

◆ assign() [1/2]

void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::assign ( const DiscreteFunctionInterface< DFType > &  g)
inlineinherited

◆ assign() [2/2]

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

◆ axpy() [1/3]

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

axpy operation

Adds s * g to this discrete function.

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

◆ axpy() [2/3]

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

◆ axpy() [3/3]

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::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::axpy().

Referenced by Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::addScaled(), and Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::axpy().

◆ backup()

virtual void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::backup ( ) const
inlineprotectedvirtualinherited

◆ beginAssemble()

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

Initiate the assemble of values using the LocalContribution concept.

Template Parameters
AssembleOperationthe specific operation (Add, Set, ...)

◆ blocks()

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

◆ clear()

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

◆ communicate()

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

do default communication of space for this discrete function

◆ continuous()

bool Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::continuous ( ) const
inlineinherited

returns true if the space contains only globally continuous functions

For example, a Lagrange space returns true while a discontiuous Galerkin space returns false.

Returns
true if the space contians only globally continous functions, false otherwise

◆ dataHandle()

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

return reference to data handle object

◆ dbegin() [1/2]

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)

◆ dbegin() [2/2]

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)

◆ dend() [1/2]

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)

◆ dend() [2/2]

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)

◆ dofsValid()

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

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

Referenced by Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::dofsValid().

◆ enableDofCompression()

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

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

Note
The default implementation does nothing.

◆ endAssemble()

void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::endAssemble ( const bool  communicate = true)
inlineinherited

Finalize the assemble of values using the LocalContribution concept.

Template Parameters
AssembleOperationthe specific operation (Add, Set, ...)

◆ evaluate() [1/2]

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

◆ evaluate() [2/2]

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

◆ getLocalDofs()

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

fill local Dofs to dof vector associated with the entity

Parameters
[in]entityEntity to focus view of discrete function
[out]localDofsthe local dofs vector to be set
Note
localDofs should have sufficient size to store the dof values

◆ hessian() [1/2]

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

◆ hessian() [2/2]

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

◆ insertSubData()

void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::insertSubData
protectedvirtualinherited

Reimplemented from Dune::Fem::PersistentObject.

◆ jacobian() [1/2]

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

◆ jacobian() [2/2]

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

◆ localDofVectorAllocator()

LocalDofVectorAllocatorType & Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::localDofVectorAllocator ( ) const
inlineinherited

obtain the local function storage

Returns
a reference to the local function storage

◆ localFunction() [1/4]

LocalFunctionType Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::localFunction ( )
inlineinherited

obtain an uninitialized local function (read-write)

Note
before calling any method of the local function initialize it passing an entity
Returns
an uninitialized local function

◆ localFunction() [2/4]

const LocalFunctionType Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::localFunction ( ) const
inlineinherited

obtain an uninitialized local function (read-write)

Note
before calling any method of the local function initialize it passing an entity
Returns
an uninitialized local function

◆ localFunction() [3/4]

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

◆ localFunction() [4/4]

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

◆ name() [1/2]

std::string & Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::name ( )
inlineinherited

obtain the name of the discrete function

Returns
string holding name of discrete function

◆ name() [2/2]

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

◆ normSquaredDofs()

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

◆ operator()() [1/2]

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)

◆ operator()() [2/2]

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

Parameters
[in]argargument
[out]destdestination

◆ operator*=()

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)

◆ operator+=() [1/2]

DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionType & Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::operator+= ( const DiscreteFunctionInterface< DFType > &  g)
inlineinherited

add another discrete function to this one

Parameters
[in]gdiscrete function to add
Returns
a reference to this discrete function (i.e. *this)

◆ operator+=() [2/2]

template<class ContainedDiscreteFunctionImp , int N>
ThisType & Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::operator+= ( const ThisType g)
inline

◆ operator-=()

DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionType & Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::operator-= ( const DiscreteFunctionInterface< DFType > &  g)
inlineinherited

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)

◆ operator/=()

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)

◆ order()

constexpr int Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::order ( ) const
inlineconstexprinherited

obtain an upper bound on the polynomial order of the underlying space.

◆ print()

template<class ContainedDiscreteFunctionImp , int N>
void Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::print ( std ::ostream &  out) const
inline

◆ read()

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
Note
This call will automatically enable dof compression for this discrete function.

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

Referenced by Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::read().

◆ removeSubData()

void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::removeSubData
protectedvirtualinherited

Reimplemented from Dune::Fem::PersistentObject.

◆ restore()

virtual void Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::restore ( )
inlineprotectedvirtualinherited

◆ scalarProductDofs() [1/2]

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

◆ scalarProductDofs() [2/2]

template<class ContainedDiscreteFunctionImp , int N>
RangeFieldType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::scalarProductDofs ( const ThisType other) const
inline

◆ setLocalDofs()

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

set local Dofs to dof vector associated with the entity

Parameters
[in]entityEntity to focus view of discrete function
[in]localDofsthe local dofs vector to be set

◆ size()

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

◆ space()

const DiscreteFunctionSpaceType & Dune::Fem::DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::space ( ) const
inlineinherited

obtain a reference to the corresponding DiscreteFunctionSpace

◆ write()

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

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

Referenced by Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::write().

Friends And Related Function Documentation

◆ operator*() [1/2]

scale mapping with factor

Parameters
[in]factorfactor with which mapping is scaled
[in]mappingMapping which is scaled
Returns
new object mapping

◆ operator*() [2/2]

scale mapping with factor

Parameters
[in]mappingMapping which is scaled
[in]factorfactor with which mapping is scaled
Returns
new object mapping

◆ operator+()

static 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 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 > &  a,
const 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 > &  b 
)
related

add two mappings

Parameters
[in]amapping 1
[in]bmapping 2
Returns
new object mapping

◆ operator-()

static 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 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 > &  a,
const 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 > &  b 
)
related

substract two mappings

Parameters
[in]amapping 1
[in]bmapping 2
Returns
new object mapping

◆ operator/() [1/2]

operator / for mappings

Parameters
[in]factorby which result of mapping is divided
[in]mappingwhich is divided
Returns
new object mapping

◆ operator/() [2/2]

operator / for mappings

Parameters
[in]mappingmapping which is divided
[in]factorf factor by which result of mapping is divided
Returns
new object mapping

◆ operator<<()

std::ostream & operator<< ( std ::ostream &  out,
const DiscreteFunctionInterface< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > > &  df 
)
related

write a discrete function into an STL stream

Parameters
[in]outSTL stream to write to
[in]dfdiscrete function to write
Returns
the STL stream (for concatenation)

The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 12, 23:30, 2024)