BEM++
2.0
|
Collection of shape function transformations. More...
#include </home/wojtek/Projects/BEM/bempp-sven/bempp/lib/fiber/collection_of_shapeset_transformations.hpp>
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... | |
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 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
, such as its global coordinates or the unit vectors normal to the grid at
, 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.
CoordinateType_ | Type used to represent coordinates (either float or double ). |
|
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:
Implemented in Fiber::DefaultCollectionOfShapesetTransformations< Functor >.
Referenced by Bempp::GridFunction< BasisFunctionType, ResultType >::evaluate().
|
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 >.
|
inline |
Evaluate transformations of real-valued shape functions.
[in] | basisData | Values and/or derivatives of ![]() ![]() ![]() basisData.pointCount() ; the number of shape functions, ![]() basisData.functionCount() . |
[in] | geomData | Geometrical data related to the ![]() |
[out] | result | A 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().
|
inline |
Evaluate transformations of complex-valued shape functions.
See the documentation of the other overload for the description of function parameters.
|
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().
|
privatepure virtual |
Evaluate transformations of real-valued shape functions.
[in] | basisData | Values and/or derivatives of ![]() ![]() ![]() basisData.pointCount() ; the number of shape functions, ![]() basisData.functionCount() . |
[in] | geomData | Geometrical data related to the ![]() |
[out] | result | A 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().
|
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().