BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
Fiber::AccuracyOptionsEx Class Reference

New-style options controlling quadrature accuracy. More...

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

Public Member Functions

 AccuracyOptionsEx ()
 Constructor. More...
 
 AccuracyOptionsEx (const AccuracyOptions &oldStyleOpts)
 Constructor. More...
 
const QuadratureOptionssingleRegular () const
 Return the options controlling integration of regular functions on single elements.
 
const QuadratureOptionssingleRegular (double normalizedDistance) const
 Return the options controlling integration, on single elements, of functions that have singularities outside these elements. More...
 
void setSingleRegular (int accuracyOrder, bool relativeToDefault=true)
 Set the options controlling integration of functions on single elements. More...
 
void setSingleRegular (double maxNormalizedDistance1, int accuracyOrder1, int accuracyOrder2, bool relativeToDefault=true)
 Set the options controlling integration of functions on single elements. More...
 
void setSingleRegular (double maxNormalizedDistance1, int accuracyOrder1, double maxNormalizedDistance2, int accuracyOrder2, int accuracyOrder3, bool relativeToDefault=true)
 Set the options controlling integration of functions on single elements. More...
 
void setSingleRegular (double maxNormalizedDistance1, int accuracyOrder1, double maxNormalizedDistance2, int accuracyOrder2, double maxNormalizedDistance3, int accuracyOrder3, int accuracyOrder4, bool relativeToDefault=true)
 Set the options controlling integration of functions on single elements. More...
 
void setSingleRegular (double maxNormalizedDistance1, int accuracyOrder1, double maxNormalizedDistance2, int accuracyOrder2, double maxNormalizedDistance3, int accuracyOrder3, double maxNormalizedDistance4, int accuracyOrder4, int accuracyOrder5, bool relativeToDefault=true)
 Set the options controlling integration of functions on single elements. More...
 
void setSingleRegular (const std::vector< double > &maxNormalizedDistances, const std::vector< int > &accuracyOrders, bool relativeToDefault=true)
 
const QuadratureOptionsdoubleRegular (double normalizedDistance) const
 Return the options controlling integration of regular functions on pairs of elements. More...
 
void setDoubleRegular (int accuracyOrder, bool relativeToDefault=true)
 Set the options controlling integration of regular functions on pairs of elements. More...
 
void setDoubleRegular (double maxNormalizedDistance1, int accuracyOrder1, int accuracyOrder2, bool relativeToDefault=true)
 Set the options controlling integration of regular functions on pairs of elements. More...
 
void setDoubleRegular (double maxNormalizedDistance1, int accuracyOrder1, double maxNormalizedDistance2, int accuracyOrder2, int accuracyOrder3, bool relativeToDefault=true)
 Set the options controlling integration of regular functions on pairs of elements. More...
 
void setDoubleRegular (double maxNormalizedDistance1, int accuracyOrder1, double maxNormalizedDistance2, int accuracyOrder2, double maxNormalizedDistance3, int accuracyOrder3, int accuracyOrder4, bool relativeToDefault=true)
 Set the options controlling integration of regular functions on pairs of elements. More...
 
void setDoubleRegular (double maxNormalizedDistance1, int accuracyOrder1, double maxNormalizedDistance2, int accuracyOrder2, double maxNormalizedDistance3, int accuracyOrder3, double maxNormalizedDistance4, int accuracyOrder4, int accuracyOrder5, bool relativeToDefault=true)
 Set the options controlling integration of regular functions on pairs of elements. More...
 
void setDoubleRegular (const std::vector< double > &maxNormalizedDistances, const std::vector< int > &accuracyOrders, bool relativeToDefault=true)
 
const QuadratureOptionsdoubleSingular () const
 Return the options controlling integration of singular functions on pairs of elements.
 
void setDoubleSingular (int accuracyOrder, bool relativeToDefault=true)
 Set the options controlling integration of singular functions on pairs of elements. More...
 

Detailed Description

