OpenMD 3.1
Molecular Dynamics in the Open
|
A class for integrating a function using numerical quadrature over triangular domains. More...
#include <TriangleQuadrature.hpp>
Static Public Member Functions | |
static NumericReturnType | Integrate (const std::function< NumericReturnType(const Vector< T, 2 > &)> &f, const TriangleQuadratureRule &rule, const T &area) |
Numerically integrates the function f over a triangle using the given quadrature rule and the initial value. | |
static NumericReturnType | Integrate (const std::function< NumericReturnType(const Vector< T, 3 > &)> &f, const TriangleQuadratureRule &rule, const T &area) |
Alternative signature for Integrate() that uses three-dimensional barycentric coordinates. | |
A class for integrating a function using numerical quadrature over triangular domains.
NumericReturnType | the output type of the function being integrated. Commonly will be a IEEE floating point scalar (e.g., double ), but could be a VectorXd, or any other numeric type that supports both scalar multiplication (i.e., operator*(const NumericReturnType&, double) and addition with another of the same type (i.e., operator+(const NumericReturnType&, const
NumericReturnType&)). |
T | the scalar type of the function being integrated over. Supported types are currently only IEEE floating point scalars. |
Definition at line 35 of file TriangleQuadrature.hpp.
|
static |
Numerically integrates the function f over a triangle using the given quadrature rule and the initial value.
f(p) | a function that returns a numerical value for point p in the domain of the triangle, specified in barycentric coordinates. The barycentric coordinates are given by (p[0], p[1], 1 - p[0] - p[1]). |
area | the area of the triangle. |
Definition at line 61 of file TriangleQuadrature.hpp.
References OpenMD::TriangleQuadratureRule::quadrature_points(), and OpenMD::TriangleQuadratureRule::weights().
|
static |
Alternative signature for Integrate() that uses three-dimensional barycentric coordinates.
f(p) | a function that returns a numerical value for point p in the domain of the triangle, specified in barycentric coordinates. The barycentric coordinates are given by (p[0], p[1], p[2]). |
area | the area of the triangle. |
Definition at line 88 of file TriangleQuadrature.hpp.