dune-fem 2.8.0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Related Functions | List of all members
Dune::Fem::DiscreteFunctionDefault< Impl > Class Template Reference

#include <dune/fem/function/common/discretefunction.hh>

Inheritance diagram for Dune::Fem::DiscreteFunctionDefault< Impl >:
Inheritance graph

Classes

struct  CommDataHandle
 

Public Types

typedef BaseType::Traits Traits
 
typedef Impl DiscreteFunctionType
 type of the discrete function (Barton-Nackman parameter)
 
typedef BaseType::DiscreteFunctionInterfaceType DiscreteFunctionInterfaceType
 
typedef BaseType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
 type of discrete function space
 
typedef BaseType::GridPartType GridPartType
 type of the underlying grid part
 
typedef DiscreteFunctionSpaceType::DomainType DomainType
 type of domain vector
 
typedef DiscreteFunctionSpaceType::RangeType RangeType
 type of range vector
 
typedef DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType
 type of jacobian
 
typedef DiscreteFunctionSpaceType::HessianRangeType HessianRangeType
 type of hessian
 
typedef DiscreteFunctionSpaceType::DomainFieldType DomainFieldType
 type of domain field (usually a float type)
 
typedef DiscreteFunctionSpaceType::RangeFieldType RangeFieldType
 type of range field (usually a float type)
 
typedef Traits::DofIteratorType DofIteratorType
 type of the dof iterator
 
typedef Traits::ConstDofIteratorType ConstDofIteratorType
 type of the const dof iterator
 
typedef Traits::DofVectorType DofVectorType
 type of DofVector
 
typedef Traits::LocalDofVectorType LocalDofVectorType
 type of LocalDofVector
 
typedef Traits::LocalDofVectorAllocatorType LocalDofVectorAllocatorType
 type of LocalDofVector
 
typedef BaseType::LocalFunctionType LocalFunctionType
 type of local functions
 
typedef LocalFunctionType::LocalCoordinateType LocalCoordinateType
 
typedef BaseType::DofBlockType DofBlockType
 
typedef BaseType::ConstDofBlockType ConstDofBlockType
 
typedef BaseType::DofBlockPtrType DofBlockPtrType
 
typedef BaseType::ConstDofBlockPtrType ConstDofBlockPtrType
 
typedef BaseType::EntityType EntityType
 
typedef BaseType::DofType DofType
 
typedef DofVectorType::SizeType SizeType
 size type of the block vector
 
typedef DiscreteFunctionSpaceType::FunctionSpaceType FunctionSpaceType
 type of associated function space
 
typedef GridPartType::GridViewType GridView
 
typedef DiscreteFunctionSpaceType::GridType GridType
 type of the underlying grid
 
typedef BaseType::MappingType MappingType
 type of mapping base class for this discrete function
 
typedef DiscreteFunctionSpaceType::LocalBlockIndices BlockIndices
 
typedef LoadBalanceLeafData< ThisTypeDefaultLoadBalanceContainsCheckType
 

Public Member Functions

ThisTypeoperator= (ThisType &&)=delete
 
ThisTypeoperator= (const ThisType &)=delete
 
const std::string & name () const
 obtain the name of the discrete function
 
std::string & name ()
 obtain the name of the discrete function
 
constexpr int order () const
 obtain an upper bound on the polynomial order of the underlying space.
 
bool continuous () const
 returns true if the space contains only globally continuous functions
 
const DiscreteFunctionSpaceTypespace () const
 obtain a reference to the corresponding DiscreteFunctionSpace
 
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)
 
const LocalFunctionType localFunction (const EntityType &entity) const
 obtain a local function for an entity (read-write)
 
LocalFunctionType localFunction ()
 obtain an uninitialized local function (read-write)
 
const LocalFunctionType localFunction () const
 obtain an uninitialized local function (read-write)
 
void clear ()
 set all degrees of freedom to zero
 
DofVectorTypedofVector ()
 
const DofVectorTypedofVector () const
 
int blocks () const
 obtain total number of blocks, i.e. size / blockSize.
 
DofBlockPtrType block (unsigned int index)
 
ConstDofBlockPtrType block (unsigned int index) const
 
SizeType size () const
 Return the number of blocks in the block vector.
 
ConstDofIteratorType dbegin () const
 Obtain the constant iterator pointing to the first dof.
 
DofIteratorType dbegin ()
 Obtain the non-constant iterator pointing to the first dof.
 
ConstDofIteratorType dend () const
 Obtain the constant iterator pointing to the last dof.
 
DofIteratorType dend ()
 Obtain the non-constant iterator pointing to the last dof.
 
template<class DFType >
void axpy (const RangeFieldType &s, const DiscreteFunctionInterface< DFType > &g)
 axpy operation
 
