Drake
Drake C++ Documentation
TriangleQuadrature< NumericReturnType, T > Class Template Reference

Detailed Description

template<typename NumericReturnType, typename T>
class drake::multibody::TriangleQuadrature< NumericReturnType, T >

A class for integrating a function using numerical quadrature over triangular domains.

Template Parameters
NumericReturnTypethe output type of the function being integrated. Commonly will be a IEEE floating point scalar (e.g., double), but could be an Eigen::VectorXd, a multibody::SpatialForce, 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&)).
Tthe scalar type of the function being integrated over. Supported types are currently only IEEE floating point scalars.

#include <drake/multibody/triangle_quadrature/triangle_quadrature.h>

Static Public Member Functions

static NumericReturnType Integrate (const std::function< NumericReturnType(const Vector2< T > &)> &f, const TriangleQuadratureRule &rule, const T &area)
 Numerically integrates the function f over a triangle using the given quadrature rule and the initial value. More...
 
static NumericReturnType Integrate (const std::function< NumericReturnType(const Vector3< T > &)> &f, const TriangleQuadratureRule &rule, const T &area)
 Alternative signature for Integrate() that uses three-dimensional barycentric coordinates. More...
 

Member Function Documentation

◆ Integrate() [1/2]

NumericReturnType Integrate ( const std::function< NumericReturnType(const Vector2< T > &)> &  f,
const TriangleQuadratureRule rule,
const T &  area 
)
static

Numerically integrates the function f over a triangle using the given quadrature rule and the initial value.

Parameters
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]).
areathe area of the triangle.

◆ Integrate() [2/2]

NumericReturnType Integrate ( const std::function< NumericReturnType(const Vector3< T > &)> &  f,
const TriangleQuadratureRule rule,
const T &  area 
)
static

Alternative signature for Integrate() that uses three-dimensional barycentric coordinates.

Parameters
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]).
areathe area of the triangle.

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