DUNE-FEM (unstable)

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

Public Types

typedef Impl DiscreteFunctionType
 type of the discrete function (Barton-Nackman parameter)
 
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 DofVectorType::SizeType SizeType
 size type of the block vector
 
typedef DiscreteFunctionSpaceType::FunctionSpaceType FunctionSpaceType
 type of associated function space
 
typedef DiscreteFunctionSpaceType::GridType GridType
 type of the underlying grid
 
typedef BaseType::MappingType MappingType
 type of mapping base class for this discrete function
 

Public Member Functions

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...
 
void clear ()
 set all degrees of freedom to zero More...
 
int blocks () const
 obtain total number of blocks, i.e. size / blockSize. More...
 
DofBlockPtrType block (unsigned int index)
 
ConstDofBlockPtrType block (unsigned int index) const
 
SizeType size () const
 Return the number of blocks in the block vector. More...
 
ConstDofIteratorType dbegin () const
 Obtain the constant iterator pointing to the first dof. More...
 
DofIteratorType dbegin ()
 Obtain the non-constant iterator pointing to the first dof. More...
 
ConstDofIteratorType dend () const
 Obtain the constant iterator pointing to the last dof. More...
 
DofIteratorType dend ()
 Obtain the non-constant iterator pointing to the last dof. More...
 
template<class DFType >
void axpy (const RangeFieldType &s, const DiscreteFunctionInterface< DFType > &g)
 axpy operation More...
 
void axpy (const RangeFieldType &s, const DiscreteFunctionInterfaceType &g)
 axpy operation More...
 
template<class DFType >
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 print (std ::ostream &out) const
 print all DoFs to a stream (for debugging purposes) More...
 
bool dofsValid () const
 check for NaNs More...
 
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 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 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...
 
template<class DFType >
DiscreteFunctionTypeoperator+= (const DiscreteFunctionInterface< DFType > &g)
 add another discrete function to this one More...
 
DiscreteFunctionTypeoperator+= (const DiscreteFunctionType &g)
 add another discrete function to this one More...
 
template<class DFType >
DiscreteFunctionTypeoperator-= (const DiscreteFunctionInterface< DFType > &g)
 substract all degrees of freedom from given discrete function using the dof iterators More...
 
DiscreteFunctionTypeoperator-= (const DiscreteFunctionType &g)
 substract all degrees of freedom from given discrete function using the dof iterators More...
 
DiscreteFunctionTypeoperator*= (const RangeFieldType &scalar)
 multiply all DoFs with a scalar factor More...
 
DiscreteFunctionTypeoperator/= (const RangeFieldType &scalar)
 devide all DoFs by a scalar factor More...
 
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 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...
 
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 More...
 
template<class LocalDofs >
void addLocalDofs (const EntityType &entity, const LocalDofs &localDofs)
 add local Dofs to dof vector associated with the entity More...
 
template<class LocalDofs >
void setLocalDofs (const EntityType &entity, const LocalDofs &localDofs)
 set local Dofs to dof vector associated with the entity More...
 
template<class Vector >
void getLocalDofs (const EntityType &entity, Vector &localDofs) const
 fill local Dofs to dof vector associated with the entity More...
 
LocalDofVectorAllocatorTypelocalDofVectorAllocator () const
 obtain the local function storage More...
 
template<class AssembleOperation >
void beginAssemble ()
 Initiate the assemble of values using the LocalContribution concept. More...
 
template<class AssembleOperation >
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
 

Static Public Attributes

static constexpr std::size_t blockSize = Hybrid::size( BlockIndices() )
 size of the dof blocks
 

Protected Member Functions

 DiscreteFunctionDefault (const std::string &name, const DiscreteFunctionSpaceType &dfSpace)
 Constructor storing discrete function space and local function factory. More...
 
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
 

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 More...
 

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.

Constructor & Destructor Documentation

◆ DiscreteFunctionDefault()

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

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

References Dune::Fem::DiscreteFunctionDefault< Impl >::space().

◆ 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

References Dune::Fem::DiscreteFunctionDefault< Impl >::space().

◆ 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, ...)

References DUNE_THROW.

◆ 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

References DUNE_THROW, and Dune::Fem::DiscreteFunctionDefault< Impl >::space().

Referenced by Dune::Fem::DiscreteFunctionDefault< Impl >::endAssemble().

◆ 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

References Dune::Fem::DiscreteFunctionDefault< Impl >::space().

◆ dataHandle()

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

return reference to data handle object

◆ 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

◆ 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

Referenced by Dune::Fem::SparseRowMatrixObject< DomainSpace, RangeSpace, Matrix >::extractDiagonal().

◆ 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

◆ 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 ( const bool  communicate = true)
inline

Finalize the assemble of values using the LocalContribution concept.

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

References Dune::Fem::DiscreteFunctionDefault< Impl >::communicate(), and DUNE_THROW.

◆ evaluate()

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

evaluate the function

Parameters
[in]xevaluation point
[out]valuevalue of the function in x

References Dune::Fem::DiscreteFunctionDefault< Impl >::localFunction().

◆ 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

References Dune::Fem::DiscreteFunctionDefault< Impl >::space().

Referenced by Dune::Fem::LocalDataInliner< DiscreteFunctionType, ContainsCheck >::inlineData().

◆ 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

References Dune::Fem::DiscreteFunctionDefault< Impl >::hessian(), and Dune::Fem::DiscreteFunctionDefault< Impl >::localFunction().

Referenced by Dune::Fem::DiscreteFunctionDefault< Impl >::hessian().

◆ insertSubData()

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

◆ jacobian()

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

evaluate the Jacobian of the function

Parameters
[in]xevaluation point
[out]jacobianvalue of the Jacobian in x

References Dune::Fem::DiscreteFunctionDefault< Impl >::jacobian(), and Dune::Fem::DiscreteFunctionDefault< Impl >::localFunction().

Referenced by Dune::Fem::DiscreteFunctionDefault< Impl >::jacobian().

◆ 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

Referenced by Dune::Fem::DiscreteFunctionDefault< Impl >::evaluate(), Dune::Fem::DiscreteFunctionDefault< Impl >::hessian(), and Dune::Fem::DiscreteFunctionDefault< Impl >::jacobian().

◆ 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

Referenced by Dune::Fem::HdivProjection< DiscreteFunctionType >::normalJump().

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

References Dune::Fem::DiscreteFunctionInterface< Impl >::operator*=().

◆ 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.

References Dune::Fem::DiscreteFunctionDefault< Impl >::space().

◆ 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.

References DUNE_MODULE_VERSION_ID, DUNE_THROW, and DUNE_VERSION_ID.

Referenced by Dune::Fem::DiscreteFunctionDefault< Impl >::restore().

◆ removeSubData()

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

◆ 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

References Dune::Fem::ParallelScalarProduct< DiscreteFunction >::scalarProductDofs().

◆ 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

References Dune::Fem::DiscreteFunctionDefault< Impl >::space().

Referenced by Dune::Fem::LocalDataXtractor< DiscreteFunctionType, ContainsCheck >::xtractData().

◆ 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

References Dune::Fem::DiscreteFunctionInterface< Impl >::blockSize.

◆ space()

◆ 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

References DUNE_MODULE_VERSION_ID.

Referenced by Dune::Fem::DiscreteFunctionDefault< Impl >::backup().

Friends And Related Function Documentation

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

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


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