dune-fem
2.4.1-rc
|
#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/function/common/discretefunction.hh>
Classes | |
struct | CommDataHandle |
Public Types | |
enum | { blockSize = DiscreteFunctionSpaceType::localBlockSize } |
size of the dof blocks More... | |
typedef DiscreteFunctionTraits< Impl > | Traits |
type of the traits More... | |
typedef Traits::DiscreteFunctionType | DiscreteFunctionType |
type of the implementaton (Barton-Nackman) More... | |
typedef Traits::DiscreteFunctionSpaceType | DiscreteFunctionSpaceType |
type of associated discrete function space More... | |
typedef DiscreteFunctionInterface< Impl > | DiscreteFunctionInterfaceType |
type of the discrete function interface (this type) More... | |
typedef DiscreteFunctionSpaceType::DomainFieldType | DomainFieldType |
type of domain field, i.e. type of coordinate component More... | |
typedef DiscreteFunctionSpaceType::RangeFieldType | RangeFieldType |
type of range field, i.e. dof type More... | |
typedef DiscreteFunctionSpaceType::DomainType | DomainType |
type of domain, i.e. type of coordinates More... | |
typedef DiscreteFunctionSpaceType::RangeType | RangeType |
type of range, i.e. result of evaluation More... | |
typedef DiscreteFunctionSpaceType::JacobianRangeType | JacobianRangeType |
type of jacobian, i.e. type of evaluated gradient More... | |
typedef DiscreteFunctionSpaceType::GridPartType | GridPartType |
type of the underlying grid part More... | |
typedef DiscreteFunctionSpaceType::GridType | GridType |
Type of the underlying grid. More... | |
typedef Traits::LocalFunctionType | LocalFunctionType |
type of local functions More... | |
typedef Traits::DofVectorType | DofVectorType |
Type of the dof vector used in the discrete function implementation. More... | |
typedef Traits::DofIteratorType | DofIteratorType |
Type of the dof iterator used in the discrete function implementation. More... | |
typedef Traits::ConstDofIteratorType | ConstDofIteratorType |
Type of the constantdof iterator used in the discrete function implementation. More... | |
typedef Traits::DofType | DofType |
typedef Traits::DofBlockType | DofBlockType |
typedef Traits::ConstDofBlockType | ConstDofBlockType |
typedef Traits::DofBlockPtrType | DofBlockPtrType |
typedef Traits::ConstDofBlockPtrType | ConstDofBlockPtrType |
typedef BaseType::MappingType | MappingType |
type of mapping base class for this discrete function More... | |
typedef DiscreteFunctionSpaceType::EntityType | EntityType |
type of entity local functions are defined on More... | |
typedef LoadBalanceLeafData< ThisType > | DefaultLoadBalanceContainsCheckType |
typedef DiscreteFunctionTraits< Impl >::DiscreteFunctionSpaceType::FunctionSpaceType | FunctionSpaceType |
type of function space this function belongs to More... | |
typedef Impl | FunctionType |
type of the implementation (Barton-Nackman) More... | |
typedef FunctionSpaceType::HessianRangeType | HessianRangeType |
hessian type More... | |
Public Member Functions | |
DofVectorType & | dofVector () |
const DofVectorType & | dofVector () const |
const std::string & | name () const |
obtain the name of the discrete function More... | |
const DiscreteFunctionSpaceType & | space () const |
obtain a reference to the corresponding DiscreteFunctionSpace More... | |
const GridPartType & | gridPart () const |
obtain a reference to the underlying grid part More... | |
LocalFunctionType | localFunction (const EntityType &entity) |
obtain a local function for an entity (read-write) More... | |
const LocalFunctionType | localFunction (const EntityType &entity) const |
obtain a local function for an entity (read-write) More... | |
void | clear () |
set all degrees of freedom to zero More... | |
int | size () const |
obtain total number of DoFs More... | |
int | blocks () const |
obtain total number of blocks, i.e. size / blockSize. More... | |
ConstDofBlockPtrType | block (unsigned int index) const |
obtain pointer to block of discrete function with block number index More... | |
DofBlockPtrType | block (unsigned int index) |
obtain pointer to block of discrete function with block number index (read-only) More... | |
ConstDofIteratorType | dbegin () const |
obtain an iterator pointing to the first DoF (read-only) More... | |
ConstDofIteratorType | dend () const |
obtain an iterator pointing behind the last DoF (read-only) More... | |
DofIteratorType | dbegin () |
obtain an iterator pointing to the first DoF (read-write) More... | |
DofIteratorType | dend () |
obtain an iterator pointing behind the last DoF (read-write) More... | |
RangeFieldType * | allocDofPointer () const |
allocate a pointer to a consecutive array storing the DoFs More... | |
void | freeDofPointer (RangeFieldType *dofPointer) |
allocate a pointer to a consecutive array storing the DoFs More... | |
void | freeDofPointerNoCopy (const RangeFieldType *dofPointer) const |
allocate a pointer to a consecutive array storing the DoFs More... | |
void | axpy (const RangeFieldType &s, const 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) |
assign the DoFs of another discrete function to this one More... | |
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... | |
template<class DFType > | |
DiscreteFunctionType & | operator+= (const DiscreteFunctionInterface< DFType > &g) |
add another discrete function to this one More... | |
template<class DFType > | |
DiscreteFunctionType & | operator-= (const DiscreteFunctionInterface< DFType > &g) |
substract all degrees of freedom from given discrete function using the dof iterators More... | |
DiscreteFunctionType & | operator*= (const RangeFieldType &scalar) |
multiply all DoFs by a scalar factor More... | |
DiscreteFunctionType & | operator/= (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 grdi changes a dof compression is done when the DofManagers compress is called. More... | |
DefaultLoadBalanceContainsCheckType | defaultLoadBalanceContainsCheck () const |
virtual void | operator() (const DomainType &arg, RangeType &dest) const |
application operator call evaluate More... | |
void | operator() (const DomainType &arg, RangeType &dest) const |
Application operator that applies all operators in the linear combination stack. More... | |
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 More... | |
Protected Member Functions | |
DiscreteFunctionInterface () | |
default constructor More... | |
const Impl & | asImp () const |
Impl & | asImp () |
Static Protected Member Functions | |
static const Impl & | asImp (const ThisType &other) |
static Impl & | asImp (ThisType &other) |
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... | |
This is the interface of a discrete function which describes the features of a discrete function. It contains a local function and a dof iterator which can iterate over all dofs of one level. Via the method access the local dofs and basis functions can be accessed for a given entity. The DOF-Iterators are STL-like Iterators, i.e. they can be dereferenced giving the corresponding DOF.
typedef Traits :: ConstDofBlockPtrType Dune::Fem::DiscreteFunctionInterface< Impl >::ConstDofBlockPtrType |
typedef Traits :: ConstDofBlockType Dune::Fem::DiscreteFunctionInterface< Impl >::ConstDofBlockType |
typedef Traits :: ConstDofIteratorType Dune::Fem::DiscreteFunctionInterface< Impl >::ConstDofIteratorType |
Type of the constantdof iterator used in the discrete function implementation.
typedef LoadBalanceLeafData< ThisType > Dune::Fem::DiscreteFunctionInterface< Impl >::DefaultLoadBalanceContainsCheckType |
typedef DiscreteFunctionInterface< Impl > Dune::Fem::DiscreteFunctionInterface< Impl >::DiscreteFunctionInterfaceType |
type of the discrete function interface (this type)
typedef Traits :: DiscreteFunctionSpaceType Dune::Fem::DiscreteFunctionInterface< Impl >::DiscreteFunctionSpaceType |
type of associated discrete function space
typedef Traits :: DiscreteFunctionType Dune::Fem::DiscreteFunctionInterface< Impl >::DiscreteFunctionType |
type of the implementaton (Barton-Nackman)
typedef Traits :: DofBlockPtrType Dune::Fem::DiscreteFunctionInterface< Impl >::DofBlockPtrType |
typedef Traits :: DofBlockType Dune::Fem::DiscreteFunctionInterface< Impl >::DofBlockType |
typedef Traits :: DofIteratorType Dune::Fem::DiscreteFunctionInterface< Impl >::DofIteratorType |
Type of the dof iterator used in the discrete function implementation.
typedef Traits :: DofType Dune::Fem::DiscreteFunctionInterface< Impl >::DofType |
typedef Traits :: DofVectorType Dune::Fem::DiscreteFunctionInterface< Impl >::DofVectorType |
Type of the dof vector used in the discrete function implementation.
typedef DiscreteFunctionSpaceType :: DomainFieldType Dune::Fem::DiscreteFunctionInterface< Impl >::DomainFieldType |
type of domain field, i.e. type of coordinate component
typedef DiscreteFunctionSpaceType :: DomainType Dune::Fem::DiscreteFunctionInterface< Impl >::DomainType |
type of domain, i.e. type of coordinates
typedef DiscreteFunctionSpaceType :: EntityType Dune::Fem::DiscreteFunctionInterface< Impl >::EntityType |
type of entity local functions are defined on
|
inherited |
type of function space this function belongs to
|
inherited |
type of the implementation (Barton-Nackman)
typedef DiscreteFunctionSpaceType::GridPartType Dune::Fem::DiscreteFunctionInterface< Impl >::GridPartType |
type of the underlying grid part
typedef DiscreteFunctionSpaceType :: GridType Dune::Fem::DiscreteFunctionInterface< Impl >::GridType |
Type of the underlying grid.
|
inherited |
hessian type
typedef DiscreteFunctionSpaceType :: JacobianRangeType Dune::Fem::DiscreteFunctionInterface< Impl >::JacobianRangeType |
type of jacobian, i.e. type of evaluated gradient
typedef Traits :: LocalFunctionType Dune::Fem::DiscreteFunctionInterface< Impl >::LocalFunctionType |
type of local functions
typedef BaseType :: MappingType Dune::Fem::DiscreteFunctionInterface< Impl >::MappingType |
type of mapping base class for this discrete function
typedef DiscreteFunctionSpaceType :: RangeFieldType Dune::Fem::DiscreteFunctionInterface< Impl >::RangeFieldType |
type of range field, i.e. dof type
typedef DiscreteFunctionSpaceType :: RangeType Dune::Fem::DiscreteFunctionInterface< Impl >::RangeType |
type of range, i.e. result of evaluation
typedef DiscreteFunctionTraits< Impl > Dune::Fem::DiscreteFunctionInterface< Impl >::Traits |
type of the traits
|
inlineprotected |
default constructor
|
inline |
allocate a pointer to a consecutive array storing the DoFs
To support external packages, it is often required to have the DoFs in a consecutive array. This function ensures this, making a copy if necessary.
|
inlinestaticprotectedinherited |
|
inlinestaticprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inline |
assign the DoFs of another discrete function to this one
[in] | g | discrete function which is copied |
|
inline |
axpy operation
Adds s * g to this discrete function.
[in] | s | scalar value to scale g with |
[in] | g | discrete function to add |
|
inline |
obtain pointer to block of discrete function with block number index
|
inline |
obtain pointer to block of discrete function with block number index (read-only)
|
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.
|
inline |
set all degrees of freedom to zero
|
inline |
do default communication of space for this discrete function
|
inline |
return reference to data handle object
|
inline |
obtain an iterator pointing to the first DoF (read-only)
Referenced by Dune::Fem::DiscreteFunctionDefault< Impl >::assign(), Dune::Fem::DiscreteFunctionDefault< Impl >::axpy(), Dune::Fem::DiscreteFunctionDefault< Impl >::operator+=(), Dune::Fem::DiscreteFunctionDefault< Impl >::operator-=(), and Dune::Fem::DiscreteFunctionDefault< Impl >::operator==().
|
inline |
obtain an iterator pointing to the first DoF (read-write)
|
inline |
|
inline |
obtain an iterator pointing behind the last DoF (read-only)
|
inline |
obtain an iterator pointing behind the last DoF (read-write)
|
inline |
check for NaNs
|
inline |
|
inline |
|
inline |
Enable this discrete function for dof compression, i.e. during grdi changes a dof compression is done when the DofManagers compress is called.
|
inlineinherited |
evaluate the function
[in] | x | evaluation point |
[out] | value | value of the function in x |
|
inline |
allocate a pointer to a consecutive array storing the DoFs
This method serves two purposes:
[in] | dofPointer | pointer to the dof array previously allocated by allocDofPointer |
|
inline |
allocate a pointer to a consecutive array storing the DoFs
This method serves sincet the user cannot know, if the DoF array returned by allocDofPointer has to be freed.
[in] | dofPointer | pointer to the dof array previously allocated by allocDofPointer |
|
inline |
obtain a reference to the underlying grid part
|
inlineinherited |
evaluate the hessian of the function
[in] | x | evaluation point |
[out] | hessian | value of the hessian in x |
|
inlineinherited |
evaluate the Jacobian of the function
[in] | x | evaluation point |
[out] | jacobian | value of the Jacobian in x |
|
inline |
obtain a local function for an entity (read-write)
[in] | entity | Entity to focus view of discrete function |
|
inline |
obtain a local function for an entity (read-write)
[in] | entity | Entity to focus view of discrete function |
|
inline |
obtain the name of the discrete function
|
inline |
Squared small l^2 norm of all dofs.
|
inlinevirtualinherited |
application operator call evaluate
[in] | arg | argument |
[out] | dest | destination, i.e. f(arg) |
|
inlineinherited |
Application operator that applies all operators in the linear combination stack.
[in] | arg | argument |
[out] | dest | destination |
|
inline |
multiply all DoFs by a scalar factor
[in] | scalar | factor to muliply all DoFs by |
|
inline |
add another discrete function to this one
[in] | g | discrete function to add |
|
inline |
substract all degrees of freedom from given discrete function using the dof iterators
[in] | g | discrete function which is substracted from this discrete function |
|
inline |
devide all DoFs by a scalar factor
[in] | scalar | factor to divide all DoFs by |
|
inline |
print all DoFs to a stream (for debugging purposes)
[in] | out | stream to print to |
Referenced by Dune::Fem::DiscreteFunctionInterface< Impl >::operator<<().
|
inline |
read the discrete function from a stream
[in] | in | stream to read the discrete function from |
Referenced by Dune::Fem::operator>>().
|
inline |
Scalar product between the DoFs of two discrete functions.
[in] | other | discrete function to evaluate the scalar product with |
|
inline |
obtain total number of DoFs
The number of DoFs (degrees of freedom) can also be seen as the size of the discrete function, i.e., the size of the vector that forms this discrete funciton.
Referenced by Dune::Fem::DiscreteFunctionDefault< Impl >::assign(), Dune::Fem::DiscreteFunctionDefault< Impl >::axpy(), Dune::Fem::DiscreteFunctionDefault< Impl >::operator+=(), Dune::Fem::DiscreteFunctionDefault< Impl >::operator-=(), and Dune::Fem::DiscreteFunctionDefault< Impl >::operator==().
|
inline |
obtain a reference to the corresponding DiscreteFunctionSpace
|
inline |
write the discrete function into a stream
[in] | out | stream to write the discrete function to |
Referenced by Dune::Fem::operator<<().
|
related |
write a discrete function into an STL stream
[in] | out | STL stream to write to |
[in] | df | discrete function to write |
References Dune::Fem::DiscreteFunctionInterface< Impl >::print().