dune-fem 2.8.0
|
#include <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 |
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 LocalFunctionType::LocalCoordinateType | LocalCoordinateType |
typedef BaseType::DofBlockType | DofBlockType |
typedef BaseType::ConstDofBlockType | ConstDofBlockType |
typedef BaseType::EntityType | EntityType |
typedef DofVectorType::SizeType | SizeType |
size type of the block vector More... | |
typedef DiscreteFunctionSpaceType::FunctionSpaceType | FunctionSpaceType |
type of associated function space More... | |
typedef GridPartType::GridViewType | GridView |
typedef BaseType::MappingType | MappingType |
type of mapping base class for this discrete function More... | |
typedef DiscreteFunctionSpaceType::LocalBlockIndices | BlockIndices |
typedef LoadBalanceLeafData< ThisType > | DefaultLoadBalanceContainsCheckType |
Public Member Functions | |
CombinedDiscreteFunction (const ContainedDiscreteFunctionType &func) | |
Constructor. More... | |
CombinedDiscreteFunction (const std::string &name, const ContainedDiscreteFunctionSpaceType &spc) | |
CombinedDiscreteFunction (const std::string &name, const DiscreteFunctionSpaceType &spc) | |
CombinedDiscreteFunction (const ThisType &other) | |
~CombinedDiscreteFunction () | |
Destructor. More... | |
CombinedDiscreteFunction ()=delete | |
ThisType & | operator= (const ThisType &)=delete |
ThisType & | operator= (ThisType &&)=delete |
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 |
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... | |
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 GridPartType & | gridPart () const |
obtain a reference to the underlying grid part More... | |
LocalFunctionType | localFunction (const EntityType &entity) |
const LocalFunctionType | localFunction (const EntityType &entity) const |
LocalFunctionType | localFunction () |
obtain an uninitialized local function (read-write) More... | |
const LocalFunctionType | localFunction () const |
obtain an uninitialized local function (read-write) More... | |
DofVectorType & | dofVector () |
const DofVectorType & | dofVector () const |
int | blocks () const |
obtain total number of blocks, i.e. size / blockSize. More... | |
void | axpy (const RangeFieldType &s, const DiscreteFunctionInterface< DFType > &g) |
void | axpy (const RangeFieldType &s, const DiscreteFunctionInterfaceType &g) |
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... | |
DiscreteFunctionDefault< CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N > >::template CommDataHandle< Operation >::Type | dataHandle (const Operation &operation) |
void | communicate () |
do default communication of space for this discrete function More... | |
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 More... | |
DiscreteFunctionType & | operator+= (const DiscreteFunctionInterface< DFType > &g) |
DiscreteFunctionType & | operator-= (const DiscreteFunctionInterface< DFType > &g) |
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... | |
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... | |
bool | compare (const DiscreteFunctionInterface< DFType > &g) const |
LocalDofVectorAllocatorType & | localDofVectorAllocator () const |
obtain the local function storage More... | |
void | beginAssemble () |
Initiate the assemble of values using the LocalContribution concept. More... | |
void | endAssemble () |
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 More... | |
DefaultLoadBalanceContainsCheckType | defaultLoadBalanceContainsCheck () const |
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 More... | |
Protected Types | |
typedef ParallelScalarProduct< DiscreteFunctionInterfaceType > | ScalarProductType |
typedef TemporaryLocalFunction< DiscreteFunctionSpaceType > | TemporaryLocalFunctionType |
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 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_ |
LocalDofVectorAllocatorType | ldvAllocator_ |
TemporaryLocalFunctionType | localFunction_ |
std::string | name_ |
ScalarProductType | scalarProduct_ |
std::type_index | assembleOperation_ |
std::size_t | assembleCount_ |
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... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
A class for combining N discrete function of the same type to a vector valued function
|
inherited |
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 associated function space
typedef BaseType::GridPartType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::GridPartType |
GridPart implementation.
typedef BaseType::GridType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::GridType |
Grid implementation.
|
inherited |
|
inherited |
type of hessian
|
inherited |
type of jacobian
|
inherited |
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.
|
protectedinherited |
|
inherited |
size type of the block vector
typedef ContainedDiscreteFunctionSpaceType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::SubDiscreteFunctionSpaceType |
typedef ContainedDiscreteFunctionType Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::SubDiscreteFunctionType |
|
protectedinherited |
typedef DiscreteFunctionTraits< ThisType > Dune::Fem::CombinedDiscreteFunction< ContainedDiscreteFunctionImp, N >::Traits |
Traits class with all necessary type definitions.
|
inline |
Constructor.
|
inline |
|
inline |
|
inline |
Copy constructor The copy constructor copies the dofs
|
inline |
Destructor.
|
delete |
|
inlineinherited |
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 |
|
inlineinherited |
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 |
|
inlineinherited |
|
inline |
|
inlineinherited |
|
inlineinherited |
axpy operation
Adds s * g to this discrete function.
[in] | s | scalar value to scale g with |
[in] | g | discrete function to add |
|
inlineinherited |
|
inline |
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 |
Initiate the assemble of values using the LocalContribution concept.
AssembleOperation | the specific operation (Add, Set, ...) |
|
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
|
inlineinherited |
|
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.
|
inherited |
return reference to data handle object
|
inlineinherited |
|
inline |
obtain an iterator pointing to the first DoF (read-write)
|
inline |
obtain an iterator pointing to the first DoF (read-only)
|
inlineinherited |
|
inline |
obtain an iterator pointing behind the last DoF (read-write)
|
inline |
obtain an iterator pointing behind the last DoF (read-only)
|
inline |
|
inline |
|
inline |
check for NaNs
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Enable this discrete function for dof compression, i.e. during grid changes a dof compression is done when the DofManagers compress is called.
|
inlineinherited |
Finalize the assemble of values using the LocalContribution concept.
AssembleOperation | the specific operation (Add, Set, ...) |
|
inlineinherited |
|
inlineprotectedinherited |
evaluate functor in global coordinate
|
inlineinherited |
get local Dofs and store a reference to it in the LocalDofVector
|
inlineinherited |
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 |
|
inlineinherited |
obtain a reference to the underlying grid part
|
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 |
|
inlineinherited |
obtain the local function storage
|
inlineinherited |
obtain an uninitialized local function (read-write)
|
inlineinherited |
obtain an uninitialized local function (read-write)
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
obtain the name of the discrete function
|
inlineinherited |
obtain the name of the discrete function
|
inlineinherited |
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 by a scalar factor
[in] | scalar | factor to muliply all DoFs by |
|
inlineinherited |
add another discrete function to this one
[in] | g | discrete function to add |
|
inline |
|
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 |
|
inline |
|
inline |
multiply all DoFs by a scalar factor
[in] | scalar | factor to muliply all DoFs by |
|
delete |
|
delete |
|
inlineconstexprinherited |
obtain an upper bound on the polynomial order of the underlying space.
|
inlineprotectedvirtualinherited |
Reimplemented in Dune::Fem::PersistenceManager::WrapObject< ObjectType, false >.
|
inline |
|
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.
|
inlineinherited |
Scalar product between the DoFs of two discrete functions.
[in] | other | discrete function to evaluate the scalar product with |
|
inline |
|
inlineinherited |
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 |
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 |
|
inline |
|
inline |
|
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 |
|
protectedinherited |
|
protectedinherited |
|
staticconstexprinherited |
size of the dof blocks
|
protectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
protectedinherited |
|
protectedinherited |