DUNE-FEM (unstable)

Dune::Fem::AdaptiveDiscreteFunction< DiscreteFunctionSpace > Class Template Reference

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

Classes

class  DofStorageWrapper
 wrapper class to create fake DofStorage from DofType* More...
 

Public Types

typedef AdaptiveDiscreteFunction< DiscreteFunctionSpaceDiscreteFunctionType
 type of the discrete function (Barton-Nackman parameter)
 
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::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
 
typedef AdaptiveDiscreteFunction< DiscreteFunctionSpaceFunctionType
 type of the implementation (Barton-Nackman)
 

Public Member Functions

 AdaptiveDiscreteFunction (const std::string &name, const DiscreteFunctionSpaceType &space)
 Constructor to use if the vector storing the dofs does not exist yet. More...
 
 AdaptiveDiscreteFunction (const std::string &name, const DiscreteFunctionSpaceType &space, const DofType *data)
 Constructor to use if the vector storing the dofs already exists. More...
 
 AdaptiveDiscreteFunction (const std::string &name, const DiscreteFunctionSpaceType &space, DofVectorType &dofVector)
 Constructor to use if the vector storing the dofs already exists. More...
 
 AdaptiveDiscreteFunction (const ThisType &other)
 Copy constructor.
 
 AdaptiveDiscreteFunction (ThisType &&other)
 Move constructor.
 
DofVectorType & dofVector ()
 
const DofVectorType & dofVector () const
 
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 DFType >
void assign (const DiscreteFunctionInterface< DFType > &g)
 
void assign (const DiscreteFunctionType &g)
 
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 DiscreteFunctionSpaceType & space () 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...
 
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 print (std ::ostream &out) const
 print all DoFs to a stream (for debugging purposes) More...
 
bool dofsValid () const
 check for NaNs More...
 
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 DiscreteFunctionType &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...
 
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...
 
void read (InStreamInterface< StreamTraits > &in)
 read the discrete function from a stream More...
 
void write (OutStreamInterface< StreamTraits > &out) const
 write the discrete function into a stream 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...
 
LocalDofVectorAllocatorTypelocalDofVectorAllocator () 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< AdaptiveDiscreteFunction< DiscreteFunctionSpace > > &df)
 write a discrete function into an STL stream More...
 
static Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeTypeoperator+ (const Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeType > &a, const Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeType > &b)
 add two mappings More...
 
static Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeTypeoperator- (const Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeType > &a, const Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeType > &b)
 substract two mappings More...
 
static Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeTypeoperator* (const Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeType > &mapping, const DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType &factor)
 scale mapping with factor More...
 
static Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeTypeoperator* (const DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType &factor, const Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeType > &mapping)
 scale mapping with factor More...
 
static Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeTypeoperator/ (const Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeType > &mapping, const DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType &factor)
 operator / for mappings More...
 
static Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeTypeoperator/ (const DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType &factor, const Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType, DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeType > &mapping)
 operator / for mappings More...
 

Detailed Description

template<class DiscreteFunctionSpace>
class Dune::Fem::AdaptiveDiscreteFunction< DiscreteFunctionSpace >

An adaptive discrete function This class is comparable to DFAdapt, except that it provides a specialisation for CombinedSpace objects which provides enriched functionality (access to subfunctions) and runtime optimisations

Constructor & Destructor Documentation

◆ AdaptiveDiscreteFunction() [1/3]

template<class DiscreteFunctionSpace >
Dune::Fem::AdaptiveDiscreteFunction< DiscreteFunctionSpace >::AdaptiveDiscreteFunction ( const std::string &  name,
const DiscreteFunctionSpaceType &  space 
)
inline

Constructor to use if the vector storing the dofs does not exist yet.

Parameters
[in]namename of the discrete function
[in]spacespace the discrete function lives in

◆ AdaptiveDiscreteFunction() [2/3]

template<class DiscreteFunctionSpace >
Dune::Fem::AdaptiveDiscreteFunction< DiscreteFunctionSpace >::AdaptiveDiscreteFunction ( const std::string &  name,
const DiscreteFunctionSpaceType &  space,
const DofType *  data 
)
inline

Constructor to use if the vector storing the dofs already exists.

Parameters
[in]namename of the discrete function
[in]spacespace the discrete function lives in
[in]datapointer to data

◆ AdaptiveDiscreteFunction() [3/3]

template<class DiscreteFunctionSpace >
Dune::Fem::AdaptiveDiscreteFunction< DiscreteFunctionSpace >::AdaptiveDiscreteFunction ( const std::string &  name,
const DiscreteFunctionSpaceType &  space,
DofVectorType &  dofVector 
)
inline

Constructor to use if the vector storing the dofs already exists.

Parameters
[in]namename of the discrete function
[in]spacespace the discrete function lives in
[in]dofVectorreference to the dof vector

Member Function Documentation

