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

Collection of kernels. More...

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

Public Types

typedef ValueType_ ValueType
 
typedef ScalarTraits
< ValueType >::RealType 
CoordinateType
 

Public Member Functions

virtual ~CollectionOfKernels ()
 Destructor.
 
virtual void addGeometricalDependencies (size_t &testGeomDeps, size_t &trialGeomDeps) const =0
 Retrieve types of geometrical data on which the kernels depend. More...
 
virtual void evaluateAtPointPairs (const GeometricalData< CoordinateType > &testGeomData, const GeometricalData< CoordinateType > &trialGeomData, CollectionOf3dArrays< ValueType > &result) const =0
 Evaluate the kernels at a list of (test point, trial point) pairs. More...
 
virtual void evaluateOnGrid (const GeometricalData< CoordinateType > &testGeomData, const GeometricalData< CoordinateType > &trialGeomData, CollectionOf4dArrays< ValueType > &result) const =0
 Evaluate the kernels on a tensor grid of test and trial points. More...
 
virtual std::pair< const char
*, int > 
evaluateClCode () const
 Currently unused.
 
virtual CoordinateType estimateRelativeScale (CoordinateType distance) const =0
 

Detailed Description

template<typename ValueType_>
class Fiber::CollectionOfKernels< ValueType_ >

Collection of kernels.

This class represents a collection of one or more integral operator kernels. A kernel is a function mapping a pair of points $(x, y)$ located on two, possibly identical, elements of a grid to a scalar, vector or tensor of a fixed dimension, with real or complex elements. It can depend on any geometrical data related to $x$ and $y$—not only their global coordinates, but also the unit vectors normal to the grid at these points or the Jacobian matrices. All kernels in a collection are evaluated together and hence may reuse results of any intermediate calculations.

Template Parameters
ValueType_Type used to represent the values of kernels (or the values of their components, in case or vector- or tensor-valued kernels). May be one of: float, double, std::complex<float> or std::complex<double>.

Member Function Documentation

template<typename ValueType_>
virtual void Fiber::CollectionOfKernels< ValueType_ >::addGeometricalDependencies ( size_t &  testGeomDeps,
size_t &  trialGeomDeps 
) const
pure virtual

Retrieve types of geometrical data on which the kernels depend.

An implementation of this function for a particular kernel collection should modify the testGeomDeps and trialGeomDeps bitfields by adding to them, using the bitwise OR operation, an appropriate combination of the flags defined in the enum GeometricalDataType.

For example, a collection of kernels depending on the global coordinates of test and trial points and on the orientation of the vector normal to the trial element at trial points should modify the arguments as follows:

testGeomDeps |= GLOBALS;
trialGeomDeps |= GLOBALS | NORMALS;

Implemented in Fiber::DefaultCollectionOfKernels< Functor >.

template<typename ValueType_>
virtual void Fiber::CollectionOfKernels< ValueType_ >::evaluateAtPointPairs ( const GeometricalData< CoordinateType > &  testGeomData,
const GeometricalData< CoordinateType > &  trialGeomData,
CollectionOf3dArrays< ValueType > &  result 
) const
pure virtual

Evaluate the kernels at a list of (test point, trial point) pairs.

Parameters
[in]testGeomDataGeometrical data related to $n \geq 0$ points on the test element. The number of points, $n$, can be obtained by calling testGeomData.pointCount().
[in]trialGeomDataGeometrical data related to $n \geq 0$ points on the trial element. The number of test and trial points should be the same.
[out]resultA collection of 3-dimensional arrays intended to store the kernel values. On output, result[i][(j, k, p) should contain the (j, k)th entry in the tensor being the value of ith kernel at pth test point and pth trial point.

An implementation of this function may assume that testGeomData and trialGeomData contain all the types of geometrical data specified in the implementation of addGeometricalDependencies(). 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.

template<typename ValueType_>
virtual void Fiber::CollectionOfKernels< ValueType_ >::evaluateOnGrid ( const GeometricalData< CoordinateType > &  testGeomData,
const GeometricalData< CoordinateType > &  trialGeomData,
CollectionOf4dArrays< ValueType > &  result 
) const
pure virtual

Evaluate the kernels on a tensor grid of test and trial points.

Parameters
[in]testGeomDataGeometrical data related to $m \geq 0$ points on the test element. The number of points, $m$, can be obtained by calling testGeomData.pointCount().
[in]trialGeomDataGeometrical data related to $n \geq 0$ points on the trial element. The number of points, $n$, can be obtained by calling trialGeomData.pointCount().
[out]resultA collection of 4-dimensional arrays intended to store the kernel values. On output, result[i][(j, k, p, q) should contain the (j, k)th entry in the tensor being the value of ith kernel at pth test point and qth trial point.

An implementation of this function may assume that testGeomData and trialGeomData contain all the types of geometrical data specified in the implementation of addGeometricalDependencies(). 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 CollectionOf4dArrays::set_size() and _4dArray::set_size() if necessary.


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