void axpy (const RangeFieldType &s, const DiscreteFunctionInterfaceType &g)
 axpy operation
 
template<class DFType >
RangeFieldType scalarProductDofs (const DiscreteFunctionInterface< DFType > &other) const
 Scalar product between the DoFs of two discrete functions.
 
Dune::FieldTraits< RangeFieldType >::real_type normSquaredDofs () const
 Squared small l^2 norm of all dofs.
 
void print (std ::ostream &out) const
 print all DoFs to a stream (for debugging purposes)
 
bool dofsValid () const
 check for NaNs
 
template<class DFType >
void assign (const DiscreteFunctionInterface< DFType > &g)
 
void assign (const DiscreteFunctionType &g)
 
template<class Operation >
CommDataHandle< Operation >::Type dataHandle (const Operation &operation)
 return reference to data handle object
 
void communicate ()
 do default communication of space for this discrete function
 
void evaluate (const DomainType &x, RangeType &value) const
 
void jacobian (const DomainType &x, JacobianRangeType &jacobian) const
 
void hessian (const DomainType &x, HessianRangeType &hessian) const
 evaluate the hessian of the function (const DomainType &x,HessianRangeType &hessian) const
 
template<class DFType >
DiscreteFunctionTypeoperator+= (const DiscreteFunctionInterface< DFType > &g)
 add another discrete function to this one
 
DiscreteFunctionTypeoperator+= (const DiscreteFunctionType &g)
 add another discrete function to this one
 
template<class DFType >
DiscreteFunctionTypeoperator-= (const DiscreteFunctionInterface< DFType > &g)
 substract all degrees of freedom from given discrete function using the dof iterators
 
DiscreteFunctionTypeoperator-= (const DiscreteFunctionType &g)
 substract all degrees of freedom from given discrete function using the dof iterators
 
DiscreteFunctionTypeoperator*= (const RangeFieldType &scalar)
 multiply all DoFs with a scalar factor
 
DiscreteFunctionTypeoperator/= (const RangeFieldType &scalar)
 devide all DoFs by a scalar factor
 
template<class StreamTraits >
void read (InStreamInterface< StreamTraits > &in)
 read the discrete function from a stream
 
template<class StreamTraits >
void write (OutStreamInterface< StreamTraits > &out) const
 write the discrete function into a stream
 
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.
 
template<class LocalDofs >
void addScaledLocalDofs (const EntityType &entity, const RangeFieldType &s, const LocalDofs &localDofs)
 add scaled local Dofs to dof vector associated with the entity
 
template<class LocalDofs >
void addLocalDofs (const EntityType &entity, const LocalDofs &localDofs)
 add local Dofs to dof vector associated with the entity
 
template<class LocalDofs >
void setLocalDofs (const EntityType &entity, const LocalDofs &localDofs)
 set local Dofs to dof vector associated with the entity
 
template<class Vector >
void getLocalDofs (const EntityType &entity, Vector &localDofs) const
 fill local Dofs to dof vector associated with the entity
 
template<class DFType >
bool compare (const DiscreteFunctionInterface< DFType > &g) const
 
LocalDofVectorAllocatorTypelocalDofVectorAllocator () const
 obtain the local function storage
 
template<class AssembleOperation >
void beginAssemble ()
 Initiate the assemble of values using the LocalContribution concept.
 
template<class AssembleOperation >
void endAssemble ()
 Finalize the assemble of values using the LocalContribution concept.
 
void getLocalDofReferences (const EntityType &entity, LocalDofVectorType &localDofs)
 get local Dofs and store a reference to it in the LocalDofVector
 
template<class Operation >
DiscreteFunctionDefault< Impl >::template CommDataHandle< Operation >::Type dataHandle (const Operation &operation)
 
DefaultLoadBalanceContainsCheckType defaultLoadBalanceContainsCheck () const
 
void operator() (const DomainType &arg, RangeType &dest) const
 Application operator that applies all operators in the linear combination stack.
 

Static Public Attributes

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

Protected Types

typedef ParallelScalarProduct< DiscreteFunctionInterfaceTypeScalarProductType
 
typedef TemporaryLocalFunction< DiscreteFunctionSpaceTypeTemporaryLocalFunctionType
 

Protected Member Functions

 DiscreteFunctionDefault (const std::string &name, const DiscreteFunctionSpaceType &dfSpace)
 Constructor storing discrete function space and local function factory.
 
 DiscreteFunctionDefault (std::string name, std::shared_ptr< const DiscreteFunctionSpaceType > dfSpace)
 
 DiscreteFunctionDefault (const ThisType &)
 
 DiscreteFunctionDefault (ThisType &&other)
 
virtual void backup () const
 
virtual void restore ()
 
virtual void insertSubData ()
 
virtual void removeSubData ()
 
