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

Default implementation of a collection of shape function transformations. More...

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

Inheritance diagram for Fiber::DefaultCollectionOfShapesetTransformations< Functor >:
Fiber::CollectionOfBasisTransformations< Functor::CoordinateType > Fiber::CollectionOfShapesetTransformations< Functor::CoordinateType > Fiber::DefaultCollectionOfBasisTransformations< Functor >

Public Types

typedef Base::CoordinateType CoordinateType
 
typedef Base::ComplexType ComplexType
 
- Public Types inherited from Fiber::CollectionOfShapesetTransformations< Functor::CoordinateType >
typedef Functor::CoordinateType CoordinateType
 
typedef ScalarTraits
< CoordinateType >
::ComplexType 
ComplexType
 

Public Member Functions

 DefaultCollectionOfShapesetTransformations (const Functor &functor)
 
virtual int transformationCount () const
 Return the number of transformations belonging to the collection.
 
virtual int argumentDimension () const
 Return the number of components of shape functions acted upon. More...
 
virtual int resultDimension (int transformationIndex) const
 Return the number of components of the result of i'th transformation. More...
 
virtual void addDependencies (size_t &basisDeps, size_t &geomDeps) const
 Retrieve the types of data on which the transformations depend. More...
 
- Public Member Functions inherited from Fiber::CollectionOfShapesetTransformations< Functor::CoordinateType >
virtual ~CollectionOfShapesetTransformations ()
 Destructor.
 
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 Types

typedef
CollectionOfBasisTransformations
< typename
Functor::CoordinateType > 
Base
 

Private Member Functions

template<typename ValueType >
void evaluateImpl (const BasisData< ValueType > &basisData, const GeometricalData< CoordinateType > &geomData, CollectionOf3dArrays< ValueType > &result) const
 
virtual void evaluateImplReal (const BasisData< CoordinateType > &basisData, const GeometricalData< CoordinateType > &geomData, CollectionOf3dArrays< CoordinateType > &result) const
 
virtual void evaluateImplComplex (const BasisData< ComplexType > &basisData, const GeometricalData< CoordinateType > &geomData, CollectionOf3dArrays< ComplexType > &result) const
 

Private Attributes

Functor m_functor
 

Detailed Description

template<typename Functor>
class Fiber::DefaultCollectionOfShapesetTransformations< Functor >

Default implementation of a collection of shape function transformations.

This class implements the interface defined by CollectionOfShapesetTransformations using a functor object to evaluate the transformations at specific points.

Template Parameters
FunctorType of the functor that will be passed to the constructor and used to evaluate a number of shape function transformations at individual points.

The Functor class should provide the following interface:

class TransformationCollectionFunctor
{
public:
typedef ... CoordinateType; // should be either float or double
// Return the number of transformations in the collection
int transformationCount() const;
// Return the dimension of vectors being the values of the shape
// functions to be transformed
int argumentDimension() const;
// Return the dimension of vectors produced by i'th transformation
int resultDimension(int i) const;
// Specify types of data required by the transformations (see the
// documentation of CollectionOfShapesetTransformations::addDependencies()
// for details)
void addDependencies(size_t& basisDeps, size_t& geomDeps) const;
// Evaluate the transformation of a shape function whose values and/or
// derivatives are provided in the basisData argument, at the point
// whose geometrical data are provided in the geomData argument. The
// j'th component of the vector being the value of i'th transformation
// of the shape function should be written to result[i](j).
// This function should accept ValueType equal to either
// CoordinateType or std::complex<CoordinateType>
template <typename ValueType>
void evaluate(
const ConstBasisDataSlice<ValueType>& basisData,
const ConstGeometricalDataSlice<CoordinateType>& geomData,
CollectionOf1dSlicesOf3dArrays<ValueType>& result) const;
};

Member Function Documentation

template<typename Functor >
void Fiber::DefaultCollectionOfShapesetTransformations< Functor >::addDependencies ( size_t &  basisDeps,
size_t &  geomDeps 
) const
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;

Implements Fiber::CollectionOfShapesetTransformations< Functor::CoordinateType >.

template<typename Functor >
int Fiber::DefaultCollectionOfShapesetTransformations< Functor >::argumentDimension ( ) const
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.

Implements Fiber::CollectionOfShapesetTransformations< Functor::CoordinateType >.

template<typename Functor >
int Fiber::DefaultCollectionOfShapesetTransformations< Functor >::resultDimension ( int  i) const
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.

Implements Fiber::CollectionOfShapesetTransformations< Functor::CoordinateType >.


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