dune-fem 2.8.0
|
#include <dune/fem/function/common/discretefunction.hh>
Classes | |
struct | CommDataHandle |
Public Types | |
typedef DiscreteFunctionTraits< Impl > | Traits |
type of the traits | |
typedef Traits::DiscreteFunctionType | DiscreteFunctionType |
type of the implementaton (Barton-Nackman) | |
typedef Traits::DiscreteFunctionSpaceType | DiscreteFunctionSpaceType |
type of associated discrete function space | |
typedef DiscreteFunctionSpaceType::FunctionSpaceType | FunctionSpaceType |
type of associated function space | |
typedef DiscreteFunctionInterface< Impl > | DiscreteFunctionInterfaceType |
type of the discrete function interface (this type) | |
typedef DiscreteFunctionSpaceType::DomainFieldType | DomainFieldType |
type of domain field, i.e. type of coordinate component | |
typedef DiscreteFunctionSpaceType::RangeFieldType | RangeFieldType |
type of range field, i.e. dof type | |
typedef DiscreteFunctionSpaceType::DomainType | DomainType |
type of domain, i.e. type of coordinates | |
typedef DiscreteFunctionSpaceType::RangeType | RangeType |
type of range, i.e. result of evaluation | |
typedef DiscreteFunctionSpaceType::JacobianRangeType | JacobianRangeType |
type of jacobian, i.e. type of evaluated gradient | |
typedef DiscreteFunctionSpaceType::GridPartType | GridPartType |
type of the underlying grid part | |
typedef GridPartType::GridViewType | GridView |
typedef DiscreteFunctionSpaceType::GridType | GridType |
type of the underlying grid | |
typedef Traits::LocalFunctionType | LocalFunctionType |
type of local functions | |
typedef Traits::DofVectorType | DofVectorType |
type of the dof vector used in the discrete function implementation | |
typedef Traits::DofIteratorType | DofIteratorType |
type of the dof iterator used in the discrete function implementation | |
typedef Traits::ConstDofIteratorType | ConstDofIteratorType |
type of the constantdof iterator used in the discrete function implementation | |
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 | |
typedef DiscreteFunctionSpaceType::LocalBlockIndices | BlockIndices |
typedef DiscreteFunctionSpaceType::EntityType | EntityType |
type of entity local functions are defined on | |
typedef LoadBalanceLeafData< ThisType > | DefaultLoadBalanceContainsCheckType |
Public Member Functions | |
ThisType & | operator= (ThisType &&)=delete |
ThisType & | operator= (const ThisType &)=delete |
DofVectorType & | dofVector () |
const DofVectorType & | dofVector () const |
const std::string & | name () const |
obtain the name of the discrete function | |
std::string & | name () |
obtain the name of the discrete function | |
const std::string & | 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) | |
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 | |
const LocalFunctionType | localFunction () const |
obtain an uninitialized local function (read-write) | |
void | clear () |
set all degrees of freedom to zero | |
int | size () const |
obtain total number of DoFs | |
int | blocks () const |
obtain total number of blocks, i.e. size / blockSize. | |
ConstDofIteratorType | dbegin () const |
obtain an iterator pointing to the first DoF (read-only) | |
ConstDofIteratorType | dend () const |
obtain an iterator pointing behind the last DoF (read-only) | |
DofIteratorType | dbegin () |
obtain an iterator pointing to the first DoF (read-write) | |
DofIteratorType | dend () |
obtain an iterator pointing behind the last DoF (read-write) | |
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) |
assign the DoFs of another discrete function to this one | |
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 | |
template<class DFType > | |
bool | compare (const DiscreteFunctionInterface< DFType > &g) const |
template<class DFType > | |
DiscreteFunctionType & | operator+= (const DiscreteFunctionInterface< DFType > &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 RangeFieldType &scalar) |
multiply all DoFs by 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. | |
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 = Hybrid::size( BlockIndices() ) |
size of the dof blocks | |
Protected Member Functions | |
DiscreteFunctionInterface ()=default | |
default constructor | |
DiscreteFunctionInterface (const ThisType &)=default | |
DiscreteFunctionInterface (ThisType &&)=default | |
const Implementation & | asImp () const |
Implementation & | asImp () |
Static Protected Member Functions | |
static const Implementation & | asImp (const ThisType &other) |
static Implementation & | 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 | |
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 | |
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 DiscreteFunctionSpaceType::LocalBlockIndices Dune::Fem::DiscreteFunctionInterface< Impl >::BlockIndices |
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
typedef DiscreteFunctionSpaceType::FunctionSpaceType Dune::Fem::DiscreteFunctionInterface< Impl >::FunctionSpaceType |
type of associated function space
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
typedef GridPartType::GridViewType Dune::Fem::DiscreteFunctionInterface< Impl >::GridView |
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
|
protecteddefault |
default constructor
|
protecteddefault |
|
protecteddefault |
|
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 |
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 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.
|
inline |
return reference to data handle object
|
inline |
obtain an iterator pointing to the first DoF (read-write)
|
inline |
obtain an iterator pointing to the first DoF (read-only)
|
inline |
|
inline |
obtain an iterator pointing behind the last DoF (read-write)
|
inline |
obtain an iterator pointing behind the last DoF (read-only)
|
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 |
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 |
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 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 |
|
delete |
|
delete |
|
inline |
obtain an upper bound on the polynomial order of the underlying space.
|
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 |
|
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 |
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.
|
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 |
|
staticconstexpr |
size of the dof blocks