template<class Functor >
void evaluateGlobal (const DomainType &x, Functor functor) const
 evaluate functor in global coordinate
 
const Implementation & asImp () const
 
Implementation & asImp ()
 
virtual void * pointer ()
 

Static Protected Member Functions

static const Implementation & asImp (const ThisType &other)
 
static Implementation & asImp (ThisType &other)
 

Protected Attributes

std::shared_ptr< const DiscreteFunctionSpaceTypedfSpace_
 
Traits::LocalDofVectorStackType ldvStack_
 
LocalDofVectorAllocatorType ldvAllocator_
 
TemporaryLocalFunctionType localFunction_
 
std::string name_
 
ScalarProductType scalarProduct_
 
std::type_index assembleOperation_ = std::type_index( typeid( void ) )
 
std::size_t assembleCount_ = 0
 

Related Functions

(Note that these are not member functions.)

template<class Impl >
std::ostream & operator<< (std::ostream &out, const DiscreteFunctionInterface< Impl > &df)
 write a discrete function into an STL stream
 
template<class DFieldType , class RFieldType , class DType , class RType >
static Mapping< DFieldType, RFieldType, DType, RType > operator+ (const Mapping< DFieldType, RFieldType, DType, RType > &a, const Mapping< DFieldType, RFieldType, DType, RType > &b)
 add two mappings
 
template<class DFieldType , class RFieldType , class DType , class RType >
static Mapping< DFieldType, RFieldType, DType, RType > operator- (const Mapping< DFieldType, RFieldType, DType, RType > &a, const Mapping< DFieldType, RFieldType, DType, RType > &b)
 substract two mappings
 
template<class DFieldType , class RFieldType , class DType , class RType >
static Mapping< DFieldType, RFieldType, DType, RType > operator* (const Mapping< DFieldType, RFieldType, DType, RType > &mapping, const RFieldType &factor)
 scale mapping with factor
 
template<class DFieldType , class RFieldType , class DType , class RType >
static Mapping< DFieldType, RFieldType, DType, RType > operator* (const RFieldType &factor, const Mapping< DFieldType, RFieldType, DType, RType > &mapping)
 scale mapping with factor
 
template<class DFieldType , class RFieldType , class DType , class RType >
static Mapping< DFieldType, RFieldType, DType, RType > operator/ (const Mapping< DFieldType, RFieldType, DType, RType > &mapping, const RFieldType &factor)
 operator / for mappings
 
template<class DFieldType , class RFieldType , class DType , class RType >
static Mapping< DFieldType, RFieldType, DType, RType > operator/ (const RFieldType &factor, const Mapping< DFieldType, RFieldType, DType, RType > &mapping)
 operator / for mappings
 

Detailed Description

template<class Impl>
class Dune::Fem::DiscreteFunctionDefault< Impl >

Default implementation of the discrete function. This class is responsible for the dof storage. Different implementations of the discrete function use different dof storage. The default implementation provides +=, -= and so on operators and a DofIterator access, which can run over all dofs in an efficient way. Furthermore with an entity you can access a local function to evaluate the discrete function by multiplying the dofs and the basefunctions.

Member Typedef Documentation

◆ BlockIndices

template<class Impl >
typedef DiscreteFunctionSpaceType::LocalBlockIndices Dune::Fem::DiscreteFunctionInterface< Impl >::BlockIndices
inherited

◆ ConstDofBlockPtrType

template<class Impl >
typedef BaseType::ConstDofBlockPtrType Dune::Fem::DiscreteFunctionDefault< Impl >::ConstDofBlockPtrType

◆ ConstDofBlockType

template<class Impl >
typedef BaseType::ConstDofBlockType Dune::Fem::DiscreteFunctionDefault< Impl >::ConstDofBlockType

◆ ConstDofIteratorType

template<class Impl >
typedef Traits::ConstDofIteratorType Dune::Fem::DiscreteFunctionDefault< Impl >::ConstDofIteratorType

type of the const dof iterator

◆ DefaultLoadBalanceContainsCheckType

template<class Impl >
typedef LoadBalanceLeafData< ThisType > Dune::Fem::DiscreteFunctionInterface< Impl >::DefaultLoadBalanceContainsCheckType
inherited

◆ DiscreteFunctionInterfaceType

template<class Impl >
typedef BaseType::DiscreteFunctionInterfaceType Dune::Fem::DiscreteFunctionDefault< Impl >::DiscreteFunctionInterfaceType

◆ DiscreteFunctionSpaceType

template<class Impl >
typedef BaseType::DiscreteFunctionSpaceType Dune::Fem::DiscreteFunctionDefault< Impl >::DiscreteFunctionSpaceType

type of discrete function space

◆ DiscreteFunctionType

template<class Impl >
typedef Impl Dune::Fem::DiscreteFunctionDefault< Impl >::DiscreteFunctionType

