dune-fem 2.8.0
|
#include <dune/fem/function/common/discretefunction.hh>
Classes | |
struct | CommDataHandle |
Public Types | |
typedef BaseType::Traits | Traits |
typedef Impl | DiscreteFunctionType |
type of the discrete function (Barton-Nackman parameter) | |
typedef BaseType::DiscreteFunctionInterfaceType | DiscreteFunctionInterfaceType |
typedef BaseType::DiscreteFunctionSpaceType | DiscreteFunctionSpaceType |
type of discrete function space | |
typedef BaseType::GridPartType | GridPartType |
type of the underlying grid part | |
typedef DiscreteFunctionSpaceType::DomainType | DomainType |
type of domain vector | |
typedef DiscreteFunctionSpaceType::RangeType | RangeType |
type of range vector | |
typedef DiscreteFunctionSpaceType::JacobianRangeType | JacobianRangeType |
type of jacobian | |
typedef DiscreteFunctionSpaceType::HessianRangeType | HessianRangeType |
type of hessian | |
typedef DiscreteFunctionSpaceType::DomainFieldType | DomainFieldType |
type of domain field (usually a float type) | |
typedef DiscreteFunctionSpaceType::RangeFieldType | RangeFieldType |
type of range field (usually a float type) | |
typedef Traits::DofIteratorType | DofIteratorType |
type of the dof iterator | |
typedef Traits::ConstDofIteratorType | ConstDofIteratorType |
type of the const dof iterator | |
typedef Traits::DofVectorType | DofVectorType |
type of DofVector | |
typedef Traits::LocalDofVectorType | LocalDofVectorType |
type of LocalDofVector | |
typedef Traits::LocalDofVectorAllocatorType | LocalDofVectorAllocatorType |
type of LocalDofVector | |
typedef BaseType::LocalFunctionType | LocalFunctionType |
type of local functions | |
typedef LocalFunctionType::LocalCoordinateType | LocalCoordinateType |
typedef BaseType::DofBlockType | DofBlockType |
typedef BaseType::ConstDofBlockType | ConstDofBlockType |
typedef BaseType::DofBlockPtrType | DofBlockPtrType |
typedef BaseType::ConstDofBlockPtrType | ConstDofBlockPtrType |
typedef BaseType::EntityType | EntityType |
typedef BaseType::DofType | DofType |
typedef DofVectorType::SizeType | SizeType |
size type of the block vector | |
typedef DiscreteFunctionSpaceType::FunctionSpaceType | FunctionSpaceType |
type of associated function space | |
typedef GridPartType::GridViewType | GridView |
typedef DiscreteFunctionSpaceType::GridType | GridType |
type of the underlying grid | |
typedef BaseType::MappingType | MappingType |
type of mapping base class for this discrete function | |
typedef DiscreteFunctionSpaceType::LocalBlockIndices | BlockIndices |
typedef LoadBalanceLeafData< ThisType > | DefaultLoadBalanceContainsCheckType |
Public Member Functions | |
ThisType & | operator= (ThisType &&)=delete |
ThisType & | operator= (const ThisType &)=delete |
const std::string & | name () const |
obtain the name of the discrete function | |
std::string & | name () |
obtain the name of the discrete function | |
constexpr int | order () const |
obtain an upper bound on the polynomial order of the underlying space. | |
bool | continuous () const |
returns true if the space contains only globally continuous functions | |
const DiscreteFunctionSpaceType & | space () const |
obtain a reference to the corresponding DiscreteFunctionSpace | |
const GridPartType & | gridPart () const |
obtain a reference to the underlying grid part | |
LocalFunctionType | localFunction (const EntityType &entity) |
obtain a local function for an entity (read-write) | |
const LocalFunctionType | localFunction (const EntityType &entity) const |
obtain a local function for an entity (read-write) | |
LocalFunctionType | localFunction () |
obtain an uninitialized local function (read-write) | |
const LocalFunctionType | localFunction () const |
obtain an uninitialized local function (read-write) | |
void | clear () |
set all degrees of freedom to zero | |
DofVectorType & | dofVector () |
const DofVectorType & | dofVector () const |
int | blocks () const |
obtain total number of blocks, i.e. size / blockSize. | |
DofBlockPtrType | block (unsigned int index) |
ConstDofBlockPtrType | block (unsigned int index) const |
SizeType | size () const |
Return the number of blocks in the block vector. | |
ConstDofIteratorType | dbegin () const |
Obtain the constant iterator pointing to the first dof. | |
DofIteratorType | dbegin () |
Obtain the non-constant iterator pointing to the first dof. | |
ConstDofIteratorType | dend () const |
Obtain the constant iterator pointing to the last dof. | |
DofIteratorType | dend () |
Obtain the non-constant iterator pointing to the last dof. | |
template<class DFType > | |
void | axpy (const RangeFieldType &s, const DiscreteFunctionInterface< DFType > &g) |
axpy operation | |
void | axpy (const RangeFieldType &s, const DiscreteFunctionInterfaceType &g) |
axpy operation | |
template<class DFType > | |
RangeFieldType | scalarProductDofs (const DiscreteFunctionInterface< DFType > &other) const |
Scalar product between the DoFs of two discrete functions. | |
Dune::FieldTraits< RangeFieldType >::real_type | normSquaredDofs () const |
Squared small l^2 norm of all dofs. | |
void | print (std ::ostream &out) const |
print all DoFs to a stream (for debugging purposes) | |
bool | dofsValid () const |
check for NaNs | |
template<class DFType > | |
void | assign (const DiscreteFunctionInterface< DFType > &g) |
void | assign (const DiscreteFunctionType &g) |
template<class Operation > | |
CommDataHandle< Operation >::Type | dataHandle (const Operation &operation) |
return reference to data handle object | |
void | communicate () |
do default communication of space for this discrete function | |
void | evaluate (const DomainType &x, RangeType &value) const |
void | jacobian (const DomainType &x, JacobianRangeType &jacobian) const |
void | hessian (const DomainType &x, HessianRangeType &hessian) const |
evaluate the hessian of the function (const DomainType &x,HessianRangeType &hessian) const | |
template<class DFType > | |
DiscreteFunctionType & | operator+= (const DiscreteFunctionInterface< DFType > &g) |
add another discrete function to this one | |
DiscreteFunctionType & | operator+= (const DiscreteFunctionType &g) |
add another discrete function to this one | |
template<class DFType > | |
DiscreteFunctionType & | operator-= (const DiscreteFunctionInterface< DFType > &g) |
substract all degrees of freedom from given discrete function using the dof iterators | |
DiscreteFunctionType & | operator-= (const DiscreteFunctionType &g) |
substract all degrees of freedom from given discrete function using the dof iterators | |
DiscreteFunctionType & | operator*= (const RangeFieldType &scalar) |
multiply all DoFs with a scalar factor | |
DiscreteFunctionType & | operator/= (const RangeFieldType &scalar) |
devide all DoFs by a scalar factor | |
template<class StreamTraits > | |
void | read (InStreamInterface< StreamTraits > &in) |
read the discrete function from a stream | |
template<class StreamTraits > | |
void | write (OutStreamInterface< StreamTraits > &out) const |
write the discrete function into a stream | |
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. | |
template<class LocalDofs > | |
void | addScaledLocalDofs (const EntityType &entity, const RangeFieldType &s, const LocalDofs &localDofs) |
add scaled local Dofs to dof vector associated with the entity | |
template<class LocalDofs > | |
void | addLocalDofs (const EntityType &entity, const LocalDofs &localDofs) |
add local Dofs to dof vector associated with the entity | |
template<class LocalDofs > | |
void | setLocalDofs (const EntityType &entity, const LocalDofs &localDofs) |
set local Dofs to dof vector associated with the entity | |
template<class Vector > | |
void | getLocalDofs (const EntityType &entity, Vector &localDofs) const |
fill local Dofs to dof vector associated with the entity | |
template<class DFType > | |
bool | compare (const DiscreteFunctionInterface< DFType > &g) const |
LocalDofVectorAllocatorType & | localDofVectorAllocator () const |
obtain the local function storage | |
template<class AssembleOperation > | |
void | beginAssemble () |
Initiate the assemble of values using the LocalContribution concept. | |
template<class AssembleOperation > | |
void | endAssemble () |
Finalize the assemble of values using the LocalContribution concept. | |
void | getLocalDofReferences (const EntityType &entity, LocalDofVectorType &localDofs) |
get local Dofs and store a reference to it in the LocalDofVector | |
template<class Operation > | |
DiscreteFunctionDefault< Impl >::template CommDataHandle< Operation >::Type | dataHandle (const Operation &operation) |
DefaultLoadBalanceContainsCheckType | defaultLoadBalanceContainsCheck () const |
void | operator() (const DomainType &arg, RangeType &dest) const |
Application operator that applies all operators in the linear combination stack. | |
Static Public Attributes | |
static constexpr std::size_t | blockSize |
size of the dof blocks | |
Protected Types | |
typedef ParallelScalarProduct< DiscreteFunctionInterfaceType > | ScalarProductType |
typedef TemporaryLocalFunction< DiscreteFunctionSpaceType > | TemporaryLocalFunctionType |
Protected Member Functions | |
DiscreteFunctionDefault (const std::string &name, const DiscreteFunctionSpaceType &dfSpace) | |
Constructor storing discrete function space and local function factory. | |
DiscreteFunctionDefault (std::string name, std::shared_ptr< const DiscreteFunctionSpaceType > dfSpace) | |
DiscreteFunctionDefault (const ThisType &) | |
DiscreteFunctionDefault (ThisType &&other) | |
virtual void | backup () const |
virtual void | restore () |
virtual void | insertSubData () |
virtual void | removeSubData () |
template<class Functor > | |
void | evaluateGlobal (const DomainType &x, Functor functor) const |
evaluate functor in global coordinate | |
const Implementation & | asImp () const |
Implementation & | asImp () |
virtual void * | pointer () |
Static Protected Member Functions | |
static const Implementation & | asImp (const ThisType &other) |
static Implementation & | asImp (ThisType &other) |
Protected Attributes | |
std::shared_ptr< const DiscreteFunctionSpaceType > | dfSpace_ |
Traits::LocalDofVectorStackType | ldvStack_ |
LocalDofVectorAllocatorType | ldvAllocator_ |
TemporaryLocalFunctionType | localFunction_ |
std::string | name_ |
ScalarProductType | scalarProduct_ |
std::type_index | assembleOperation_ = std::type_index( typeid( void ) ) |
std::size_t | assembleCount_ = 0 |
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 | |
template<class DFieldType , class RFieldType , class DType , class RType > | |
static Mapping< DFieldType, RFieldType, DType, RType > | operator+ (const Mapping< DFieldType, RFieldType, DType, RType > &a, const Mapping< DFieldType, RFieldType, DType, RType > &b) |
add two mappings | |
template<class DFieldType , class RFieldType , class DType , class RType > | |
static Mapping< DFieldType, RFieldType, DType, RType > | operator- (const Mapping< DFieldType, RFieldType, DType, RType > &a, const Mapping< DFieldType, RFieldType, DType, RType > &b) |
substract two mappings | |
template<class DFieldType , class RFieldType , class DType , class RType > | |
static Mapping< DFieldType, RFieldType, DType, RType > | operator* (const Mapping< DFieldType, RFieldType, DType, RType > &mapping, const RFieldType &factor) |
scale mapping with factor | |
template<class DFieldType , class RFieldType , class DType , class RType > | |
static Mapping< DFieldType, RFieldType, DType, RType > | operator* (const RFieldType &factor, const Mapping< DFieldType, RFieldType, DType, RType > &mapping) |
scale mapping with factor | |
template<class DFieldType , class RFieldType , class DType , class RType > | |
static Mapping< DFieldType, RFieldType, DType, RType > | operator/ (const Mapping< DFieldType, RFieldType, DType, RType > &mapping, const RFieldType &factor) |
operator / for mappings | |
template<class DFieldType , class RFieldType , class DType , class RType > | |
static Mapping< DFieldType, RFieldType, DType, RType > | operator/ (const RFieldType &factor, const Mapping< DFieldType, RFieldType, DType, RType > &mapping) |
operator / for mappings | |
Default implementation of the discrete function. This class is responsible for the dof storage. Different implementations of the discrete function use different dof storage. The default implementation provides +=, -= and so on operators and a DofIterator access, which can run over all dofs in an efficient way. Furthermore with an entity you can access a local function to evaluate the discrete function by multiplying the dofs and the basefunctions.
|
inherited |
typedef BaseType::ConstDofBlockPtrType Dune::Fem::DiscreteFunctionDefault< Impl >::ConstDofBlockPtrType |
typedef BaseType::ConstDofBlockType Dune::Fem::DiscreteFunctionDefault< Impl >::ConstDofBlockType |
typedef Traits::ConstDofIteratorType Dune::Fem::DiscreteFunctionDefault< Impl >::ConstDofIteratorType |
type of the const dof iterator
|
inherited |
typedef BaseType::DiscreteFunctionInterfaceType Dune::Fem::DiscreteFunctionDefault< Impl >::DiscreteFunctionInterfaceType |
typedef BaseType::DiscreteFunctionSpaceType Dune::Fem::DiscreteFunctionDefault< Impl >::DiscreteFunctionSpaceType |
type of discrete function space
typedef Impl Dune::Fem::DiscreteFunctionDefault< Impl >::DiscreteFunctionType |
type of the discrete function (Barton-Nackman parameter)
typedef BaseType::DofBlockPtrType Dune::Fem::DiscreteFunctionDefault< Impl >::DofBlockPtrType |
typedef BaseType::DofBlockType Dune::Fem::DiscreteFunctionDefault< Impl >::DofBlockType |
typedef Traits::DofIteratorType Dune::Fem::DiscreteFunctionDefault< Impl >::DofIteratorType |
type of the dof iterator
typedef BaseType::DofType Dune::Fem::DiscreteFunctionDefault< Impl >::DofType |
typedef Traits::DofVectorType Dune::Fem::DiscreteFunctionDefault< Impl >::DofVectorType |
type of DofVector
typedef DiscreteFunctionSpaceType::DomainFieldType Dune::Fem::DiscreteFunctionDefault< Impl >::DomainFieldType |
type of domain field (usually a float type)
typedef DiscreteFunctionSpaceType::DomainType Dune::Fem::DiscreteFunctionDefault< Impl >::DomainType |
type of domain vector
typedef BaseType::EntityType Dune::Fem::DiscreteFunctionDefault< Impl >::EntityType |
|
inherited |
type of associated function space
typedef BaseType::GridPartType Dune::Fem::DiscreteFunctionDefault< Impl >::GridPartType |
type of the underlying grid part
|
inherited |
type of the underlying grid
|
inherited |
typedef DiscreteFunctionSpaceType::HessianRangeType Dune::Fem::DiscreteFunctionDefault< Impl >::HessianRangeType |
type of hessian
typedef DiscreteFunctionSpaceType::JacobianRangeType Dune::Fem::DiscreteFunctionDefault< Impl >::JacobianRangeType |
type of jacobian
typedef LocalFunctionType::LocalCoordinateType Dune::Fem::DiscreteFunctionDefault< Impl >::LocalCoordinateType |
typedef Traits::LocalDofVectorAllocatorType Dune::Fem::DiscreteFunctionDefault< Impl >::LocalDofVectorAllocatorType |
type of LocalDofVector
typedef Traits::LocalDofVectorType Dune::Fem::DiscreteFunctionDefault< Impl >::LocalDofVectorType |
type of LocalDofVector
typedef BaseType::LocalFunctionType Dune::Fem::DiscreteFunctionDefault< Impl >::LocalFunctionType |
type of local functions
|
inherited |
type of mapping base class for this discrete function
typedef DiscreteFunctionSpaceType::RangeFieldType Dune::Fem::DiscreteFunctionDefault< Impl >::RangeFieldType |
type of range field (usually a float type)
typedef DiscreteFunctionSpaceType::RangeType Dune::Fem::DiscreteFunctionDefault< Impl >::RangeType |
type of range vector
|
protected |
typedef DofVectorType::SizeType Dune::Fem::DiscreteFunctionDefault< Impl >::SizeType |
size type of the block vector
|
protected |
typedef BaseType::Traits Dune::Fem::DiscreteFunctionDefault< Impl >::Traits |
|
inlineprotected |
Constructor storing discrete function space and local function factory.
The discrete function space is passed to the interface class and the local function storage is initialized.
[in] | name | name of the discrete function |
[in] | dfSpace | discrete function space |
[in] | lfFactory | local function factory |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
add local Dofs to dof vector associated with the entity
[in] | entity | Entity to focus view of discrete function |
[in] | localDofs | the local dofs vector to be added |
|
inline |
add scaled local Dofs to dof vector associated with the entity
[in] | entity | Entity to focus view of discrete function |
[in] | s | scaling factor |
[in] | localDofs | the local dofs vector to be added |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlinestaticprotectedinherited |
|
inlinestaticprotectedinherited |
|
inline |
|
inline |
|
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 |
axpy operation
Adds s * g to this discrete function.
[in] | s | scalar value to scale g with |
[in] | g | discrete function to add |
|
inlineprotectedvirtual |
Implements Dune::Fem::PersistentObject.
|
inline |
Initiate the assemble of values using the LocalContribution concept.
AssembleOperation | the specific operation (Add, Set, ...) |
|
inline |
|
inline |
|
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 |
|
inline |
returns true if the space contains only globally continuous functions
For example, a Lagrange space returns true while a discontiuous Galerkin space returns false.
CommDataHandle< Operation >::Type Dune::Fem::DiscreteFunctionDefault< Impl >::dataHandle | ( | const Operation & | operation | ) |
return reference to data handle object
|
inline |
|
inline |
Obtain the non-constant iterator pointing to the first dof.
|
inline |
Obtain the constant iterator pointing to the first dof.
|
inlineinherited |
|
inline |
Obtain the non-constant iterator pointing to the last dof.
|
inline |
Obtain the constant iterator pointing to the last dof.
|
inline |
check for NaNs
|
inline |
|
inline |
|
inline |
Enable this discrete function for dof compression, i.e. during grid changes a dof compression is done when the DofManagers compress is called.
|
inline |
Finalize the assemble of values using the LocalContribution concept.
AssembleOperation | the specific operation (Add, Set, ...) |
|
inline |
|
inlineprotected |
evaluate functor in global coordinate
|
inline |
get local Dofs and store a reference to it in the LocalDofVector
|
inline |
fill local Dofs to dof vector associated with the entity
[in] | entity | Entity to focus view of discrete function |
[out] | localDofs | the local dofs vector to be set |
|
inline |
obtain a reference to the underlying grid part
|
inline |
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 |
|
protectedvirtual |
Reimplemented from Dune::Fem::PersistentObject.
|
inline |
|
inline |
obtain the local function storage
|
inline |
obtain an uninitialized local function (read-write)
|
inline |
obtain an uninitialized local function (read-write)
|
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 |
obtain the name of the discrete function
|
inline |
Squared small l^2 norm of all dofs.
|
inlineinherited |
Application operator that applies all operators in the linear combination stack.
[in] | arg | argument |
[out] | dest | destination |
|
inline |
multiply all DoFs with a scalar factor
[in] | scalar | factor to multiply DoFs with |
|
inline |
add another discrete function to this one
[in] | g | discrete function to add |
|
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 |
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 with which all dofs are devided |
|
delete |
|
delete |
|
inlineconstexpr |
obtain an upper bound on the polynomial order of the underlying space.
|
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 |
|
protectedvirtual |
Reimplemented from Dune::Fem::PersistentObject.
|
inlineprotectedvirtual |
Implements Dune::Fem::PersistentObject.
|
inline |
Scalar product between the DoFs of two discrete functions.
[in] | other | discrete function to evaluate the scalar product with |
|
inline |
set local Dofs to dof vector associated with the entity
[in] | entity | Entity to focus view of discrete function |
[in] | localDofs | the local dofs vector to be set |
|
inline |
Return the number of blocks in the block vector.
|
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 |
|
related |
scale mapping with factor
[in] | mapping | Mapping which is scaled |
[in] | factor | factor with which mapping is scaled |
|
related |
scale mapping with factor
[in] | factor | factor with which mapping is scaled |
[in] | mapping | Mapping which is scaled |
|
related |
add two mappings
[in] | a | mapping 1 |
[in] | b | mapping 2 |
|
related |
substract two mappings
[in] | a | mapping 1 |
[in] | b | mapping 2 |
|
related |
operator / for mappings
[in] | mapping | mapping which is divided |
[in] | factor | f factor by which result of mapping is divided |
|
related |
operator / for mappings
[in] | factor | by which result of mapping is divided |
[in] | mapping | which is divided |
|
related |
write a discrete function into an STL stream
[in] | out | STL stream to write to |
[in] | df | discrete function to write |
|
protected |
|
protected |
|
staticconstexpr |
size of the dof blocks
|
protected |
|
mutableprotected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |