DUNE-FEM (unstable)

Dune::Fem::Mapping< DFieldType, RFieldType, DType, RType > Class Template Reference

A mapping from one vector space into another This class describes a general mapping from the domain vector space into the range vector space. It can also be used to construct linear combinations of mappings. More...

#include <dune/fem/operator/common/mapping.hh>

Public Types

typedef DType DomainType
 domain vector space (for usage in derived classes) This can either be for example a discrete function (in case of operators) or a FieldVector (in case of discrete functions)
 
typedef RType RangeType
 range vector space (for usage in derived classes) This can either be for example a discrete function (in case of operators) or a FieldVector (in case of discrete functions)
 
typedef DFieldType DomainFieldType
 type of field the domain vector space, i.e. double
 
typedef RFieldType RangeFieldType
 type of field the range vector space, i.e. double
 

Public Member Functions

 Mapping ()
 create Mappiung with empty linear combination
 
virtual ~Mapping ()
 delete linear combination if necessary
 
MappingTypeoperator= (const MappingType &mapping)
 assignment of mapping mapping More...
 
void operator() (const DomainType &arg, RangeType &dest) const
 Application operator that applies all operators in the linear combination stack. More...
 

Protected Types

typedef Mapping< DFieldType, RFieldType, DType, RType > MappingType
 type of mapping
 

Related Functions

(Note that these are not member functions.)

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

Detailed Description

template<typename DFieldType, typename RFieldType, class DType, class RType>
class Dune::Fem::Mapping< DFieldType, RFieldType, DType, RType >

A mapping from one vector space into another This class describes a general mapping from the domain vector space into the range vector space. It can also be used to construct linear combinations of mappings.

This two-sided character has the following consequence: when you address an object of type mapping or any of its descendants through a reference or pointer of type Mapping, the linear combination defined for that mapping is evaluated. On the other hand, if you address through a reference of the type of any of its descendants (notably Operator and Function), you'll get the functionality specific for that type.

Note
The Domain type and Range type must have operator *=, operator +=, and operator -= (e.g. FieldVector and DiscreteFunction fit that interface).

Member Function Documentation

◆ 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
inline

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

Parameters
[in]argargument
[out]destdestination

Referenced by Dune::Operator< DFieldType, RFieldType, DType, RType >::apply().

◆ operator=()

template<typename DFieldType , typename RFieldType , class DType , class RType >
MappingType& Dune::Fem::Mapping< DFieldType, RFieldType, DType, RType >::operator= ( const MappingType mapping)
inline

assignment of mapping mapping

Parameters
[in]mappingwhich is copied
Returns
reference to mapping

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

References Dune::Fem::MappingOperators::multiplyMapping().

◆ 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

References Dune::Fem::MappingOperators::multiplyMapping().

◆ 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

References Dune::Fem::MappingOperators::addMappings().

◆ 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

References Dune::Fem::MappingOperators::substractMappings().

◆ 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

References Dune::Fem::MappingOperators::divideMapping().

◆ 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

References Dune::Fem::MappingOperators::divideMapping().


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (May 1, 22:29, 2024)