type of the discrete function (Barton-Nackman parameter)

◆ DofBlockPtrType

template<class Impl >
typedef BaseType::DofBlockPtrType Dune::Fem::DiscreteFunctionDefault< Impl >::DofBlockPtrType

◆ DofBlockType

template<class Impl >
typedef BaseType::DofBlockType Dune::Fem::DiscreteFunctionDefault< Impl >::DofBlockType

◆ DofIteratorType

template<class Impl >
typedef Traits::DofIteratorType Dune::Fem::DiscreteFunctionDefault< Impl >::DofIteratorType

type of the dof iterator

◆ DofType

template<class Impl >
typedef BaseType::DofType Dune::Fem::DiscreteFunctionDefault< Impl >::DofType

◆ DofVectorType

template<class Impl >
typedef Traits::DofVectorType Dune::Fem::DiscreteFunctionDefault< Impl >::DofVectorType

type of DofVector

◆ DomainFieldType

template<class Impl >
typedef DiscreteFunctionSpaceType::DomainFieldType Dune::Fem::DiscreteFunctionDefault< Impl >::DomainFieldType

type of domain field (usually a float type)

◆ DomainType

template<class Impl >
typedef DiscreteFunctionSpaceType::DomainType Dune::Fem::DiscreteFunctionDefault< Impl >::DomainType

type of domain vector

◆ EntityType

template<class Impl >
typedef BaseType::EntityType Dune::Fem::DiscreteFunctionDefault< Impl >::EntityType

◆ FunctionSpaceType

template<class Impl >
typedef DiscreteFunctionSpaceType::FunctionSpaceType Dune::Fem::DiscreteFunctionInterface< Impl >::FunctionSpaceType
inherited

type of associated function space

◆ GridPartType

template<class Impl >
typedef BaseType::GridPartType Dune::Fem::DiscreteFunctionDefault< Impl >::GridPartType

type of the underlying grid part

◆ GridType

template<class Impl >
typedef DiscreteFunctionSpaceType::GridType Dune::Fem::DiscreteFunctionInterface< Impl >::GridType
inherited

type of the underlying grid

◆ GridView

template<class Impl >
typedef GridPartType::GridViewType Dune::Fem::DiscreteFunctionInterface< Impl >::GridView
inherited

◆ HessianRangeType

template<class Impl >
typedef DiscreteFunctionSpaceType::HessianRangeType Dune::Fem::DiscreteFunctionDefault< Impl >::HessianRangeType

type of hessian

◆ JacobianRangeType

template<class Impl >
typedef DiscreteFunctionSpaceType::JacobianRangeType Dune::Fem::DiscreteFunctionDefault< Impl >::JacobianRangeType

type of jacobian

◆ LocalCoordinateType

template<class Impl >
typedef LocalFunctionType::LocalCoordinateType Dune::Fem::DiscreteFunctionDefault< Impl >::LocalCoordinateType

◆ LocalDofVectorAllocatorType

template<class Impl >
typedef Traits::LocalDofVectorAllocatorType Dune::Fem::DiscreteFunctionDefault< Impl >::LocalDofVectorAllocatorType

type of LocalDofVector

◆ LocalDofVectorType

template<class Impl >
typedef Traits::LocalDofVectorType Dune::Fem::DiscreteFunctionDefault< Impl >::LocalDofVectorType

type of LocalDofVector

◆ LocalFunctionType

template<class Impl >
typedef BaseType::LocalFunctionType Dune::Fem::DiscreteFunctionDefault< Impl >::LocalFunctionType

type of local functions

◆ MappingType

template<class Impl >
typedef BaseType::MappingType Dune::Fem::DiscreteFunctionInterface< Impl >::MappingType
inherited

type of mapping base class for this discrete function

◆ RangeFieldType

template<class Impl >
typedef DiscreteFunctionSpaceType::RangeFieldType Dune::Fem::DiscreteFunctionDefault< Impl >::RangeFieldType

type of range field (usually a float type)

◆ RangeType

template<class Impl >
typedef DiscreteFunctionSpaceType::RangeType Dune::Fem::DiscreteFunctionDefault< Impl >::RangeType

type of range vector

◆ ScalarProductType

template<class Impl >
typedef ParallelScalarProduct< DiscreteFunctionInterfaceType > Dune::Fem::DiscreteFunctionDefault< Impl >::ScalarProductType
protected

◆ SizeType

template<class Impl >
typedef DofVectorType::SizeType Dune::Fem::DiscreteFunctionDefault< Impl >::SizeType

size type of the block vector

◆ TemporaryLocalFunctionType

template<class Impl >
typedef TemporaryLocalFunction< DiscreteFunctionSpaceType > Dune::Fem::DiscreteFunctionDefault< Impl >::TemporaryLocalFunctionType
protected

◆ Traits

