18#ifndef ITER_GAUSS_TRI_QUAD_H
19#define ITER_GAUSS_TRI_QUAD_H
32const Float ITER_GAUSS_TRI_DEFAULT_TOL = 1
e-3;
130 if (!base::points_weights_computed_)
131 throw std::runtime_error(
132 "IterativeGaussTriangleQuadrature::converged(): must call `compute_points_weights()` first.");
143 if (!base::points_weights_computed_)
144 throw std::runtime_error(
145 "IterativeGaussTriangleQuadrature::converged_order(): must call `compute_points_weights()` first.");
146 return converged_order_;
152 bool converged_ =
false;
155 uint16_t max_iters_ = TRI_MAX_ORDER;
156 Float tol_ = ITER_GAUSS_TRI_DEFAULT_TOL;
Class for iterative Gaussian quadrature over a triangle.
bool converged() const
Checks whether the iterations converged.
void compute_points_weights(const Triangle< dim > &tri, std::function< EigRowVec< Complex >(ConstEigRef< EigMatNX< Float, dim > >)> eval={}) override
Computes and stores the points on which to evaluate the integrand, and the corresponding weights.
uint8_t converged_order() const
Returns the quadrature order at which the iterations converged.
void set_starting_order(const uint8_t starting_order)
Sets the quadrature order at which iterations should start.
uint8_t starting_order() const
Returns the quadrature order at which iterations start.
uint16_t max_iters() const
Returns the maximum number of iterations allowed even if not converged.
Float tol() const
Returns the relative convergence tolerance defining when iterations should stop.
void set_tol(const Float tol)
Sets the relative convergence tolerance defining when iterations should stop.
void set_max_iters(const uint16_t max_iters)
Sets the maximum number of iterations allowed even if not converged.
Base class for quadrature over a triangle.
const Eigen::Ref< const EigObj > ConstEigRef
Read-only reference to an Eigen object.
double Float
Floating point number.
Eigen::Matrix< T, N, 1 > EigColVecN
Fixed-size column vector of size N containing type T.
Primary namespace for the OpenBEM library.