18#ifndef ITER_GAUSS_LINE_QUAD_H
19#define ITER_GAUSS_LINE_QUAD_H
32const Float ITER_GAUSS_LINE_DEFAULT_TOL = 1
e-3;
63 base::points_weights_computed_ =
false;
83 base::points_weights_computed_ =
false;
103 base::points_weights_computed_ =
false;
135 if (!base::points_weights_computed_)
136 throw std::runtime_error(
137 "IterativeGaussLineQuadrature::converged(): must call `compute_points_weights()` first.");
151 bool converged_ =
false;
154 uint16_t max_iters_ = LINE_MAX_ORDER;
155 Float tol_ = ITER_GAUSS_LINE_DEFAULT_TOL;
Class for iterative Gaussian quadrature over a line segment.
uint8_t converged_order() const
Returns the quadrature order at which the iterations converged.
void set_max_iters(const uint16_t max_iters)
Sets the maximum number of iterations allowed even if not converged.
void set_tol(const Float tol)
Sets the relative convergence tolerance defining when iterations should stop.
void set_starting_order(const uint8_t starting_order)
Sets the quadrature order at which iterations should start.
uint16_t max_iters() const
Returns the maximum number of iterations allowed even if not converged.
uint8_t starting_order() const
Returns the quadrature order at which iterations start.
Float tol() const
Returns the relative convergence tolerance defining when iterations should stop.
void compute_points_weights(ConstEigRef< EigColVecN< Float, dim > > p1, ConstEigRef< EigColVecN< Float, dim > > p2, 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.
bool converged() const
Checks whether the iterations converged.
Base class for quadrature over a line segment.
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.