template<class Impl >
typedef BaseType::Traits Dune::Fem::DiscreteFunctionDefault< Impl >::Traits

Constructor & Destructor Documentation

◆ DiscreteFunctionDefault() [1/4]

template<class Impl >
Dune::Fem::DiscreteFunctionDefault< Impl >::DiscreteFunctionDefault ( const std::string &  name,
const DiscreteFunctionSpaceType dfSpace 
)
inlineprotected

Constructor storing discrete function space and local function factory.

The discrete function space is passed to the interface class and the local function storage is initialized.

Parameters
[in]namename of the discrete function
[in]dfSpacediscrete function space
[in]lfFactorylocal function factory

◆ DiscreteFunctionDefault() [2/4]

template<class Impl >
Dune::Fem::DiscreteFunctionDefault< Impl >::DiscreteFunctionDefault ( std::string  name,
std::shared_ptr< const DiscreteFunctionSpaceType dfSpace 
)
inlineprotected

◆ DiscreteFunctionDefault() [3/4]

template<class Impl >
Dune::Fem::DiscreteFunctionDefault< Impl >::DiscreteFunctionDefault ( const ThisType other)
inlineprotected

◆ DiscreteFunctionDefault() [4/4]

template<class Impl >
Dune::Fem::DiscreteFunctionDefault< Impl >::DiscreteFunctionDefault ( ThisType &&  other)
inlineprotected

Member Function Documentation

◆ addLocalDofs()

template<class Impl >
template<class LocalDofs >
void Dune::Fem::DiscreteFunctionDefault< Impl >::addLocalDofs ( const EntityType entity,
const LocalDofs &  localDofs 
)
inline

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

◆ addScaledLocalDofs()

template<class Impl >
template<class LocalDofs >
void Dune::Fem::DiscreteFunctionDefault< Impl >::addScaledLocalDofs ( const EntityType entity,
const RangeFieldType s,
const LocalDofs &  localDofs 
)
inline

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

◆ asImp() [1/4]

template<class Interface , class Implementation >
Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( )
inlineprotectedinherited

◆ asImp() [2/4]

template<class Interface , class Implementation >
const Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( ) const
inlineprotectedinherited

◆ asImp() [3/4]

template<class Interface , class Implementation >
static const Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( const ThisType other)
inlinestaticprotectedinherited

◆ asImp() [4/4]

template<class Interface , class Implementation >
static Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( ThisType other)
inlinestaticprotectedinherited

◆ assign() [1/2]

template<class Impl >
template<class DFType >
void Dune::Fem::DiscreteFunctionDefault< Impl >::assign ( const DiscreteFunctionInterface< DFType > &  g)
inline

◆ assign() [2/2]

template<class Impl >
void Dune::Fem::DiscreteFunctionDefault< Impl >::assign ( const DiscreteFunctionType g)
inline

◆ axpy() [1/2]

template<class Impl >
template<class DFType >
void Dune::Fem::DiscreteFunctionDefault< Impl >::axpy ( const RangeFieldType s,
const DiscreteFunctionInterface< DFType > &  g 
)
inline

axpy operation

Adds s * g to this discrete function.

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

◆ axpy() [2/2]

template<class Impl >
void Dune::Fem::DiscreteFunctionDefault< Impl >::axpy ( const RangeFieldType s,
const DiscreteFunctionInterfaceType g 
)
inline

axpy operation

Adds s * g to this discrete function.

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

◆ backup()

template<class Impl >
virtual void Dune::Fem::DiscreteFunctionDefault< Impl >::backup ( ) const
inlineprotectedvirtual

◆ beginAssemble()

template<class Impl >
template<class AssembleOperation >
void Dune::Fem::DiscreteFunctionDefault< Impl >::beginAssemble ( )
inline

Initiate the assemble of values using the LocalContribution concept.

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

◆ block() [1/2]

template<class Impl >
DofBlockPtrType Dune::Fem::DiscreteFunctionDefault< Impl >::block ( unsigned int  index)
inline

◆ block() [2/2]

template<class Impl >
ConstDofBlockPtrType Dune::Fem::DiscreteFunctionDefault< Impl >::block ( unsigned int  index) const
inline

◆ blocks()

template<class Impl >
int Dune::Fem::DiscreteFunctionDefault< Impl >::blocks ( ) const
inline

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 Impl >
void Dune::Fem::DiscreteFunctionDefault< Impl >::clear ( )
inline

set all degrees of freedom to zero

◆ communicate()

template<class Impl >
void Dune::Fem::DiscreteFunctionDefault< Impl >::communicate ( )
inline

do default communication of space for this discrete function

◆ compare()

template<class Impl >
template<class DFType >
bool Dune::Fem::DiscreteFunctionDefault< Impl >::compare ( const DiscreteFunctionInterface< DFType > &  g) const
inline

