dune-fem
2.4.1-rc
|
#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/function/combinedfunction/combinedfunction.hh>
Public Types | |
typedef ContainedDiscreteFunctionImp | ContainedDiscreteFunctionType |
Discrete function this discrete function belongs to. More... | |
typedef ContainedDiscreteFunctionType | SubDiscreteFunctionType |
typedef DiscreteFunctionTraits< ThisType > | Traits |
Traits class with all necessary type definitions. More... | |
typedef BaseType::GridType | GridType |
Grid implementation. More... | |
typedef BaseType::GridPartType | GridPartType |
GridPart implementation. More... | |
typedef BaseType::DiscreteFunctionType | DiscreteFunctionType |
typedef BaseType::DiscreteFunctionSpaceType | DiscreteFunctionSpaceType |
the combined discrete function type More... | |
typedef Traits::ContainedDiscreteFunctionSpaceType | ContainedDiscreteFunctionSpaceType |
Contained discrete function space. More... | |
typedef ContainedDiscreteFunctionSpaceType | SubDiscreteFunctionSpaceType |
typedef BaseType::DofType | DofType |
Intrinsic type used for dofs (typically a float type) More... | |
typedef BaseType::RangeFieldType | RangeFieldType |
Intrinsic type used for range field (like DofType) More... | |
typedef BaseType::DomainFieldType | DomainFieldType |
Intrinsic type used for the domain field. More... | |
typedef BaseType::RangeType | RangeType |
Vector type used for the range field. More... | |
typedef BaseType::DomainType | DomainType |
Vector type used for the domain field. More... | |
typedef Traits::MapperType | MapperType |
Mapper type (from the space) More... | |
typedef BaseType::DofIteratorType | DofIteratorType |
Iterator over dof container. More... | |
typedef BaseType::ConstDofIteratorType | ConstDofIteratorType |
Read-only iterator over dof container. More... | |
typedef BaseType::DofBlockPtrType | DofBlockPtrType |
typedef BaseType::ConstDofBlockPtrType | ConstDofBlockPtrType |
typedef BaseType::LocalDofVectorAllocatorType | LocalDofVectorAllocatorType |
enum | |
size of the dof blocks More... | |
typedef BaseType::DiscreteFunctionInterfaceType | DiscreteFunctionInterfaceType |
typedef DiscreteFunctionSpaceType::JacobianRangeType | JacobianRangeType |
type of jacobian More... | |
typedef DiscreteFunctionSpaceType::HessianRangeType | HessianRangeType |
type of hessian More... | |
typedef Traits::DofVectorType | DofVectorType |
type of DofVector More... | |
typedef Traits::LocalDofVectorType | LocalDofVectorType |
type of LocalDofVector More... | |
typedef BaseType::LocalFunctionType | LocalFunctionType |
type of local functions More... | |
typedef BaseType::DofBlockType | DofBlockType |
typedef BaseType::ConstDofBlockType | ConstDofBlockType |
typedef BaseType::EntityType | EntityType |
typedef DofVectorType::SizeType | SizeType |
size type of the block vector More... | |
enum | |
size of the dof blocks More... | |
typedef BaseType::MappingType | MappingType |
type of mapping base class for this discrete function More... | |
typedef LoadBalanceLeafData< ThisType > | DefaultLoadBalanceContainsCheckType |
typedef DiscreteFunctionTraits< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::DiscreteFunctionSpaceType::FunctionSpaceType | FunctionSpaceType |
type of function space this function belongs to More... | |
typedef CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > | FunctionType |
type of the implementation (Barton-Nackman) More... | |
Public Member Functions | |
CombinedDiscreteFunction (const ContainedDiscreteFunctionType &func) | |
CombinedDiscreteFunction (const std::string &name, const ContainedDiscreteFunctionSpaceType &spc) | |
CombinedDiscreteFunction (const std::string &name, const DiscreteFunctionSpaceType &spc) | |
CombinedDiscreteFunction (const ThisType &other) | |
~CombinedDiscreteFunction () | |
Destructor. More... | |
void | clear () |
set all degrees of freedom to zero More... | |
void | assign (const ThisType &g) |
int | size () const |
obtain total number of DoFs More... | |
ThisType & | operator+= (const ThisType &g) |
ThisType & | operator-= (const ThisType &g) |
DiscreteFunctionType & | operator*= (const RangeFieldType &scalar) |
multiply all DoFs by a scalar factor More... | |
DiscreteFunctionType & | operator/= (const RangeFieldType &scalar) |
multiply all DoFs by a scalar factor More... | |
void | addScaled (const ThisType &g, const RangeFieldType &s) |
void | axpy (const RangeFieldType &s, const ThisType &g) |
axpy operation More... | |
RangeFieldType | scalarProductDofs (const ThisType &other) const |
template<class StreamTraits > | |
void | read (InStreamInterface< StreamTraits > &in) |
read the discrete function from a stream More... | |
template<class StreamTraits > | |
void | write (OutStreamInterface< StreamTraits > &out) const |
write the discrete function into a stream More... | |
void | print (std::ostream &out) const |
print all DoFs to a stream (for debugging purposes) More... | |
bool | dofsValid () const |
check for NaNs More... | |
ConstDofBlockPtrType | block (unsigned int index) const |
DofBlockPtrType | block (unsigned int index) |
const RangeFieldType & | dof (unsigned int index) const |
RangeFieldType & | dof (unsigned int index) |
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... | |
ContainedDiscreteFunctionType & | subFunction (const int i) |
const ContainedDiscreteFunctionType & | subFunction (const int i) const |
ContainedDiscreteFunctionSpaceType & | subSpace () |
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... | |
DofVectorType & | dofVector () |
const DofVectorType & | dofVector () const |
int | blocks () const |
obtain total number of blocks, i.e. size / blockSize. 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 DiscreteFunctionInterface< DFType > &g) |
axpy operation More... | |
void | axpy (const RangeFieldType &s, const DiscreteFunctionInterfaceType &g) |
axpy operation More... | |
RangeFieldType | scalarProductDofs (const DiscreteFunctionInterface< DFType > &other) const |
Scalar product between the DoFs of two discrete functions. More... | |
Dune::FieldTraits< RangeFieldType >::real_type | normSquaredDofs () const |
Squared small l^2 norm of all dofs. More... | |
void | assign (const DiscreteFunctionInterface< DFType > &g) |
CommDataHandle< Operation >::Type | dataHandle (const Operation *operation) |
return reference to data handle object More... | |
void | communicate () |
do default communication of space for this discrete function More... | |
void | evaluate (const DomainType &x, RangeType &value) const |
evaluate the function More... | |
void | evaluate (const DomainType &x, RangeType &value) const |
evaluate the function More... | |
void | jacobian (const DomainType &x, JacobianRangeType &jacobian) const |
evaluate the Jacobian of the function More... | |
void | jacobian (const DomainType &x, JacobianRangeType &jacobian) const |
evaluate the Jacobian of the function More... | |
void | hessian (const DomainType &x, HessianRangeType &hessian) const |
evaluate the hessian of the function (const DomainType &x,HessianRangeType &hessian) const More... | |
void | hessian (const DomainType &x, HessianRangeType &hessian) const |
evaluate the hessian of the function More... | |
DiscreteFunctionType & | operator+= (const DiscreteFunctionInterface< DFType > &g) |
add another discrete function to this one More... | |
DiscreteFunctionType & | operator-= (const DiscreteFunctionInterface< DFType > &g) |
substract all degrees of freedom from given discrete function using the dof iterators More... | |
void | enableDofCompression () |
Enable this discrete function for dof compression, i.e. during grdi changes a dof compression is done when the DofManagers compress is called. More... | |
bool | operator== (const DiscreteFunctionInterface< DFType > &g) const |
bool | operator!= (const DiscreteFunctionInterface< DFType > &g) const |
LocalDofVectorAllocatorType & | localDofVectorAllocator () const |
obtain the local function storage More... | |
void | addScaledLocalDofs (const EntityType &entity, const RangeFieldType &s, const LocalDofs &localDofs) |
add scaled local Dofs to dof vector More... | |
void | addLocalDofs (const EntityType &entity, const LocalDofs &localDofs) |
add local Dofs to dof vector More... | |
void | setLocalDofs (const EntityType &entity, const LocalDofs &localDofs) |
set local Dofs to dof vector More... | |
void | getLocalDofs (const EntityType &entity, LocalDofVectorType &localDofs) |
get local Dofs and store a reference to it in the LocalDofVector More... | |
void | getLocalDofs (const EntityType &entity, Dune::DynamicVector< DofType, A > &localDofs) const |
get local Dofs and store the values in LocalDofVector 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... | |
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 More... | |
const CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > & | asImp () const |
CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > & | asImp () |
virtual void * | pointer () |
Static Protected Member Functions | |
static const CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > & | asImp (const ThisType &other) |
static CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > & | asImp (ThisType &other) |
Protected Attributes | |
const DiscreteFunctionSpaceType & | dfSpace_ |
LocalDofVectorAllocatorType | ldvAllocator_ |
DebugLock | dofPointerLock_ |
std::string | name_ |
ScalarProductType | scalarProduct_ |
A class for combining N discrete function of the same type to a vector valued function
typedef BaseType :: ConstDofBlockPtrType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::ConstDofBlockPtrType |
|
inherited |
typedef BaseType::ConstDofIteratorType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::ConstDofIteratorType |
Read-only iterator over dof container.
typedef Traits::ContainedDiscreteFunctionSpaceType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::ContainedDiscreteFunctionSpaceType |
Contained discrete function space.
typedef ContainedDiscreteFunctionImp Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::ContainedDiscreteFunctionType |
Discrete function this discrete function belongs to.
|
inherited |
|
inherited |
typedef BaseType::DiscreteFunctionSpaceType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::DiscreteFunctionSpaceType |
the combined discrete function type
typedef BaseType::DiscreteFunctionType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::DiscreteFunctionType |
Discrete function type (identical to this type, needed as Barton-Nackman parameter
typedef BaseType :: DofBlockPtrType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::DofBlockPtrType |
|
inherited |
typedef BaseType::DofIteratorType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::DofIteratorType |
Iterator over dof container.
typedef BaseType::DofType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::DofType |
Intrinsic type used for dofs (typically a float type)
|
inherited |
type of DofVector
typedef BaseType::DomainFieldType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::DomainFieldType |
Intrinsic type used for the domain field.
typedef BaseType::DomainType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::DomainType |
Vector type used for the domain field.
|
inherited |
|
inherited |
type of function space this function belongs to
|
inherited |
type of the implementation (Barton-Nackman)
typedef BaseType::GridPartType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::GridPartType |
GridPart implementation.
typedef BaseType::GridType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::GridType |
Grid implementation.
|
inherited |
type of hessian
|
inherited |
type of jacobian
typedef BaseType :: LocalDofVectorAllocatorType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::LocalDofVectorAllocatorType |
|
inherited |
type of LocalDofVector
|
inherited |
type of local functions
typedef Traits::MapperType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::MapperType |
Mapper type (from the space)
|
inherited |
type of mapping base class for this discrete function
typedef BaseType::RangeFieldType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::RangeFieldType |
Intrinsic type used for range field (like DofType)
typedef BaseType::RangeType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::RangeType |
Vector type used for the range field.
|
inherited |
size type of the block vector
typedef ContainedDiscreteFunctionSpaceType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::SubDiscreteFunctionSpaceType |
typedef ContainedDiscreteFunctionType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::SubDiscreteFunctionType |
typedef DiscreteFunctionTraits< ThisType > Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::Traits |
Traits class with all necessary type definitions.
|
inherited |
size of the dof blocks
|
inherited |
size of the dof blocks
|
inline |
Constructor WARNING: here we have to use a const cast for the function space!
|
inline |
|
inline |
|
inline |
Copy constructor The copy constructor copies the dofs
References Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::subFunction().
|
inline |
Destructor.
|
inlineinherited |
add local Dofs to dof vector
|
inline |
References Dune::Fem::axpy().
|
inlineinherited |
add scaled local Dofs to dof vector
|
inlineinherited |
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 |
|
inherited |
|
inline |
axpy operation
Adds s * g to this discrete function.
[in] | s | scalar value to scale g with |
[in] | g | discrete function to add |
References Dune::Fem::axpy(), and Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::subFunction().
|
inherited |
axpy operation
Adds s * g to this discrete function.
[in] | s | scalar value to scale g with |
[in] | g | discrete function to add |
|
inlineinherited |
axpy operation
Adds s * g to this discrete function.
[in] | s | scalar value to scale g with |
[in] | g | discrete function to add |
References Dune::Fem::DiscreteFunctionInterface< Impl >::dofVector().
|
inlineprotectedvirtualinherited |
Implements Dune::Fem::PersistentObject.
References Dune::Fem::PersistenceManager::backupStream().
|
inline |
|
inline |
|
inlineinherited |
obtain total number of blocks, i.e. size / blockSize.
The number of blocks of DoFs (degrees of freedom) can also be seen as the size of the discrete function divided by the blockSize.
|
inline |
set all degrees of freedom to zero
|
inlineinherited |
do default communication of space for this discrete function
References Dune::Fem::ThreadManager::singleThreadMode().
|
inherited |
return reference to data handle object
|
inline |
obtain an iterator pointing to the first DoF (read-only)
|
inline |
obtain an iterator pointing to the first DoF (read-write)
|
inlineinherited |
|
inline |
obtain an iterator pointing behind the last DoF (read-only)
|
inline |
obtain an iterator pointing behind the last DoF (read-write)
|
inline |
|
inline |
|
inline |
check for NaNs
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Enable this discrete function for dof compression, i.e. during grdi changes a dof compression is done when the DofManagers compress is called.
References Dune::Fem::operator==().
|
inlineinherited |
evaluate the function
[in] | x | evaluation point |
[out] | value | value of the function in x |
|
inlineinherited |
evaluate the function
[in] | x | evaluation point |
[out] | value | value of the function in x |
|
protectedinherited |
evaluate functor in global coordinate
|
inlineinherited |
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 |
|
inlineinherited |
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 |
|
inlineinherited |
get local Dofs and store a reference to it in the LocalDofVector
|
inlineinherited |
get local Dofs and store the values in LocalDofVector
|
inlineinherited |
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 hessian of the function (const DomainType &x,HessianRangeType &hessian) const
[in] | x | evaluation point |
[out] | hessian | value of the hessian in x (const DomainType &x,HessianRangeType &hessian) const |
|
protectedvirtualinherited |
Reimplemented from Dune::Fem::PersistentObject.
|
inlineinherited |
evaluate the Jacobian of the function
[in] | x | evaluation point |
[out] | jacobian | value of the Jacobian in x |
|
inlineinherited |
evaluate the Jacobian of the function
[in] | x | evaluation point |
[out] | jacobian | value of the Jacobian in x |
|
inlineinherited |
obtain the local function storage
|
inlineinherited |
obtain a local function for an entity (read-write)
[in] | entity | Entity to focus view of discrete function |
|
inlineinherited |
obtain a local function for an entity (read-write)
[in] | entity | Entity to focus view of discrete function |
|
inlineinherited |
obtain the name of the discrete function
|
inlineinherited |
Squared small l^2 norm of all dofs.
References Dune::Fem::real().
|
inlineinherited |
References Dune::Fem::operator==().
|
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 |
|
inherited |
add another discrete function to this one
[in] | g | discrete function to add |
|
inline |
|
inherited |
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 |
multiply all DoFs by a scalar factor
[in] | scalar | factor to muliply all DoFs by |
|
inlineinherited |
|
inlineprotectedvirtualinherited |
Reimplemented in Dune::Fem::PersistenceManager::WrapObject< ObjectType, false >.
|
inline |
print all DoFs to a stream (for debugging purposes)
[in] | out | stream to print to |
|
inline |
read the discrete function from a stream
[in] | in | stream to read the discrete function from |
|
protectedvirtualinherited |
Reimplemented from Dune::Fem::PersistentObject.
|
inlineprotectedvirtualinherited |
Implements Dune::Fem::PersistentObject.
References Dune::Fem::PersistenceManager::restoreStream().
|
inline |
|
inlineinherited |
Scalar product between the DoFs of two discrete functions.
[in] | other | discrete function to evaluate the scalar product with |
|
inlineinherited |
set local Dofs to dof vector
|
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.
|
inlineinherited |
obtain a reference to the corresponding DiscreteFunctionSpace
|
inline |
Referenced by Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::assign(), Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::axpy(), Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::CombinedDiscreteFunction(), Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::operator+=(), Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::operator-=(), and Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::scalarProductDofs().
|
inline |
|
inline |
|
inline |
write the discrete function into a stream
[in] | out | stream to write the discrete function to |
|
protectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
protectedinherited |
|
protectedinherited |