33 if (num_segments > TRAPZ_LINE_MAX_NUM_SEGMENTS)
34 throw std::domain_error(
35 "TrapzLineQuadrature::set_num_segments(): max number of segments must be less than "
36 + std::to_string(TRAPZ_LINE_MAX_NUM_SEGMENTS) +
".");
38 num_segments_ = num_segments;
40 base::points_.resize(
dim, num_segments_ + 1);
41 base::weights_.resize(1, num_segments_ + 1);
42 base::points_weights_computed_ =
false;
57 base::points_.noalias() = (
p * ref_points()).
colwise() +
p1;
58 base::weights_.noalias() = ref_weights() *
p_len;
59 base::points_weights_computed_ =
true;
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.
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.
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.