◆ addLocalDofs()

void Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::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

◆ addScaledLocalDofs()

void Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::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]

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

◆ assign() [2/2]

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

◆ axpy() [1/2]

void Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::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/2]

axpy operation

Adds s * g to this discrete function.

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

◆ backup()

virtual void Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::backup ( ) const
inlineprotectedvirtualinherited

◆ beginAssemble()

Initiate the assemble of values using the LocalContribution concept.

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

◆ block() [1/2]

DofBlockPtrType Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::block ( unsigned int  index)
inlineinherited

◆ block() [2/2]

ConstDofBlockPtrType Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::block ( unsigned int  index) const
inlineinherited

◆ blocks()

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

set all degrees of freedom to zero

◆ communicate()

do default communication of space for this discrete function

◆ continuous()

bool Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::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< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::dataHandle ( const Operation &  operation)
inherited

return reference to data handle object

◆ dbegin() [1/2]

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

Returns
Non-Constant iterator pointing to the first dof

◆ dbegin() [2/2]

Obtain the constant iterator pointing to the first dof.

Returns
Constant iterator pointing to the first dof

◆ dend() [1/2]

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

Returns
Non-Constant iterator pointing to the last dof

◆ dend() [2/2]

Obtain the constant iterator pointing to the last dof.

Returns
Constant iterator pointing to the last dof

◆ dofsValid()

check for NaNs

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

◆ dofVector() [1/2]

template<class DiscreteFunctionSpace >
DofVectorType & Dune::Fem::AdaptiveDiscreteFunction< DiscreteFunctionSpace >::dofVector ( )
inline

◆ dofVector() [2/2]

template<class DiscreteFunctionSpace >
const DofVectorType & Dune::Fem::AdaptiveDiscreteFunction< DiscreteFunctionSpace >::dofVector ( ) const
inline

◆ enableDofCompression()

template<class DiscreteFunctionSpace >
void Dune::Fem::AdaptiveDiscreteFunction< DiscreteFunctionSpace >::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.

◆ endAssemble()

void Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::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< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::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]

evaluate the function

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

◆ getLocalDofs()

void Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::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< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::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]

evaluate the hessian of the function

Parameters
[in]xevaluation point
[out]hessianvalue of the hessian in x

◆ insertSubData()

void Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::insertSubData
protectedvirtualinherited

Reimplemented from Dune::Fem::PersistentObject.

◆ jacobian() [1/2]

void Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::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]

evaluate the Jacobian of the function

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

◆ localDofVectorAllocator()

obtain the local function storage

Returns
a reference to the local function storage

◆ localFunction() [1/4]

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]

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< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::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< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::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]

template<class DiscreteFunctionSpace >
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 DiscreteFunctionSpace >
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()

Dune::FieldTraits< RangeFieldType >::real_type Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::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]

application operator call evaluate

Parameters
[in]argargument
[out]destdestination, i.e. f(arg)

◆ operator()() [2/2]

◆ operator*=()

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]

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]

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]

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]

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

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)

◆ order()

constexpr int Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::order ( ) const
inlineconstexprinherited

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

◆ print()

void Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::print ( std ::ostream &  out) const
inlineinherited

print all DoFs to a stream (for debugging purposes)

Parameters
[in]outstream to print to

◆ read()

void Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::read ( InStreamInterface< StreamTraits > &  in)
inlineinherited

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

void Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::removeSubData
protectedvirtualinherited

Reimplemented from Dune::Fem::PersistentObject.

◆ restore()

virtual void Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::restore ( )
inlineprotectedvirtualinherited

◆ scalarProductDofs()

RangeFieldType Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::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

◆ setLocalDofs()

void Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::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()

Return the number of blocks in the block vector.

Returns
Number of block in the block vector

◆ space()

const DiscreteFunctionSpaceType & Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::space ( ) const
inlineinherited

obtain a reference to the corresponding DiscreteFunctionSpace

◆ write()

void Dune::Fem::DiscreteFunctionDefault< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::write ( OutStreamInterface< StreamTraits > &  out) const
inlineinherited

write the discrete function into a stream

Parameters
[in]outstream to write the discrete function to

Friends And Related Function Documentation

◆ operator*() [1/2]

◆ operator*() [2/2]

◆ operator+()

static Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeType > operator+ ( const Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeType > &  a,
const Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeType > &  b 
)
related

add two mappings

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

◆ operator-()

static Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeType > operator- ( const Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeType > &  a,
const Mapping< DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainFieldType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeFieldType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::DomainType , DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType ::RangeType > &  b 
)
related

substract two mappings

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

◆ operator/() [1/2]

◆ operator/() [2/2]

◆ operator<<()

std::ostream & operator<< ( std ::ostream &  out,
const DiscreteFunctionInterface< AdaptiveDiscreteFunction< DiscreteFunctionSpace > > &  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 13, 23:29, 2024)