BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Types | Public Member Functions | List of all members
Bempp::PotentialOperator< BasisFunctionType_, ResultType_ > Class Template Referenceabstract

Potential operator. More...

#include </home/wojtek/Projects/BEM/bempp-sven/bempp/lib/assembly/potential_operator.hpp>

Inheritance diagram for Bempp::PotentialOperator< BasisFunctionType_, ResultType_ >:
Bempp::ElementaryPotentialOperator< BasisFunctionType_, KernelType_, ResultType_ > Bempp::ElementaryPotentialOperator< BasisFunctionType_, ScalarTraits< ResultType_ >::RealType, ResultType_ > Bempp::Laplace3dPotentialOperatorBase< Impl, BasisFunctionType_, ResultType_ > Bempp::Laplace3dPotentialOperatorBase< Laplace3dDoubleLayerPotentialOperatorImpl< BasisFunctionType_, ResultType_ >, BasisFunctionType_, ResultType_ > Bempp::Laplace3dPotentialOperatorBase< Laplace3dSingleLayerPotentialOperatorImpl< BasisFunctionType_, ResultType_ >, BasisFunctionType_, ResultType_ > Bempp::Laplace3dDoubleLayerPotentialOperator< BasisFunctionType_, ResultType_ > Bempp::Laplace3dSingleLayerPotentialOperator< BasisFunctionType_, ResultType_ >

Public Types

typedef BasisFunctionType_ BasisFunctionType
 Type of the values of the (components of the) basis functions into which functions acted upon by the operator are expanded.
 
typedef ResultType_ ResultType
 Type of the values of the (components of the) potential.
 
typedef ScalarTraits
< ResultType >::RealType 
CoordinateType
 Type used to represent coordinates.
 
typedef
Fiber::QuadratureStrategy
< BasisFunctionType,
ResultType, GeometryFactory
QuadratureStrategy
 Type of the appropriate instantiation of Fiber::QuadratureStrategy.
 

Public Member Functions

virtual ~PotentialOperator ()
 Destructor.
 
virtual std::auto_ptr
< InterpolatedFunction
< ResultType > > 
evaluateOnGrid (const GridFunction< BasisFunctionType, ResultType > &argument, const Grid &evaluationGrid, const QuadratureStrategy &quadStrategy, const EvaluationOptions &options) const =0
 Evaluate the potential of a given charge distribution on a prescribed grid. More...
 
virtual arma::Mat< ResultTypeevaluateAtPoints (const GridFunction< BasisFunctionType, ResultType > &argument, const arma::Mat< CoordinateType > &evaluationPoints, const QuadratureStrategy &quadStrategy, const EvaluationOptions &options) const =0
 Evaluate the potential of a given charge distribution at prescribed points. More...
 
virtual
AssembledPotentialOperator
< BasisFunctionType,
ResultType
assemble (const shared_ptr< const Space< BasisFunctionType > > &space, const shared_ptr< const arma::Mat< CoordinateType > > &evaluationPoints, const QuadratureStrategy &quadStrategy, const EvaluationOptions &options) const =0
 Create and return an AssembledPotentialOperator object. More...
 
virtual int componentCount () const =0
 Number of components of the values of the potential. More...
 

Detailed Description

template<typename BasisFunctionType_, typename ResultType_>
class Bempp::PotentialOperator< BasisFunctionType_, ResultType_ >

Potential operator.

This class represents a linear operator that, acting on a function $g$ defined on a surface $\Gamma$ embedded in a space $\Omega$ of dimension higher by one, produces a potential defined at any point of $\Omega$ lying outside $\Gamma$. The function $g$ is called the charge distribution.

The functions evaluateOnGrid() and evaluateAtPoints() can be used to evaluate the potential produced by a given charge distribution, represented with a GridFunction object, at specified points in $\Omega \setminus \Gamma$.

Template Parameters
BasisFunctionType_Type of the values of the (components of the) basis functions into which functions acted upon by the operator are expanded.
ResultType_Type of the values of the (components of the) potential.

Both template parameters can take the following values: float, double, std::complex<float> and std::complex<double>. Both types must have the same precision: for instance, mixing float with std::complex<double> is not allowed. If BasisFunctionType_ is set to a complex type, then ResultType_ must be set to the same type.

Member Function Documentation

template<typename BasisFunctionType_, typename ResultType_>
virtual AssembledPotentialOperator<BasisFunctionType, ResultType> Bempp::PotentialOperator< BasisFunctionType_, ResultType_ >::assemble ( const shared_ptr< const Space< BasisFunctionType > > &  space,
const shared_ptr< const arma::Mat< CoordinateType > > &  evaluationPoints,
const QuadratureStrategy quadStrategy,
const EvaluationOptions options 
) const
pure virtual

Create and return an AssembledPotentialOperator object.

The returned AssembledPotentialOperator object stores the values of the potentials generated at the points listed in the array evaluationPoints by the charge distributions equal to the individual basis functions of the space space. The object can afterwards be used to evaluate efficiently the potentials generated by multiple GridFunctions expanded in the space space.