◆ continuous()

template<class Impl >
bool Dune::Fem::DiscreteFunctionDefault< Impl >::continuous ( ) const
inline

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() [1/2]

template<class Impl >
template<class Operation >
CommDataHandle< Operation >::Type Dune::Fem::DiscreteFunctionDefault< Impl >::dataHandle ( const Operation &  operation)

return reference to data handle object

◆ dataHandle() [2/2]

template<class Impl >
template<class Operation >
DiscreteFunctionDefault< Impl >::template CommDataHandle< Operation >::Type Dune::Fem::DiscreteFunctionDefault< Impl >::dataHandle ( const Operation &  operation)
inline

◆ dbegin() [1/2]

template<class Impl >
DofIteratorType Dune::Fem::DiscreteFunctionDefault< Impl >::dbegin ( )
inline

Obtain the non-constant iterator pointing to the first dof.

Returns
Non-Constant iterator pointing to the first dof

◆ dbegin() [2/2]

template<class Impl >
ConstDofIteratorType Dune::Fem::DiscreteFunctionDefault< Impl >::dbegin ( ) const
inline

Obtain the constant iterator pointing to the first dof.

Returns
Constant iterator pointing to the first dof

◆ defaultLoadBalanceContainsCheck()

template<class Impl >
DefaultLoadBalanceContainsCheckType Dune::Fem::DiscreteFunctionInterface< Impl >::defaultLoadBalanceContainsCheck ( ) const
inlineinherited

◆ dend() [1/2]

template<class Impl >
DofIteratorType Dune::Fem::DiscreteFunctionDefault< Impl >::dend ( )
inline

Obtain the non-constant iterator pointing to the last dof.

Returns
Non-Constant iterator pointing to the last dof

◆ dend() [2/2]

template<class Impl >
ConstDofIteratorType Dune::Fem::DiscreteFunctionDefault< Impl >::dend ( ) const
inline

Obtain the constant iterator pointing to the last dof.

Returns
Constant iterator pointing to the last dof

◆ dofsValid()

template<class Impl >
bool Dune::Fem::DiscreteFunctionDefault< Impl >::dofsValid
inline

check for NaNs

Returns
if one of the DoFs is NaN false is returned, otherwise true

◆ dofVector() [1/2]

template<class Impl >
DofVectorType & Dune::Fem::DiscreteFunctionDefault< Impl >::dofVector ( )
inline

◆ dofVector() [2/2]

template<class Impl >
const DofVectorType & Dune::Fem::DiscreteFunctionDefault< Impl >::dofVector ( ) const
inline

◆ enableDofCompression()

template<class Impl >
void Dune::Fem::DiscreteFunctionDefault< Impl >::enableDofCompression ( )
inline

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()

template<class Impl >
template<class AssembleOperation >
void Dune::Fem::DiscreteFunctionDefault< Impl >::endAssemble ( )
inline

Finalize the assemble of values using the LocalContribution concept.

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

◆ evaluate()

template<class Impl >
void Dune::Fem::DiscreteFunctionDefault< Impl >::evaluate ( const DomainType x,
RangeType value 
) const
inline

◆ evaluateGlobal()

template<class Impl >
template<class Functor >
void Dune::Fem::DiscreteFunctionDefault< Impl >::evaluateGlobal ( const DomainType x,
Functor  functor 
) const
inlineprotected

evaluate functor in global coordinate

◆ getLocalDofReferences()

template<class Impl >
void Dune::Fem::DiscreteFunctionDefault< Impl >::getLocalDofReferences ( const EntityType entity,
LocalDofVectorType localDofs 
)
inline

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

◆ getLocalDofs()

template<class Impl >
template<class Vector >
void Dune::Fem::DiscreteFunctionDefault< Impl >::getLocalDofs ( const EntityType entity,
Vector &  localDofs 
) const
inline

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

◆ gridPart()

template<class Impl >
const GridPartType & Dune::Fem::DiscreteFunctionDefault< Impl >::gridPart ( ) const
inline

obtain a reference to the underlying grid part

◆ hessian()

template<class Impl >
void Dune::Fem::DiscreteFunctionDefault< Impl >::hessian ( const DomainType x,
HessianRangeType hessian 
) const
inline

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

◆ insertSubData()

template<class Impl >
void Dune::Fem::DiscreteFunctionDefault< Impl >::insertSubData
protectedvirtual

Reimplemented from Dune::Fem::PersistentObject.

◆ jacobian()

template<class Impl >
void Dune::Fem::DiscreteFunctionDefault< Impl >::jacobian ( const DomainType x,
JacobianRangeType jacobian 
) const
inline

◆ localDofVectorAllocator()

template<class Impl >
LocalDofVectorAllocatorType & Dune::Fem::DiscreteFunctionDefault< Impl >::localDofVectorAllocator ( ) const
inline

