dune-fem 2.8.0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Related Functions | List of all members
Dune::Fem::DiscreteFunctionInterface< Impl > Class Template Reference

#include <dune/fem/function/common/discretefunction.hh>

Inheritance diagram for Dune::Fem::DiscreteFunctionInterface< Impl >:
Inheritance graph

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< ThisTypeDefaultLoadBalanceContainsCheckType
 

Public Member Functions

ThisTypeoperator= (ThisType &&)=delete
 
ThisTypeoperator= (const ThisType &)=delete
 
DofVectorTypedofVector ()
 
const DofVectorTypedofVector () 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 DiscreteFunctionSpaceTypespace () const
 obtain a reference to the corresponding DiscreteFunctionSpace
 
const GridPartTypegridPart () 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 >
DiscreteFunctionTypeoperator+= (const DiscreteFunctionInterface< DFType > &g)
 add another discrete function to this one
 
template<class DFType >
DiscreteFunctionTypeoperator-= (const DiscreteFunctionInterface< DFType > &g)
 substract all degrees of freedom from given discrete function using the dof iterators
 
DiscreteFunctionTypeoperator*= (const RangeFieldType &scalar)
 multiply all DoFs by a scalar factor
 
DiscreteFunctionTypeoperator/= (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
 

Detailed Description

template<class Impl>
class Dune::Fem::DiscreteFunctionInterface< Impl >

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.

An interface class:

Member Typedef Documentation

◆ BlockIndices

template<class Impl >
typedef DiscreteFunctionSpaceType::LocalBlockIndices Dune::Fem::DiscreteFunctionInterface< Impl >::BlockIndices

◆ ConstDofBlockPtrType

template<class Impl >
typedef Traits::ConstDofBlockPtrType Dune::Fem::DiscreteFunctionInterface< Impl >::ConstDofBlockPtrType

◆ ConstDofBlockType

template<class Impl >
typedef Traits::ConstDofBlockType Dune::Fem::DiscreteFunctionInterface< Impl >::ConstDofBlockType

◆ ConstDofIteratorType

template<class Impl >
typedef Traits::ConstDofIteratorType Dune::Fem::DiscreteFunctionInterface< Impl >::ConstDofIteratorType

type of the constantdof iterator used in the discrete function implementation

◆ DefaultLoadBalanceContainsCheckType

template<class Impl >
typedef LoadBalanceLeafData< ThisType > Dune::Fem::DiscreteFunctionInterface< Impl >::DefaultLoadBalanceContainsCheckType

◆ DiscreteFunctionInterfaceType

template<class Impl >
typedef DiscreteFunctionInterface< Impl > Dune::Fem::DiscreteFunctionInterface< Impl >::DiscreteFunctionInterfaceType

type of the discrete function interface (this type)

◆ DiscreteFunctionSpaceType

template<class Impl >
typedef Traits::DiscreteFunctionSpaceType Dune::Fem::DiscreteFunctionInterface< Impl >::DiscreteFunctionSpaceType

type of associated discrete function space

◆ DiscreteFunctionType

template<class Impl >
typedef Traits::DiscreteFunctionType Dune::Fem::DiscreteFunctionInterface< Impl >::DiscreteFunctionType

type of the implementaton (Barton-Nackman)

◆ DofBlockPtrType

template<class Impl >
typedef Traits::DofBlockPtrType Dune::Fem::DiscreteFunctionInterface< Impl >::DofBlockPtrType

◆ DofBlockType

template<class Impl >
typedef Traits::DofBlockType Dune::Fem::DiscreteFunctionInterface< Impl >::DofBlockType

◆ DofIteratorType

template<class Impl >
typedef Traits::DofIteratorType Dune::Fem::DiscreteFunctionInterface< Impl >::DofIteratorType

type of the dof iterator used in the discrete function implementation

◆ DofType

template<class Impl >
typedef Traits::DofType Dune::Fem::DiscreteFunctionInterface< Impl >::DofType

◆ DofVectorType

template<class Impl >
typedef Traits::DofVectorType Dune::Fem::DiscreteFunctionInterface< Impl >::DofVectorType

type of the dof vector used in the discrete function implementation

◆ DomainFieldType

template<class Impl >
typedef DiscreteFunctionSpaceType::DomainFieldType Dune::Fem::DiscreteFunctionInterface< Impl >::DomainFieldType

type of domain field, i.e. type of coordinate component

◆ DomainType

template<class Impl >
typedef DiscreteFunctionSpaceType::DomainType Dune::Fem::DiscreteFunctionInterface< Impl >::DomainType

type of domain, i.e. type of coordinates

◆ EntityType

template<class Impl >
typedef DiscreteFunctionSpaceType::EntityType Dune::Fem::DiscreteFunctionInterface< Impl >::EntityType

type of entity local functions are defined on

◆ FunctionSpaceType

template<class Impl >
typedef DiscreteFunctionSpaceType::FunctionSpaceType Dune::Fem::DiscreteFunctionInterface< Impl >::FunctionSpaceType

type of associated function space

◆ GridPartType

template<class Impl >
typedef DiscreteFunctionSpaceType::GridPartType Dune::Fem::DiscreteFunctionInterface< Impl >::GridPartType

type of the underlying grid part

◆ GridType

template<class Impl >
typedef DiscreteFunctionSpaceType::GridType Dune::Fem::DiscreteFunctionInterface< Impl >::GridType

type of the underlying grid

◆ GridView

template<class Impl >
typedef GridPartType::GridViewType Dune::Fem::DiscreteFunctionInterface< Impl >::GridView

◆ JacobianRangeType

template<class Impl >
typedef DiscreteFunctionSpaceType::JacobianRangeType Dune::Fem::DiscreteFunctionInterface< Impl >::JacobianRangeType

type of jacobian, i.e. type of evaluated gradient

◆ LocalFunctionType

template<class Impl >
typedef Traits::LocalFunctionType Dune::Fem::DiscreteFunctionInterface< Impl >::LocalFunctionType

type of local functions

◆ MappingType

template<class Impl >
typedef BaseType::MappingType Dune::Fem::DiscreteFunctionInterface< Impl >::MappingType

type of mapping base class for this discrete function

◆ RangeFieldType

template<class Impl >
typedef DiscreteFunctionSpaceType::RangeFieldType Dune::Fem::DiscreteFunctionInterface< Impl >::RangeFieldType

type of range field, i.e. dof type

◆ RangeType

template<class Impl >
typedef DiscreteFunctionSpaceType::RangeType Dune::Fem::DiscreteFunctionInterface< Impl >::RangeType

type of range, i.e. result of evaluation

◆ Traits

template<class Impl >
typedef DiscreteFunctionTraits< Impl > Dune::Fem::DiscreteFunctionInterface< Impl >::Traits

type of the traits

Constructor & Destructor Documentation

◆ DiscreteFunctionInterface() [1/3]

template<class Impl >
Dune::Fem::DiscreteFunctionInterface< Impl >::DiscreteFunctionInterface ( )
protecteddefault

default constructor

◆ DiscreteFunctionInterface() [2/3]

template<class Impl >
Dune::Fem::DiscreteFunctionInterface< Impl >::DiscreteFunctionInterface ( const ThisType )
protecteddefault

◆ DiscreteFunctionInterface() [3/3]

template<class Impl >
Dune::Fem::DiscreteFunctionInterface< Impl >::DiscreteFunctionInterface ( ThisType &&  )
protecteddefault

Member Function Documentation

◆ addLocalDofs()

template<class Impl >
template<class LocalDofs >
void Dune::Fem::DiscreteFunctionInterface< Impl >::addLocalDofs ( const EntityType entity,
const LocalDofs &  localDofs 
)
inline

add local Dofs to dof vector associated with the entity

Parameters
[in]entityEntity to focus view of discrete function
[in]localDofsthe local dofs vector to be added

◆ addScaledLocalDofs()

template<class Impl >
template<class LocalDofs >
void Dune::Fem::DiscreteFunctionInterface< Impl >::addScaledLocalDofs ( const EntityType entity,
const RangeFieldType s,
const LocalDofs &  localDofs 
)
inline

add scaled local Dofs to dof vector associated with the entity

Parameters
[in]entityEntity to focus view of discrete function
[in]sscaling factor
[in]localDofsthe local dofs vector to be added

◆ asImp() [1/4]

template<class Interface , class Implementation >
Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( )
inlineprotectedinherited

◆ asImp() [2/4]

template<class Interface , class Implementation >
const Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( ) const
inlineprotectedinherited

◆ asImp() [3/4]

template<class Interface , class Implementation >
static const Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( const ThisType other)
inlinestaticprotectedinherited

◆ asImp() [4/4]

template<class Interface , class Implementation >
static Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( ThisType other)
inlinestaticprotectedinherited

◆ assign()

template<class Impl >
template<class DFType >
void Dune::Fem::DiscreteFunctionInterface< Impl >::assign ( const DiscreteFunctionInterface< DFType > &  g)
inline

assign the DoFs of another discrete function to this one

Parameters
[in]gdiscrete function which is copied

◆ axpy()

template<class Impl >
void Dune::Fem::DiscreteFunctionInterface< Impl >::axpy ( const RangeFieldType s,
const DiscreteFunctionInterfaceType g 
)
inline

axpy operation

Adds s * g to this discrete function.

Parameters
[in]sscalar value to scale g with
[in]gdiscrete function to add

◆ blocks()

template<class Impl >
int Dune::Fem::DiscreteFunctionInterface< Impl >::blocks ( ) const
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.

Returns
total number of DoFs blocks

◆ clear()

template<class Impl >
void Dune::Fem::DiscreteFunctionInterface< Impl >::clear ( )
inline

set all degrees of freedom to zero

◆ communicate()

template<class Impl >
void Dune::Fem::DiscreteFunctionInterface< Impl >::communicate ( )
inline

do default communication of space for this discrete function

◆ compare()

template<class Impl >
template<class DFType >
bool Dune::Fem::DiscreteFunctionInterface< Impl >::compare ( const DiscreteFunctionInterface< DFType > &  g) const
inline

◆ continuous()

template<class Impl >
bool Dune::Fem::DiscreteFunctionInterface< Impl >::continuous ( ) const
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.

Returns
true if the space contians only globally continous functions, false otherwise

◆ dataHandle()

template<class Impl >
template<class Operation >
CommDataHandle< Operation >::Type Dune::Fem::DiscreteFunctionInterface< Impl >::dataHandle ( const Operation &  operation)
inline

return reference to data handle object

◆ dbegin() [1/2]

template<class Impl >
DofIteratorType Dune::Fem::DiscreteFunctionInterface< Impl >::dbegin ( )
inline

obtain an iterator pointing to the first DoF (read-write)

Returns
a DoF iterator pointing to first DoF (degre of freedom)

◆ dbegin() [2/2]

template<class Impl >
ConstDofIteratorType Dune::Fem::DiscreteFunctionInterface< Impl >::dbegin ( ) const
inline

obtain an iterator pointing to the first DoF (read-only)

Returns
a DoF iterator pointing to first DoF (degre of freedom)

◆ defaultLoadBalanceContainsCheck()

template<class Impl >
DefaultLoadBalanceContainsCheckType Dune::Fem::DiscreteFunctionInterface< Impl >::defaultLoadBalanceContainsCheck ( ) const
inline

◆ dend() [1/2]

template<class Impl >
DofIteratorType Dune::Fem::DiscreteFunctionInterface< Impl >::dend ( )
inline

obtain an iterator pointing behind the last DoF (read-write)

Returns
a DoF iterator pointing behind the last DoF (degree of freedom)

◆ dend() [2/2]

template<class Impl >
ConstDofIteratorType Dune::Fem::DiscreteFunctionInterface< Impl >::dend ( ) const
inline

obtain an iterator pointing behind the last DoF (read-only)

Returns
a DoF iterator pointing behind the last DoF (degree of freedom)

◆ dofsValid()

template<class Impl >
bool Dune::Fem::DiscreteFunctionInterface< Impl >::dofsValid ( ) const
inline

check for NaNs

Returns
if one of the DoFs is NaN false is returned, otherwise true

◆ dofVector() [1/2]

template<class Impl >
DofVectorType & Dune::Fem::DiscreteFunctionInterface< Impl >::dofVector ( )
inline

◆ dofVector() [2/2]

template<class Impl >
const DofVectorType & Dune::Fem::DiscreteFunctionInterface< Impl >::dofVector ( ) const
inline

◆ enableDofCompression()

template<class Impl >
void Dune::Fem::DiscreteFunctionInterface< Impl >::enableDofCompression ( )
inline

Enable this discrete function for dof compression, i.e. during grid changes a dof compression is done when the DofManagers compress is called.

◆ getLocalDofs()

template<class Impl >
template<class Vector >
void Dune::Fem::DiscreteFunctionInterface< Impl >::getLocalDofs ( const EntityType entity,
Vector &  localDofs 
) const
inline

fill local Dofs to dof vector associated with the entity

Parameters
[in]entityEntity to focus view of discrete function
[out]localDofsthe local dofs vector to be set
Note
localDofs should have sufficient size to store the dof values

◆ gridPart()

template<class Impl >
const GridPartType & Dune::Fem::DiscreteFunctionInterface< Impl >::gridPart ( ) const
inline

obtain a reference to the underlying grid part

◆ localFunction() [1/4]

template<class Impl >
LocalFunctionType Dune::Fem::DiscreteFunctionInterface< Impl >::localFunction ( )
inline

obtain an uninitialized local function (read-write)

Note
before calling any method of the local function initialize it passing an entity
Returns
an uninitialized local function

◆ localFunction() [2/4]

template<class Impl >
const LocalFunctionType Dune::Fem::DiscreteFunctionInterface< Impl >::localFunction ( ) const
inline

obtain an uninitialized local function (read-write)

Note
before calling any method of the local function initialize it passing an entity
Returns
an uninitialized local function

◆ localFunction() [3/4]

template<class Impl >
LocalFunctionType Dune::Fem::DiscreteFunctionInterface< Impl >::localFunction ( const EntityType entity)
inline

obtain a local function for an entity (read-write)

Parameters
[in]entityEntity to focus view of discrete function
Returns
a local function associated with the entity

◆ localFunction() [4/4]

template<class Impl >
const LocalFunctionType Dune::Fem::DiscreteFunctionInterface< Impl >::localFunction ( const EntityType entity) const
inline

obtain a local function for an entity (read-write)

Parameters
[in]entityEntity to focus view of discrete function
Returns
a local function associated with the entity

◆ name() [1/2]

template<class Impl >
std::string & Dune::Fem::DiscreteFunctionInterface< Impl >::name ( )
inline

obtain the name of the discrete function

Returns
string holding name of discrete function

◆ name() [2/2]

template<class Impl >
const std::string & Dune::Fem::DiscreteFunctionInterface< Impl >::name ( ) const
inline

obtain the name of the discrete function

Returns
string holding name of discrete function

◆ normSquaredDofs()

template<class Impl >
Dune::FieldTraits< RangeFieldType >::real_type Dune::Fem::DiscreteFunctionInterface< Impl >::normSquaredDofs ( ) const
inline

Squared small l^2 norm of all dofs.

Note
This is already parallel, so do not sum over all processes after calling scalarProductDofs!
It is assumed that the discrete function has been communicated (i.e., every local DoF hat the value of the corresponding global DoF).
Returns
the squared norm of the DoF-vectors

◆ operator()()

template<typename DFieldType , typename RFieldType , class DType , class RType >
void Dune::Fem::Mapping< DFieldType, RFieldType, DType, RType >::operator() ( const DomainType arg,
RangeType dest 
) const
inlineinherited

Application operator that applies all operators in the linear combination stack.

Parameters
[in]argargument
[out]destdestination

◆ operator*=()

template<class Impl >
DiscreteFunctionType & Dune::Fem::DiscreteFunctionInterface< Impl >::operator*= ( const RangeFieldType scalar)
inline

multiply all DoFs by a scalar factor

Parameters
[in]scalarfactor to muliply all DoFs by
Returns
a reference to this discrete function (i.e. *this)

◆ operator+=()

template<class Impl >
template<class DFType >
DiscreteFunctionType & Dune::Fem::DiscreteFunctionInterface< Impl >::operator+= ( const DiscreteFunctionInterface< DFType > &  g)
inline

add another discrete function to this one

Parameters
[in]gdiscrete function to add
Returns
a reference to this discrete function (i.e. *this)

◆ operator-=()

template<class Impl >
template<class DFType >
DiscreteFunctionType & Dune::Fem::DiscreteFunctionInterface< Impl >::operator-= ( const DiscreteFunctionInterface< DFType > &  g)
inline

substract all degrees of freedom from given discrete function using the dof iterators

Parameters
[in]gdiscrete function which is substracted from this discrete function
Returns
reference to this (i.e. *this)

◆ operator/=()

template<class Impl >
DiscreteFunctionType & Dune::Fem::DiscreteFunctionInterface< Impl >::operator/= ( const RangeFieldType scalar)
inline

devide all DoFs by a scalar factor

Parameters
[in]scalarfactor to divide all DoFs by
Returns
a reference to this discrete function (i.e. *this)

◆ operator=() [1/2]

template<class Impl >
ThisType & Dune::Fem::DiscreteFunctionInterface< Impl >::operator= ( const ThisType )
delete

◆ operator=() [2/2]

template<class Impl >
ThisType & Dune::Fem::DiscreteFunctionInterface< Impl >::operator= ( ThisType &&  )
delete

◆ order()

template<class Impl >
const std::string & Dune::Fem::DiscreteFunctionInterface< Impl >::order ( ) const
inline

obtain an upper bound on the polynomial order of the underlying space.

◆ print()

template<class Impl >
void Dune::Fem::DiscreteFunctionInterface< Impl >::print ( std ::ostream &  out) const
inline

print all DoFs to a stream (for debugging purposes)

Parameters
[in]outstream to print to

◆ read()

template<class Impl >
template<class StreamTraits >
void Dune::Fem::DiscreteFunctionInterface< Impl >::read ( InStreamInterface< StreamTraits > &  in)
inline

read the discrete function from a stream

Parameters
[in]instream to read the discrete function from
Note
This call will automatically enable dof compression for this discrete function.

◆ scalarProductDofs()

template<class Impl >
template<class DFType >
RangeFieldType Dune::Fem::DiscreteFunctionInterface< Impl >::scalarProductDofs ( const DiscreteFunctionInterface< DFType > &  other) const
inline

Scalar product between the DoFs of two discrete functions.

Note
This is a parallel scalar product, so do not sum over all processes after calling scalarProductDofs!
It is assumed that the discrete function has been communicated (i.e., every local DoF hat the value of the corresponding global DoF).
Parameters
[in]otherdiscrete function to evaluate the scalar product with
Returns
the scalar product of the DoF-vectors

◆ setLocalDofs()

template<class Impl >
template<class LocalDofs >
void Dune::Fem::DiscreteFunctionInterface< Impl >::setLocalDofs ( const EntityType entity,
const LocalDofs &  localDofs 
)
inline

set local Dofs to dof vector associated with the entity

Parameters
[in]entityEntity to focus view of discrete function
[in]localDofsthe local dofs vector to be set

◆ size()

template<class Impl >
int Dune::Fem::DiscreteFunctionInterface< Impl >::size ( ) const
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.

Returns
total number of DoFs for this discrete function

◆ space()

template<class Impl >
const DiscreteFunctionSpaceType & Dune::Fem::DiscreteFunctionInterface< Impl >::space ( ) const
inline

obtain a reference to the corresponding DiscreteFunctionSpace

◆ write()

template<class Impl >
template<class StreamTraits >
void Dune::Fem::DiscreteFunctionInterface< Impl >::write ( OutStreamInterface< StreamTraits > &  out) const
inline

write the discrete function into a stream

Parameters
[in]outstream to write the discrete function to

Friends And Related Function Documentation

◆ operator*() [1/2]

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 
)
related

