18#ifndef TRAPZ_LINE_QUAD_H
19#define TRAPZ_LINE_QUAD_H
30const uint16_t TRAPZ_LINE_DEFAULT_NUM_SEGMENTS = 10;
31const uint16_t TRAPZ_LINE_MAX_NUM_SEGMENTS = 1000;
103 weights[0] = 0.5 / num_segments_;
104 weights[num_segments_] = 0.5 / num_segments_;
111 uint16_t num_segments_ = TRAPZ_LINE_DEFAULT_NUM_SEGMENTS;
Base class for quadrature over a line segment.
const EigRowVec< Float > & weights() const
Returns the weights associated with the points on which the integrand is evaluated.
Class for trapezoidal integration over a line segment.
EigRowVec< Float > ref_points() const
Returns the evaluation points in the reference unit line segment.
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.
TrapzLineQuadrature(const uint8_t num_segments=TRAPZ_LINE_DEFAULT_NUM_SEGMENTS)
Constructs a TrapzLineQuadrature object with a specified number of subdivisions.
EigRowVec< Float > ref_weights() const
Returns the weights associated with the evaluation points in the reference unit line segment.
uint16_t num_segments() const
Returns the number of sub-segments into which the given line segment is divided.
void set_num_segments(const uint16_t num_segments)
Sets the number of sub-segments into which the given line segment is divided.
const Eigen::Ref< const EigObj > ConstEigRef
Read-only reference to an Eigen object.
Eigen::Matrix< T, 1, Eigen::Dynamic > EigRowVec
Dynamic-size row vector containing type T.
Eigen::Matrix< T, N, 1 > EigColVecN
Fixed-size column vector of size N containing type T.
Primary namespace for the OpenBEM library.