obtain the local function storage

Returns
a reference to the local function storage

◆ localFunction() [1/4]

template<class Impl >
LocalFunctionType Dune::Fem::DiscreteFunctionDefault< Impl >::localFunction ( )
inline

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]

template<class Impl >
const LocalFunctionType Dune::Fem::DiscreteFunctionDefault< Impl >::localFunction ( ) const
inline

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]

template<class Impl >
LocalFunctionType Dune::Fem::DiscreteFunctionDefault< Impl >::localFunction ( const EntityType entity)
inline

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]

template<class Impl >
const LocalFunctionType Dune::Fem::DiscreteFunctionDefault< Impl >::localFunction ( const EntityType entity) const
inline

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]

template<class Impl >
std::string & Dune::Fem::DiscreteFunctionDefault< Impl >::name ( )
inline

obtain the name of the discrete function

Returns
string holding name of discrete function

◆ name() [2/2]

template<class Impl >
const std::string & Dune::Fem::DiscreteFunctionDefault< Impl >::name ( ) const
inline

obtain the name of the discrete function

Returns
string holding name of discrete function

◆ normSquaredDofs()

template<class Impl >
Dune::FieldTraits< RangeFieldType >::real_type Dune::Fem::DiscreteFunctionDefault< Impl >::normSquaredDofs ( ) const
inline

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()()

template<typename DFieldType , typename RFieldType , class DType , class RType >
void Dune::Fem::Mapping< DFieldType, RFieldType, DType, RType >::operator() ( const DomainType arg,
RangeType dest 
) const
inlineinherited

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

Parameters
[in]argargument
[out]destdestination

◆ operator*=()

template<class Impl >
DiscreteFunctionType & Dune::Fem::DiscreteFunctionDefault< Impl >::operator*= ( const RangeFieldType scalar)
inline

multiply all DoFs with a scalar factor

Parameters
[in]scalarfactor to multiply DoFs with
Returns
reference to this discrete function (i.e. *this)

◆ operator+=() [1/2]

template<class Impl >
template<class DFType >
DiscreteFunctionDefault< Impl >::DiscreteFunctionType & Dune::Fem::DiscreteFunctionDefault< Impl >::operator+= ( const DiscreteFunctionInterface< DFType > &  g)
inline

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 Impl >
DiscreteFunctionType & Dune::Fem::DiscreteFunctionDefault< Impl >::operator+= ( const DiscreteFunctionType g)
inline

add another discrete function to this one

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

◆ operator-=() [1/2]

template<class Impl >
template<class DFType >
DiscreteFunctionDefault< Impl >::DiscreteFunctionType & Dune::Fem::DiscreteFunctionDefault< Impl >::operator-= ( const DiscreteFunctionInterface< DFType > &  g)
inline

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-=() [2/2]

template<class Impl >
DiscreteFunctionType & Dune::Fem::DiscreteFunctionDefault< Impl >::operator-= ( const DiscreteFunctionType g)
inline

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 Impl >
DiscreteFunctionType & Dune::Fem::DiscreteFunctionDefault< Impl >::operator/= ( const RangeFieldType scalar)
inline

devide all DoFs by a scalar factor

Parameters
[in]scalarfactor with which all dofs are devided
Returns
reference to this discrete function (i.e. *this)

◆ operator=() [1/2]

template<class Impl >
ThisType & Dune::Fem::DiscreteFunctionDefault< Impl >::operator= ( const ThisType )
delete

◆ operator=() [2/2]

template<class Impl >
ThisType & Dune::Fem::DiscreteFunctionDefault< Impl >::operator= ( ThisType &&  )
delete

◆ order()

template<class Impl >
constexpr int Dune::Fem::DiscreteFunctionDefault< Impl >::order ( ) const
inlineconstexpr

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

◆ pointer()

virtual void * Dune::Fem::PersistentObject::pointer ( )
inlineprotectedvirtualinherited

◆ print()

template<class Impl >
void Dune::Fem::DiscreteFunctionDefault< Impl >::print ( std ::ostream &  out) const
inline

print all DoFs to a stream (for debugging purposes)

Parameters
[in]outstream to print to

◆ read()

template<class Impl >
template<class StreamTraits >
void Dune::Fem::DiscreteFunctionDefault< Impl >::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.

◆ removeSubData()

template<class Impl >
void Dune::Fem::DiscreteFunctionDefault< Impl >::removeSubData
protectedvirtual

Reimplemented from Dune::Fem::PersistentObject.

◆ restore()

template<class Impl >
virtual void Dune::Fem::DiscreteFunctionDefault< Impl >::restore ( )
inlineprotectedvirtual

◆ scalarProductDofs()