New-style options controlling quadrature accuracy.

Constructor & Destructor Documentation

Fiber::AccuracyOptionsEx::AccuracyOptionsEx ( )

Constructor.

Create an AccuracyOptionsEx object representing default quadrature accuracy settings.

Fiber::AccuracyOptionsEx::AccuracyOptionsEx ( const AccuracyOptions oldStyleOpts)

Constructor.

Convert an old-style AccuracyOptions object to an equivalent new-style AccuracyOptionsEx object.

Note
This constructor is non-explicit on purpose (to allow an implicit conversion from an old-style to a new-style options object).

References Fiber::AccuracyOptions::doubleRegular, Fiber::AccuracyOptions::doubleSingular, and Fiber::AccuracyOptions::singleRegular.

Member Function Documentation

const QuadratureOptions & Fiber::AccuracyOptionsEx::doubleRegular ( double  normalizedDistance) const

Return the options controlling integration of regular functions on pairs of elements.

The quadrature rule used to approximate this class of integrals may depend on the distance between the two the elements. To retrieve the quadrature rule that should be used to integrate a function defined on a given pair of elements, set normalizedDistance to the distance between the centres of the elements divided by the size of the larger of the two elements.

void Fiber::AccuracyOptionsEx::setDoubleRegular ( int  accuracyOrder,
bool  relativeToDefault = true 
)

Set the options controlling integration of regular functions on pairs of elements.

Use this overload of setDoubleRegular() to specify that the order of accuracy o of the quadrature rule used to approximate integrals of regular functions on pairs of elements (or its increase $\Delta o$ over the default level if relativeToDefault is set to true) should be set to accuracyOrder, regardless of the distance between the two elements.

void Fiber::AccuracyOptionsEx::setDoubleRegular ( double  maxNormalizedDistance1,
int  accuracyOrder1,
int  accuracyOrder2,
bool  relativeToDefault = true 
)

Set the options controlling integration of regular functions on pairs of elements.

Use this overload of setDoubleRegular() to specify that the order of accuracy o of the quadrature rule used to approximate integrals of regular functions on pairs of elements (or its increase $\Delta o$ over the default level if relativeToDefault is set to true) should be chosen as follows, depending on the normalized distance d of the two elements:

  • if d <= maxNormalizedDistance1:
    • set o or $\Delta o$ to accuracyOrder1
  • else:
    • set o or $\Delta o$ to accuracyOrder2.

The normalized distance d is the distance between the centres of the two elements divided by the size of the larger of the elements.

void Fiber::AccuracyOptionsEx::setDoubleRegular ( double  maxNormalizedDistance1,
int  accuracyOrder1,
double  maxNormalizedDistance2,
int  accuracyOrder2,
int  accuracyOrder3,
bool  relativeToDefault = true 
)

Set the options controlling integration of regular functions on pairs of elements.

Use this overload of setDoubleRegular() to specify that the order of accuracy o of the quadrature rule used to approximate integrals of regular functions on pairs of elements (or its increase $\Delta o$ over the default level if relativeToDefault is set to true) should be chosen as follows, depending on the normalized distance d of the two elements:

  • if d <= maxNormalizedDistance1:
    • set o or $\Delta o$ to accuracyOrder1
  • if d <= maxNormalizedDistance2:
    • set o or $\Delta o$ to accuracyOrder2
  • else:
    • set o or $\Delta o$ to accuracyOrder3.

The normalized distance d is the distance between the centres of the two elements divided by the size of the larger of the elements.

void Fiber::AccuracyOptionsEx::setDoubleRegular ( double  maxNormalizedDistance1,
int  accuracyOrder1,
double  maxNormalizedDistance2,
int  accuracyOrder2,
double  maxNormalizedDistance3,
int  accuracyOrder3,
int  accuracyOrder4,
bool  relativeToDefault = true 
)

Set the options controlling integration of regular functions on pairs of elements.

