Description
Gauss-Legendre quadrature in 1D, 2D, or 3D.
This class provides methods to integrate a function (the integrand) on a domain using the Gauss quadrature. This method is most useful for polynomial integrands, in which case the result is exact if the order of quadrature is greater or equal to the degree of the polynomial.
#include <ChQuadrature.h>
Static Public Member Functions | |
template<class T > | |
static void | Integrate1D (T &result, ChIntegrand1D< T > &integrand, const double x_min, const double x_max, const int order) |
Integrate the integrand T = f(x) over the 1D interval [xA, xB], with specified order of quadrature. More... | |
template<class T > | |
static void | Integrate2D (T &result, ChIntegrand2D< T > &integrand, const double x_min, const double x_max, const double y_min, const double y_max, const int order) |
Integrate the integrand T = f(x,y) over the 2D interval [xA, xB][yA, yB], with desired order of quadrature. More... | |
template<class T > | |
static void | Integrate3D (T &result, ChIntegrand3D< T > &integrand, const double x_min, const double x_max, const double y_min, const double y_max, const double z_min, const double z_max, const int order) |
Integrate the integrand T = f(x,y,z) over the 3D interval [xA, xB][yA, yB][zA, zB], with desired order of quadrature. More... | |
template<class T > | |
static void | Integrate2Dtriangle (T &result, ChIntegrand2D< T > &integrand, const int order) |
Integrate the 2D integrand T = f(u,v) over a triangle, with desired order of quadrature. More... | |
template<class T > | |
static void | Integrate3Dtetrahedron (T &result, ChIntegrand3D< T > &integrand, const int order) |
Integrate the 3D integrand T = f(u,v,w) over a tetrahedron, with desired order of quadrature. More... | |
static ChQuadratureTables * | GetStaticTables () |
Access a statically-allocated set of tables, from 0 to 10th order, with precomputed tables. | |
static ChQuadratureTablesTriangle * | GetStaticTablesTriangle () |
Access a statically-allocated set of tables for tetrahedron quadrature, with 5 precomputed tables. | |
static ChQuadratureTablesTetrahedron * | GetStaticTablesTetrahedron () |
Access a statically-allocated set of tables for tetrahedron quadrature, with 5 precomputed tables. More... | |
Member Function Documentation
◆ GetStaticTablesTetrahedron()
|
static |
Access a statically-allocated set of tables for tetrahedron quadrature, with 5 precomputed tables.
Use Dunavant theory.
◆ Integrate1D()
|
inlinestatic |
Integrate the integrand T = f(x) over the 1D interval [xA, xB], with specified order of quadrature.
Best if integrand is polynomial. For order in 1..10, precomputed polynomial coefficients are used.
- Parameters
-
result result is returned here integrand this is the integrand x_min min limit for x domain x_max min limit for x domain order order of integration
◆ Integrate2D()
|
inlinestatic |
Integrate the integrand T = f(x,y) over the 2D interval [xA, xB][yA, yB], with desired order of quadrature.
Best if integrand is polynomial. For order in 1..10, precomputed polynomial coefficients are used.
- Parameters
-
result result is returned here integrand this is the integrand x_min min limit for x domain x_max min limit for x domain y_min min limit for y domain y_max min limit for y domain order order of integration
◆ Integrate2Dtriangle()
|
inlinestatic |
Integrate the 2D integrand T = f(u,v) over a triangle, with desired order of quadrature.
Best if integrand is polynomial. Two triangle coordinates are assumed to be 'area' coordinates u and v in [0...1], with the 3rd assumed to be 1-u-v. For order between 1 and 5, use precomputed polynomial coefficients.
- Parameters
-
result result is returned here integrand this is the integrand order order of integration
◆ Integrate3D()
|
inlinestatic |
Integrate the integrand T = f(x,y,z) over the 3D interval [xA, xB][yA, yB][zA, zB], with desired order of quadrature.
Best if integrand is polynomial. For order in 1..10, precomputed polynomial coefficients are used.
- Parameters
-
result result is returned here integrand this is the integrand x_min min limit for x domain x_max min limit for x domain y_min min limit for y domain y_max min limit for y domain z_min min limit for z domain z_max min limit for z domain order order of integration
◆ Integrate3Dtetrahedron()
|
inlinestatic |
Integrate the 3D integrand T = f(u,v,w) over a tetrahedron, with desired order of quadrature.
Best if integrand is polynomial. Three tetrahedron coordinates are assumed to be 'volume' coordinates u, v, and w in [0...1], with the 4th assumed to be1-u-v-w. For order between 1 and 5 use precomputed polynomial coefficients.
- Parameters
-
result result is returned here integrand this is the integrand order order of integration
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/core/ChQuadrature.h
- /builds/uwsbel/chrono/src/chrono/core/ChQuadrature.cpp