template<class Impl >
template<class DFType >
RangeFieldType Dune::Fem::DiscreteFunctionDefault< Impl >::scalarProductDofs ( const DiscreteFunctionInterface< DFType > &  other) const
inline

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

◆ setLocalDofs()

template<class Impl >
template<class LocalDofs >
void Dune::Fem::DiscreteFunctionDefault< Impl >::setLocalDofs ( const EntityType entity,
const LocalDofs &  localDofs 
)
inline

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 Impl >
SizeType Dune::Fem::DiscreteFunctionDefault< Impl >::size ( ) const
inline

Return the number of blocks in the block vector.

Returns
Number of block in the block vector

◆ space()

template<class Impl >
const DiscreteFunctionSpaceType & Dune::Fem::DiscreteFunctionDefault< Impl >::space ( ) const
inline

obtain a reference to the corresponding DiscreteFunctionSpace

◆ write()

template<class Impl >
template<class StreamTraits >
void Dune::Fem::DiscreteFunctionDefault< Impl >::write ( OutStreamInterface< StreamTraits > &  out) const
inline

write the discrete function into a stream

Parameters
[in]outstream to write the discrete function to

Friends And Related Function Documentation

◆ operator*() [1/2]

template<class DFieldType , class RFieldType , class DType , class RType >
static Mapping< DFieldType, RFieldType, DType, RType > operator* ( const Mapping< DFieldType, RFieldType, DType, RType > &  mapping,
const RFieldType &  factor 
)
related

scale mapping with factor

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

◆ operator*() [2/2]

template<class DFieldType , class RFieldType , class DType , class RType >
static Mapping< DFieldType, RFieldType, DType, RType > operator* ( const RFieldType &  factor,
const Mapping< DFieldType, RFieldType, DType, RType > &  mapping 
)
related

scale mapping with factor

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

◆ operator+()

template<class DFieldType , class RFieldType , class DType , class RType >
static Mapping< DFieldType, RFieldType, DType, RType > operator+ ( const Mapping< DFieldType, RFieldType, DType, RType > &  a,
const Mapping< DFieldType, RFieldType, DType, RType > &  b 
)
related

add two mappings

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

◆ operator-()

template<class DFieldType , class RFieldType , class DType , class RType >
static Mapping< DFieldType, RFieldType, DType, RType > operator- ( const Mapping< DFieldType, RFieldType, DType, RType > &  a,
const Mapping< DFieldType, RFieldType, DType, RType > &  b 
)
related

substract two mappings

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

◆ operator/() [1/2]

template<class DFieldType , class RFieldType , class DType , class RType >
static Mapping< DFieldType, RFieldType, DType, RType > operator/ ( const Mapping< DFieldType, RFieldType, DType, RType > &  mapping,
const RFieldType &  factor 
)
related

operator / for mappings

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

◆ operator/() [2/2]

template<class DFieldType , class RFieldType , class DType , class RType >
static Mapping< DFieldType, RFieldType, DType, RType > operator/ ( const RFieldType &  factor,
const Mapping< DFieldType, RFieldType, DType, RType > &  mapping 
)
related

operator / for mappings

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

◆ operator<<()

template<class Impl >
std::ostream & operator<< ( std ::ostream &  out,
const DiscreteFunctionInterface< Impl > &  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)

Member Data Documentation

◆ assembleCount_

template<class Impl >
std::size_t Dune::Fem::DiscreteFunctionDefault< Impl >::assembleCount_ = 0
protected

◆ assembleOperation_

template<class Impl >
std::type_index Dune::Fem::DiscreteFunctionDefault< Impl >::assembleOperation_ = std::type_index( typeid( void ) )
protected

◆ blockSize

template<class Impl >
constexpr std::size_t Dune::Fem::DiscreteFunctionInterface< Impl >::blockSize
staticconstexpr

size of the dof blocks

◆ dfSpace_

template<class Impl >
std::shared_ptr< const DiscreteFunctionSpaceType > Dune::Fem::DiscreteFunctionDefault< Impl >::dfSpace_
protected

◆ ldvAllocator_

template<class Impl >
LocalDofVectorAllocatorType Dune::Fem::DiscreteFunctionDefault< Impl >::ldvAllocator_
mutableprotected

◆ ldvStack_

template<class Impl >
Traits::LocalDofVectorStackType Dune::Fem::DiscreteFunctionDefault< Impl >::ldvStack_
protected

◆ localFunction_

template<class Impl >
TemporaryLocalFunctionType Dune::Fem::DiscreteFunctionDefault< Impl >::localFunction_
mutableprotected

◆ name_

template<class Impl >
std::string Dune::Fem::DiscreteFunctionDefault< Impl >::name_
protected

◆ scalarProduct_

template<class Impl >
ScalarProductType Dune::Fem::DiscreteFunctionDefault< Impl >::scalarProduct_
protected

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