Use this overload of setDoubleRegular() to specify that the order of accuracy o of the quadrature rule used to approximate integrals of regular functions on pairs of elements (or its increase $\Delta o$ over the default level if relativeToDefault is set to true) should be chosen as follows, depending on the normalized distance d of the two elements:

  • if d <= maxNormalizedDistance1:
    • set o or $\Delta o$ to accuracyOrder1
  • if d <= maxNormalizedDistance2:
    • set o or $\Delta o$ to accuracyOrder2
  • if d <= maxNormalizedDistance3:
    • set o or $\Delta o$ to accuracyOrder3
  • else:
    • set o or $\Delta o$ to accuracyOrder4.

The normalized distance d is the distance between the centres of the two elements divided by the size of the larger of the elements.

void Fiber::AccuracyOptionsEx::setDoubleRegular ( double  maxNormalizedDistance1,
int  accuracyOrder1,
double  maxNormalizedDistance2,
int  accuracyOrder2,
double  maxNormalizedDistance3,
int  accuracyOrder3,
double  maxNormalizedDistance4,
int  accuracyOrder4,
int  accuracyOrder5,
bool  relativeToDefault = true 
)

Set the options controlling integration of regular functions on pairs of elements.

Use this overload of setDoubleRegular() to specify that the order of accuracy o of the quadrature rule used to approximate integrals of regular functions on pairs of elements (or its increase $\Delta o$ over the default level if relativeToDefault is set to true) should be chosen as follows, depending on the normalized distance d of the two elements:

  • if d <= maxNormalizedDistance1:
    • set o or $\Delta o$ to accuracyOrder1
  • if d <= maxNormalizedDistance2:
    • set o or $\Delta o$ to accuracyOrder2
  • if d <= maxNormalizedDistance3:
    • set o or $\Delta o$ to accuracyOrder3
  • if d <= maxNormalizedDistance4:
    • set o or $\Delta o$ to accuracyOrder4
  • else:
    • set o or $\Delta o$ to accuracyOrder5.

The normalized distance d is the distance between the centres of the two elements divided by the size of the larger of the elements.

void Fiber::AccuracyOptionsEx::setDoubleSingular ( int  accuracyOrder,
bool  relativeToDefault = true 
)

Set the options controlling integration of singular functions on pairs of elements.

If relativeToDefault is set to false, accuracyOrder denotes the desired order of accuracy of the quadrature rule used to approximate integrals of singular functions on pairs of elements. Otherwise, accuracyOrder denotes the desired increase of the order of accuracy above the default level.

void Fiber::AccuracyOptionsEx::setSingleRegular ( int  accuracyOrder,
bool  relativeToDefault = true 
)

Set the options controlling integration of functions on single elements.

Use this overload of setSingleRegular() to specify that the order of accuracy o of the quadrature rule used to approximate integrals of functions on single elements (or its increase $\Delta o$ over the default level if relativeToDefault is set to true) should be set to accuracyOrder, regardless of whether the integrated function has a singularity near the element or not.

void Fiber::AccuracyOptionsEx::setSingleRegular ( double  maxNormalizedDistance1,
int  accuracyOrder1,
int  accuracyOrder2,
bool  relativeToDefault = true 
)

Set the options controlling integration of functions on single elements.

Use this overload of setSingleRegular() to specify that the order of accuracy o of the quadrature rule used to approximate integrals of functions on single elements (or its increase $\Delta o$ over the default level if relativeToDefault is set to true) should be chosen as follows, depending on the estimated normalized distance d of the element to the nearest singularity of the function being integrated:

  • if d <= maxNormalizedDistance1:
    • set o or $\Delta o$ to accuracyOrder1
  • else:
    • set o or $\Delta o$ to accuracyOrder2.

The normalized distance d is defined in the documentation of the singleRegular() method.

void Fiber::AccuracyOptionsEx::setSingleRegular ( double  maxNormalizedDistance1,
int  accuracyOrder1,
double  maxNormalizedDistance2,
int  accuracyOrder2,
int  accuracyOrder3,
bool  relativeToDefault = true 
)