Parameters
[in]spaceThe space whose basis functions will be taken as the charge distributions inducing the potentials to be evaluated.
[in]evaluationPoints2D array whose (i, j)th element is the ith coordinate of the jth point at which the potential should be evaluated. The first dimension of this array should be equal to space.grid().dimWorld().
[in]quadStrategyA QuadratureStrategy object controlling how the integrals will be evaluated.
[in]optionsEvaluation options. This parameter controls, notably, the format used to store the matrix of precalculated potential values: a dense matrix or an H-matrix.

Implemented in Bempp::ElementaryPotentialOperator< BasisFunctionType_, KernelType_, ResultType_ >, Bempp::ElementaryPotentialOperator< BasisFunctionType_, ScalarTraits< BasisFunctionType_ >::ComplexType, ScalarTraits< BasisFunctionType_ >::ComplexType >, and Bempp::ElementaryPotentialOperator< BasisFunctionType_, ScalarTraits< ResultType_ >::RealType, ResultType_ >.

template<typename BasisFunctionType_, typename ResultType_>
virtual int Bempp::PotentialOperator< BasisFunctionType_, ResultType_ >::componentCount ( ) const
pure virtual
template<typename BasisFunctionType_, typename ResultType_>
virtual arma::Mat<ResultType> Bempp::PotentialOperator< BasisFunctionType_, ResultType_ >::evaluateAtPoints ( const GridFunction< BasisFunctionType, ResultType > &  argument,
const arma::Mat< CoordinateType > &  evaluationPoints,
const QuadratureStrategy quadStrategy,
const EvaluationOptions options 
) const
pure virtual

Evaluate the potential of a given charge distribution at prescribed points.

Parameters
[in]argumentArgument of the potential operator ( $\psi(y)$ in the notation above), represented by a grid function.
[in]evaluationPoints2D array whose (i, j)th element is the ith coordinate of the jth point at which the potential should be evaluated. The first dimension of this array should be equal to argument.grid().dimWorld().
[in]quadStrategyA QuadratureStrategy object controlling how the integrals will be evaluated.
[in]optionsEvaluation options.
Returns
A 2D array whose (i, j)th element is the ith component of the potential at the jth point.
Note
This function is not designed to yield accurate values of the potential on the surface $\Gamma$ containing the charge distribution, i.e. argument.grid(), even if the potential has a unique extension from $\Omega \setminus \Gamma$ to $\Gamma$. Hence values of the potential at any points belonging to $\Gamma$ can be badly wrong.

The current implementation does not yet take special measures to prevent loss of accuracy near $\Gamma$, either. Users are advised to increase the quadrature accuracy for points lying in the vicinity of $\Gamma$.

Implemented in Bempp::ElementaryPotentialOperator< BasisFunctionType_, KernelType_, ResultType_ >, Bempp::ElementaryPotentialOperator< BasisFunctionType_, ScalarTraits< BasisFunctionType_ >::ComplexType, ScalarTraits< BasisFunctionType_ >::ComplexType >, and Bempp::ElementaryPotentialOperator< BasisFunctionType_, ScalarTraits< ResultType_ >::RealType, ResultType_ >.

template<typename BasisFunctionType_, typename ResultType_>
virtual std::auto_ptr<InterpolatedFunction<ResultType> > Bempp::PotentialOperator< BasisFunctionType_, ResultType_ >::evaluateOnGrid ( const GridFunction< BasisFunctionType, ResultType > &  argument,
const Grid evaluationGrid,
const QuadratureStrategy quadStrategy,
const EvaluationOptions options 
) const
pure virtual

Evaluate the potential of a given charge distribution on a prescribed grid.

Parameters
[in]argumentArgument of the potential operator ( $\psi(y)$ in the notation above), represented by a grid function.
[in]evaluationGridGrid at whose vertices the potential will be evaluated. The grid may have arbitrary dimension, but must be embedded in a world of the same dimension as argument.grid().
[in]quadStrategyA QuadratureStrategy object controlling how the integrals will be evaluated.
[in]optionsEvaluation options.
Returns
The potential represented by a function interpolated on the vertices of evaluationGrid.
Note
This function is not designed to yield accurate values of the potential on the surface $\Gamma$ containing the charge distribution, i.e. argument.grid(), even if the potential has a unique extension from $\Omega \setminus \Gamma$ to $\Gamma$. Hence values of the potential at any vertices of evaluationGrid that coincide with $\Gamma$ can be badly wrong.

The current implementation does not yet take special measures to prevent loss of accuracy near $\Gamma$, either. If in doubt, increase the quadrature accuracy.

Implemented in Bempp::ElementaryPotentialOperator< BasisFunctionType_, KernelType_, ResultType_ >, Bempp::ElementaryPotentialOperator< BasisFunctionType_, ScalarTraits< BasisFunctionType_ >::ComplexType, ScalarTraits< BasisFunctionType_ >::ComplexType >, and Bempp::ElementaryPotentialOperator< BasisFunctionType_, ScalarTraits< ResultType_ >::RealType, ResultType_ >.


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