18#ifndef TRI_QUAD_BASE_H
19#define TRI_QUAD_BASE_H
32const uint8_t TRI_DEFAULT_ORDER = 4;
33const uint8_t TRI_MAX_ORDER = 30;
48 static_assert((
dim == 2 ||
dim == 3),
"`dim` must be 2 or 3.");
83 if (!points_weights_computed_)
84 throw std::runtime_error(
85 "TriangleQuadratureBase::points(): must call `compute_points_weights()` first.");
96 if (!points_weights_computed_)
97 throw std::runtime_error(
98 "TriangleQuadratureBase::weights(): must call `compute_points_weights()` first.");
107 uint8_t order_ = TRI_DEFAULT_ORDER;
108 bool points_weights_computed_ =
false;
Base class for quadrature over a triangle.
virtual void set_order(const uint8_t order)
Sets the quadrature order.
const EigMatNX< Float, dim > & points() const
Returns the points on which to evaluate the integrand.
const EigRowVec< Float > & weights() const
Returns the weights associated with the points on which the integrand is evaluated.
virtual void compute_points_weights(const Triangle< dim > &tri, std::function< EigRowVec< Complex >(ConstEigRef< EigMatNX< Float, dim > >)> eval={})=0
Computes and stores the points on which to evaluate the integrand, and the corresponding weights.
uint8_t order() const
Returns the quadrature order.
const Eigen::Ref< const EigObj > ConstEigRef
Read-only reference to an Eigen object.
Eigen::Matrix< T, N, 1 > EigColVecN
Fixed-size column vector of size N containing type T.
Primary namespace for the OpenBEM library.