scale mapping with factor

Parameters
[in]mappingMapping which is scaled
[in]factorfactor with which mapping is scaled
Returns
new object mapping

◆ operator*() [2/2]

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 
)
related

scale mapping with factor

Parameters
[in]factorfactor with which mapping is scaled
[in]mappingMapping which is scaled
Returns
new object mapping

◆ operator+()

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 
)
related

add two mappings

Parameters
[in]amapping 1
[in]bmapping 2
Returns
new object mapping

◆ operator-()

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 
)
related

substract two mappings

Parameters
[in]amapping 1
[in]bmapping 2
Returns
new object mapping

◆ operator/() [1/2]

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 
)
related

operator / for mappings

Parameters
[in]mappingmapping which is divided
[in]factorf factor by which result of mapping is divided
Returns
new object mapping

◆ operator/() [2/2]

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 
)
related

operator / for mappings

Parameters
[in]factorby which result of mapping is divided
[in]mappingwhich is divided
Returns
new object mapping

◆ operator<<()

template<class Impl >
std::ostream & operator<< ( std ::ostream &  out,
const DiscreteFunctionInterface< Impl > &  df 
)
related

write a discrete function into an STL stream

Parameters
[in]outSTL stream to write to
[in]dfdiscrete function to write
Returns
the STL stream (for concatenation)

Member Data Documentation

◆ blockSize

template<class Impl >
constexpr std::size_t Dune::Fem::DiscreteFunctionInterface< Impl >::blockSize = Hybrid::size( BlockIndices() )
staticconstexpr

size of the dof blocks


The documentation for this class was generated from the following files: