BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Types | Public Member Functions | Private Member Functions | List of all members
Fiber::CollectionOfShapesetTransformations< CoordinateType_ > Class Template Referenceabstract

Collection of shape function transformations. More...

#include </home/wojtek/Projects/BEM/bempp-sven/bempp/lib/fiber/collection_of_shapeset_transformations.hpp>

Inheritance diagram for Fiber::CollectionOfShapesetTransformations< CoordinateType_ >:
Fiber::CollectionOfBasisTransformations< CoordinateType_ >

Public Types

typedef CoordinateType_ CoordinateType
 
typedef ScalarTraits
< CoordinateType >
::ComplexType 
ComplexType
 

Public Member Functions

virtual ~CollectionOfShapesetTransformations ()
 Destructor.
 
virtual int transformationCount () const =0
 Return the number of transformations belonging to the collection.
 
virtual int argumentDimension () const =0
 Return the number of components of shape functions acted upon. More...
 
virtual int resultDimension (int i) const =0
 Return the number of components of the result of i'th transformation. More...
 
virtual void addDependencies (size_t &basisDeps, size_t &geomDeps) const =0
 Retrieve the types of data on which the transformations depend. More...
 
void evaluate (const BasisData< CoordinateType > &basisData, const GeometricalData< CoordinateType > &geomData, CollectionOf3dArrays< CoordinateType > &result) const
 Evaluate transformations of real-valued shape functions. More...
 
void evaluate (const BasisData< ComplexType > &basisData, const GeometricalData< CoordinateType > &geomData, CollectionOf3dArrays< ComplexType > &result) const
 Evaluate transformations of complex-valued shape functions. More...
 

Private Member Functions

virtual void evaluateImplReal (const BasisData< CoordinateType > &basisData, const GeometricalData< CoordinateType > &geomData, CollectionOf3dArrays< CoordinateType > &result) const =0
 Evaluate transformations of real-valued shape functions. More...
 
virtual void evaluateImplComplex (const BasisData< ComplexType > &basisData, const GeometricalData< CoordinateType > &geomData, CollectionOf3dArrays< ComplexType > &result) const =0
 Evaluate transformations of complex-valued shape functions. More...
 

Detailed Description

template<typename CoordinateType_>
class Fiber::CollectionOfShapesetTransformations< CoordinateType_ >

Collection of shape function transformations.

This class represents a collection of one or more shape function transformations. A shape function transformation is a function mapping a point $x$ located at an element of a grid to a scalar or vector of a fixed dimension, with real or complex elements. In addition to any geometrical data related to $x$, such as its global coordinates or the unit vectors normal to the grid at $x$, it can depend on the value and/or the first derivatives of a shape function defined on the reference element (e.g. the unit triangle or the unit square). Example shape function transformations include the mapping of shape functions to basis functions—expressed with the identity mapping for scalar shape functions or the Piola transform for vector shape function—and the mapping of shape functions to the surface curls of basis functions. All shape function transformations in a collection are evaluated together and hence may reuse results of any intermediate calculations.

A shape function transformation is assumed to preserve the type of the values of shape function, i.e. it should map real-valued shape functions to real-valued functions and complex-valued shape functions to complex-valued functions.

Template Parameters
CoordinateType_Type used to represent coordinates (either float or double).

Member Function Documentation

template<typename CoordinateType_>
virtual void Fiber::CollectionOfShapesetTransformations< CoordinateType_ >::addDependencies ( size_t &  basisDeps,
size_t &  geomDeps 
) const
pure virtual

Retrieve the types of data on which the transformations depend.

An implementation of this function should modify the basisDeps and geomDeps bitfields by adding to them, using the bitwise OR operation, an appropriate combination of the flags defined in the enums BasisDataType and GeometricalDataType.

For example, a collection of transformations depending on the values and first derivatives of shape functions and the global coordinates of points at which the transformed functions are evaluated should modify the arguments as follows:

basisDeps |= VALUES | DERIVATIVES;
geomDeps |= GLOBALS;

Implemented in Fiber::DefaultCollectionOfShapesetTransformations< Functor >.

Referenced by Bempp::GridFunction< BasisFunctionType, ResultType >::evaluate().

template<typename CoordinateType_>
virtual int Fiber::CollectionOfShapesetTransformations< CoordinateType_ >::argumentDimension ( ) const
pure virtual

Return the number of components of shape functions acted upon.