Set the options controlling integration of functions on single elements.

Use this overload of setSingleRegular() to specify that the order of accuracy o of the quadrature rule used to approximate integrals of functions on single elements (or its increase $\Delta o$ over the default level if relativeToDefault is set to true) should be chosen as follows, depending on the estimated normalized distance d of the element to the nearest singularity of the function being integrated:

  • if d <= maxNormalizedDistance1:
    • set o or $\Delta o$ to accuracyOrder1
  • if d <= maxNormalizedDistance2:
    • set o or $\Delta o$ to accuracyOrder2
  • else:
    • set o or $\Delta o$ to accuracyOrder3.

The normalized distance d is defined in the documentation of the singleRegular() method.

void Fiber::AccuracyOptionsEx::setSingleRegular ( double  maxNormalizedDistance1,
int  accuracyOrder1,
double  maxNormalizedDistance2,
int  accuracyOrder2,
double  maxNormalizedDistance3,
int  accuracyOrder3,
int  accuracyOrder4,
bool  relativeToDefault = true 
)

Set the options controlling integration of functions on single elements.

Use this overload of setSingleRegular() to specify that the order of accuracy o of the quadrature rule used to approximate integrals of functions on single elements (or its increase $\Delta o$ over the default level if relativeToDefault is set to true) should be chosen as follows, depending on the estimated normalized distance d of the element to the nearest singularity of the function being integrated:

  • if d <= maxNormalizedDistance1:
    • set o or $\Delta o$ to accuracyOrder1
  • if d <= maxNormalizedDistance2:
    • set o or $\Delta o$ to accuracyOrder2
  • if d <= maxNormalizedDistance3:
    • set o or $\Delta o$ to accuracyOrder3
  • else:
    • set o or $\Delta o$ to accuracyOrder4.

The normalized distance d is defined in the documentation of the singleRegular() method.

void Fiber::AccuracyOptionsEx::setSingleRegular ( double  maxNormalizedDistance1,
int  accuracyOrder1,
double  maxNormalizedDistance2,
int  accuracyOrder2,
double  maxNormalizedDistance3,
int  accuracyOrder3,
double  maxNormalizedDistance4,
int  accuracyOrder4,
int  accuracyOrder5,
bool  relativeToDefault = true 
)

Set the options controlling integration of functions on single elements.

Use this overload of setSingleRegular() to specify that the order of accuracy o of the quadrature rule used to approximate integrals of functions on single elements (or its increase $\Delta o$ over the default level if relativeToDefault is set to true) should be chosen as follows, depending on the estimated normalized distance d of the element to the nearest singularity of the function being integrated:

  • if d <= maxNormalizedDistance1:
    • set o or $\Delta o$ to accuracyOrder1
  • if d <= maxNormalizedDistance2:
    • set o or $\Delta o$ to accuracyOrder2
  • if d <= maxNormalizedDistance3:
    • set o or $\Delta o$ to accuracyOrder3
  • if d <= maxNormalizedDistance4:
    • set o or $\Delta o$ to accuracyOrder4
  • else:
    • set o or $\Delta o$ to accuracyOrder5.

The normalized distance d is defined in the documentation of the singleRegular() method.

const QuadratureOptions & Fiber::AccuracyOptionsEx::singleRegular ( double  normalizedDistance) const

Return the options controlling integration, on single elements, of functions that have singularities outside these elements.

This function is called, in particular, to determine the quadrature order used in the approximation of integrals of the form

\[ \int_E G(x, y) f(y) \, \mathrm{d}(y), \]

where $E$ is an element, $f(y)$ a regular function and $G(x, y)$ a function singular at $x = y$. The normalizedDistance argument should be set to an estimate of the minimum distance between the point $x$ and the element $E$, divided by the size of $E$ i.e. $\min_{y \in E} \lvert x - y \rvert / \lvert E\rvert$.


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