dune-fem
2.4.1-rc
|
#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/function/adaptivefunction/adaptivefunction.hh>
Classes | |
class | DofStorageWrapper |
wrapper class to create fake DofStorage from DofType* More... | |
Public Types | |
typedef BaseType::DiscreteFunctionSpaceType | DiscreteFunctionSpaceType |
typedef BaseType::DofVectorType | DofVectorType |
typedef BaseType::DofType | DofType |
typedef MutableBlockVector< MutableArray< DofType >, DiscreteFunctionSpaceType::localBlockSize > | MutableDofVectorType |
enum | |
size of the dof blocks More... | |
typedef BaseType::Traits | Traits |
typedef AdaptiveDiscreteFunction< DiscreteFunctionSpace > | DiscreteFunctionType |
type of the discrete function (Barton-Nackman parameter) More... | |
typedef BaseType::DiscreteFunctionInterfaceType | DiscreteFunctionInterfaceType |
typedef BaseType::GridPartType | GridPartType |
type of the underlying grid part More... | |
typedef DiscreteFunctionSpaceType::DomainType | DomainType |
type of domain vector More... | |
typedef DiscreteFunctionSpaceType::RangeType | RangeType |
type of range vector More... | |
typedef DiscreteFunctionSpaceType::JacobianRangeType | JacobianRangeType |
type of jacobian More... | |
typedef DiscreteFunctionSpaceType::HessianRangeType | HessianRangeType |
type of hessian More... | |
typedef DiscreteFunctionSpaceType::DomainFieldType | DomainFieldType |
type of domain field (usually a float type) More... | |
typedef DiscreteFunctionSpaceType::RangeFieldType | RangeFieldType |
type of range field (usually a float type) More... | |
typedef Traits::DofIteratorType | DofIteratorType |
type of the dof iterator More... | |
typedef Traits::ConstDofIteratorType | ConstDofIteratorType |
type of the const dof iterator More... | |
typedef Traits::LocalDofVectorType | LocalDofVectorType |
type of LocalDofVector More... | |
typedef Traits::LocalDofVectorAllocatorType | LocalDofVectorAllocatorType |
type of LocalDofVector More... | |
typedef BaseType::LocalFunctionType | LocalFunctionType |
type of local functions More... | |
typedef BaseType::DofBlockType | DofBlockType |
typedef BaseType::ConstDofBlockType | ConstDofBlockType |
typedef BaseType::DofBlockPtrType | DofBlockPtrType |
typedef BaseType::ConstDofBlockPtrType | ConstDofBlockPtrType |
typedef BaseType::EntityType | EntityType |
typedef DofVectorType::SizeType | SizeType |
size type of the block vector More... | |
enum | |
size of the dof blocks More... | |
typedef DiscreteFunctionSpaceType::GridType | GridType |
Type of the underlying grid. More... | |
typedef BaseType::MappingType | MappingType |
type of mapping base class for this discrete function More... | |
typedef LoadBalanceLeafData< ThisType > | DefaultLoadBalanceContainsCheckType |
typedef DiscreteFunctionTraits< AdaptiveDiscreteFunction< DiscreteFunctionSpace > >::DiscreteFunctionSpaceType::FunctionSpaceType | FunctionSpaceType |
type of function space this function belongs to More... | |
typedef AdaptiveDiscreteFunction< DiscreteFunctionSpace > | FunctionType |
type of the implementation (Barton-Nackman) More... | |
Public Member Functions | |
AdaptiveDiscreteFunction (const std::string &name, const DiscreteFunctionSpaceType &space) | |
AdaptiveDiscreteFunction (const std::string &name, const DiscreteFunctionSpaceType &space, const DofType *data) | |
AdaptiveDiscreteFunction (const std::string &name, const DiscreteFunctionSpaceType &space, DofVectorType &dofVector) | |
AdaptiveDiscreteFunction (const AdaptiveDiscreteFunction &other) | |
DofType * | leakPointer () |
const DofType * | leakPointer () const |
DofVectorType & | dofVector () |
const DofVectorType & | dofVector () const |
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... | |
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 | blocks () const |
obtain total number of blocks, i.e. size / blockSize. More... | |
DofBlockPtrType | block (unsigned int index) |
obtain pointer to block of discrete function with block number index (read-only) More... | |
ConstDofBlockPtrType | block (unsigned int index) const |
obtain pointer to block of discrete function with block number index More... | |
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... | |
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 | print (std::ostream &out) const |
print all DoFs to a stream (for debugging purposes) More... | |
bool | dofsValid () const |
check for NaNs More... | |
void | assign (const DiscreteFunctionInterface< DFType > &g) |
void | assign (const DiscreteFunctionType &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 DiscreteFunctionType &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... | |
DiscreteFunctionType & | operator-= (const DiscreteFunctionType &g) |
substract all degrees of freedom from given discrete function using the dof iterators More... | |
DiscreteFunctionType & | operator*= (const RangeFieldType &scalar) |
multiply all DoFs with a scalar factor More... | |
DiscreteFunctionType & | operator/= (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... | |
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 | |
DofVectorType & | allocateDofStorageWrapper (const size_t size, const DofType *v) |
DofVectorType & | allocateDofStorage (const DiscreteFunctionSpaceType &space) |
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 AdaptiveDiscreteFunction< DiscreteFunctionSpace > & | asImp () const |
AdaptiveDiscreteFunction< DiscreteFunctionSpace > & | asImp () |
virtual void * | pointer () |
Static Protected Member Functions | |
static const AdaptiveDiscreteFunction< DiscreteFunctionSpace > & | asImp (const ThisType &other) |
static AdaptiveDiscreteFunction< DiscreteFunctionSpace > & | asImp (ThisType &other) |
Protected Attributes | |
std::unique_ptr< DofStorageInterface > | memObject_ |
DofVectorType & | dofVector_ |
const DiscreteFunctionSpaceType & | dfSpace_ |
Traits::LocalDofVectorStackType | ldvStack_ |
LocalDofVectorAllocatorType | ldvAllocator_ |
DebugLock | dofPointerLock_ |
std::string | name_ |
ScalarProductType | scalarProduct_ |
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
|
inherited |
|
inherited |
|
inherited |
type of the const dof iterator
|
inherited |
|
inherited |
typedef BaseType :: DiscreteFunctionSpaceType Dune::Fem::AdaptiveDiscreteFunction< DiscreteFunctionSpace >::DiscreteFunctionSpaceType |
|
inherited |
type of the discrete function (Barton-Nackman parameter)
|
inherited |
|
inherited |
|
inherited |
type of the dof iterator
typedef BaseType :: DofType Dune::Fem::AdaptiveDiscreteFunction< DiscreteFunctionSpace >::DofType |
typedef BaseType :: DofVectorType Dune::Fem::AdaptiveDiscreteFunction< DiscreteFunctionSpace >::DofVectorType |
|
inherited |
type of domain field (usually a float type)
|
inherited |
type of domain vector
|
inherited |
|
inherited |
type of function space this function belongs to
|
inherited |
type of the implementation (Barton-Nackman)
|
inherited |
type of the underlying grid part
|
inherited |
Type of the underlying grid.
|
inherited |
type of hessian
|
inherited |
type of jacobian
|
inherited |
type of LocalDofVector
|
inherited |
type of LocalDofVector
|
inherited |
type of local functions
|
inherited |
type of mapping base class for this discrete function
typedef MutableBlockVector< MutableArray< DofType >, DiscreteFunctionSpaceType::localBlockSize > Dune::Fem::AdaptiveDiscreteFunction< DiscreteFunctionSpace >::MutableDofVectorType |
|
inherited |
type of range field (usually a float type)
|
inherited |
type of range vector
|
inherited |
size type of the block vector
|
inherited |
|
inherited |
size of the dof blocks
|
inherited |
size of the dof blocks
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
add local Dofs to dof vector
|
inlineinherited |
add scaled local Dofs to dof vector
|
inlineprotected |
References Dune::Fem::allocateManagedDofStorage().
|
inlineprotected |
|
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 |
|
inherited |
|
inlineinherited |
|
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 |
|
inlineprotectedvirtualinherited |
Implements Dune::Fem::PersistentObject.
|
inlineinherited |
obtain pointer to block of discrete function with block number index (read-only)
|
inlineinherited |
obtain pointer to block of discrete function with block number index
|
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.
|
inlineinherited |
set all degrees of freedom to zero
|
inlineinherited |
do default communication of space for this discrete function
Referenced by Dune::Fem::SparseRowMatrixObject< DomainFunction::DiscreteFunctionSpaceType, RangeFunction::DiscreteFunctionSpaceType >::apply(), and Dune::Fem::SparseRowMatrixObject< DomainFunction::DiscreteFunctionSpaceType, RangeFunction::DiscreteFunctionSpaceType >::apply_t().
|
inherited |
return reference to data handle object
|
inlineinherited |
Obtain the constant iterator pointing to the first dof.
|
inlineinherited |
Obtain the non-constant iterator pointing to the first dof.
|
inlineinherited |
|
inlineinherited |
Obtain the constant iterator pointing to the last dof.
|
inlineinherited |
Obtain the non-constant iterator pointing to the last dof.
|
inlineinherited |
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 |
|
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 |
|
inline |
Referenced by Dune::Fem::SparseRowMatrixObject< DomainFunction::DiscreteFunctionSpaceType, RangeFunction::DiscreteFunctionSpaceType >::apply(), Dune::Fem::SparseRowMatrixObject< DomainFunction::DiscreteFunctionSpaceType, RangeFunction::DiscreteFunctionSpaceType >::apply_t(), and Dune::Fem::BlockDiagonalLinearOperator< DiscreteFunctionSpace, LocalBlock >::multiply().
|
inline |
|
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.
|
inlineinherited |
|
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 |
|
inlineinherited |
multiply all DoFs with a scalar factor
[in] | scalar | factor to multiply DoFs with |
|
inherited |
add another discrete function to this one
[in] | g | discrete function to add |
|
inlineinherited |
add another discrete function to this one
[in] | g | discrete function to add |
|
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 |
|
inlineinherited |
substract all degrees of freedom from given discrete function using the dof iterators
[in] | g | discrete function which is substracted from this discrete function |
|
inlineinherited |
devide all DoFs by a scalar factor
[in] | scalar | factor with which all dofs are devided |
|
inlineinherited |
|
inlineprotectedvirtualinherited |
Reimplemented in Dune::Fem::PersistenceManager::WrapObject< ObjectType, false >.
|
inherited |
print all DoFs to a stream (for debugging purposes)
[in] | out | stream to print to |
|
inlineinherited |
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.
|
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
|
inlineinherited |
Return the number of blocks in the block vector.
Referenced by Dune::Fem::BlockDiagonalLinearOperator< DiscreteFunctionSpace, LocalBlock >::multiply().
|
inlineinherited |
obtain a reference to the corresponding DiscreteFunctionSpace
|
inlineinherited |
write the discrete function into a stream
[in] | out | stream to write the discrete function to |
|
protectedinherited |
|
mutableprotectedinherited |
|
protected |
|
mutableprotectedinherited |
|
protectedinherited |
|
protected |
|
protectedinherited |
|
protectedinherited |