For instance, the implementation of this function for a collection of transformations operating on scalar shape functions should return 1; for a collection operating on vector-valued shape functions with three components, this function should return 3.

Implemented in Fiber::DefaultCollectionOfShapesetTransformations< Functor >.

template<typename CoordinateType_>
void Fiber::CollectionOfShapesetTransformations< CoordinateType_ >::evaluate ( const BasisData< CoordinateType > &  basisData,
const GeometricalData< CoordinateType > &  geomData,
CollectionOf3dArrays< CoordinateType > &  result 
) const
inline

Evaluate transformations of real-valued shape functions.

Parameters
[in]basisDataValues and/or derivatives of $m \geq 0 $ shape functions at $n \geq 0$ points on an element. The number of points, $n$, can be obtained by calling basisData.pointCount(); the number of shape functions, $m$, can be obtained by calling basisData.functionCount().
[in]geomDataGeometrical data related to the $n$ points at which the shape functions have been evaluated.
[out]resultA collection of 3-dimensional arrays intended to store the transformed shape function values. On output, result[i][(j, k, p) should contain the j element of the vector being the value of ith transformation of kth shape function at pth point.

An implementation of this function may assume that basisData and geomData contain all the types of data specified in the implementation of addDependencies(). Before filling the arrays from result, this function must ensure that size of the array collection and the dimensions of the individual arrays are correct, calling CollectionOf3dArrays::set_size() and _3dArray::set_size() if necessary.

Referenced by Bempp::GridFunction< BasisFunctionType, ResultType >::evaluate().

template<typename CoordinateType_>
void Fiber::CollectionOfShapesetTransformations< CoordinateType_ >::evaluate ( const BasisData< ComplexType > &  basisData,
const GeometricalData< CoordinateType > &  geomData,
CollectionOf3dArrays< ComplexType > &  result 
) const
inline

Evaluate transformations of complex-valued shape functions.

See the documentation of the other overload for the description of function parameters.

template<typename CoordinateType_>
virtual void Fiber::CollectionOfShapesetTransformations< CoordinateType_ >::evaluateImplComplex ( const BasisData< ComplexType > &  basisData,
const GeometricalData< CoordinateType > &  geomData,
CollectionOf3dArrays< ComplexType > &  result 
) const
privatepure virtual

Evaluate transformations of complex-valued shape functions.

See the documentation of evaluateImplReal() for the description of function parameters.

Referenced by Fiber::CollectionOfShapesetTransformations< CoordinateType >::evaluate().

template<typename CoordinateType_>
virtual void Fiber::CollectionOfShapesetTransformations< CoordinateType_ >::evaluateImplReal ( const BasisData< CoordinateType > &  basisData,
const GeometricalData< CoordinateType > &  geomData,
CollectionOf3dArrays< CoordinateType > &  result 
) const
privatepure virtual

Evaluate transformations of real-valued shape functions.

Parameters
[in]basisDataValues and/or derivatives of $m \geq 0 $ shape functions at $n \geq 0$ points on an element. The number of points, $n$, can be obtained by calling basisData.pointCount(); the number of shape functions, $m$, can be obtained by calling basisData.functionCount().
[in]geomDataGeometrical data related to the $n$ points at which the shape functions have been evaluated.
[out]resultA collection of 3-dimensional arrays intended to store the transformed shape function values. On output, result[i][(j, k, p) should contain the j element of the vector being the value of ith transformation of kth shape function at pth point.

This is a pure virtual function that must be overridden in subclasses of CollectionOfBasisTransformations.

An implementation of this function may assume that basisData and geomData contain all the types of data specified in the implementation of addDependencies(). Before filling the arrays from result, this function must ensure that size of the array collection and the dimensions of the individual arrays are correct, calling CollectionOf3dArrays::set_size() and _3dArray::set_size() if necessary.

Referenced by Fiber::CollectionOfShapesetTransformations< CoordinateType >::evaluate().

template<typename CoordinateType_>
virtual int Fiber::CollectionOfShapesetTransformations< CoordinateType_ >::resultDimension ( int  i) const
pure virtual

Return the number of components of the result of i'th transformation.

Transformation indices start from 0.

For example, if the first transformation produces a scalar function, the implementation of this function should return 1 if i == 0.

The behaviour of this function for i < 0 or >= transformationCount() is not specified.

Implemented in Fiber::DefaultCollectionOfShapesetTransformations< Functor >.

Referenced by Bempp::GridFunction< BasisFunctionType, ResultType >::evaluate().


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