QuadratureBase¶
-
class
QuadratureBase¶ Subclassed by QDummy, QGaussChebyshev1D, QGaussLegendre1D, QGaussLegendreTensorized, QLookupQuadrature, QMidpoint1D, QMidpointTensorized, QMidpointTensorized2D, QMonteCarlo, QProduct, QRectangular, QRectangular1D, QRectangular2D
Public Functions
-
QuadratureBase(Config *settings)¶ Constructor using settings class. This is the recommended constructor.
- Parameters
settings: Settings class storing all important options.
-
QuadratureBase(unsigned order)¶ Constructor using directly the order of the quadrature. Not applicable for GaussLegendre, that need additional options. It sets member _settings = nulltpr.
-
void
PrintWeights()¶ prints: Weight vector
-
void
PrintPoints()¶ prints: Point vectorVector
-
void
PrintPointsAndWeights()¶ prints: Point vectorVector with corresponding weight vector
-
double
SumUpWeights()¶ sums up all entries of the weight vector.
- Return
sum of all weights
-
double
Integrate(double (*f)(double, double, double))¶ Integrates f(x,y,z) with the quadrature.
- Return
result of the quadrature rule
- Parameters
f: density function that depends on a three spatial dimensions.
-
double
IntegrateSpherical(double (*f)(double, double))¶ Integrates f(x,y,z) with the quadrature.
- Return
result of the quadrature rule
- Parameters
f: density function that depends on a spherical coordinates.
-
std::vector<double>
Integrate(std::vector<double> (*f)(double, double, double), unsigned len, )¶ Integrates vector valued f(x,y,z) with the quadrature. Each dimension is integrated by itself.
- Return
result of the quadrature rule (vector valued)
- Parameters
f: density function that depends on a three spatial dimensions.len: lenght of vector
-
unsigned
GetOrder() const¶ - Return
std::string _name: name of the quadrature
-
unsigned
GetNq() const¶ - Return
unsigned _order: order of the quadrature
-
VectorVector
GetPoints() const¶ - Return
unsigned _nq: number of gridpoints of the quadrature
-
VectorVector
GetPointsSphere() const¶ - Return
VectorVector _points: coordinates of gridpoints of the quadrature
-
Vector
GetWeights() const¶ - Return
VectorVector _pointsSphere: “—- ” in spherical coordinates (my, phi)
-
VectorVectorU
GetConnectivity() const¶ Returns approved Dimensions for this quadrature.
- Return
Vector _weights: weights of gridpoints of the quadrature
- Return
VectorVectorU _connectivity: connectivity of gridpoints of the quadrature
-
std::vector<unsigned short>
GetSupportedDims() const¶ Scales the quadrature weights according to the intervall [-velocityScaling , velocityScaling] in 1D Scales the radius of the velocity sphere by velocityScaling in 2D and 3D.
Public Static Functions
-
QuadratureBase *
Create(Config *settings)¶ Creates a quadrature rule with a given name and a given order.
- Return
Quadrature* quadrature: returns pointer to instance of the given derived quadrature class
- Parameters
settings: Settings to handle quadrature options
-
QuadratureBase *
Create(QUAD_NAME name, unsigned quadOrder)¶ Creates a quadrature rule with a given name and a given order.
- Return
pointer to instance of the given derived quadrature class
- Parameters
name: name of quadrature as enumquadOrder: order of quadrature
Protected Functions
-
void
SetName() = 0¶ sets: order of the quadrature
Sets: name of the quadrature
-
void
SetNq() = 0¶ sets: number of gridpoints of the quadrature
-
void
SetConnectivity() = 0¶ sets: Connectivity Adjacency Matrix as VektorVektor
-
void
SetPointsAndWeights() = 0¶ Computes the a vector (length: nq) of (coordinates of) gridpoints used for the quadrature rule. Computes the a vector (length: nq) of weights for the gridpoints. The indices match the gridpoints VectorVector. Sets computed values for _points and _weights.
Protected Attributes
-
std::string
_name¶ name of the quadrature
-
unsigned
_order¶ order of the quadrature
-
unsigned
_nq¶ number of gridpoints of the quadrature
-
VectorVector
_pointsKarth¶ gridpoints of the quadrature
-
VectorVector
_pointsSphere¶ (my,phi,r)gridpoints of the quadrature in spherical cordinates
-
Vector
_weights¶ weights of the gridpoints of the quadrature
-
VectorVectorU
_connectivity¶ connectivity of the gripoints of the quadrature
-
std::vector<unsigned short>
_supportedDimensions¶ number of spatial dimensions, for which the quadrature is build
-