18#ifndef BEM_RWG_OPINT_SRC_LINE_I
19#define BEM_RWG_OPINT_SRC_LINE_I
33template <
typename LineQuadratureType>
78 if (base::compute_g_terms_)
83 if (base::compute_grad_g_terms_)
134 ) <= TRIANGLE_DEFAULT_TOL *
edge.length()).all() &&
135 "SrcLineIntegrator::assemble_integrals(): x_plus and x_minus are incorrect"
148 line_quad_.compute_points_weights(
x_minus.middleCols(
rr, 1),
x_plus.middleCols(
rr, 1));
151 weights_x.col(
rr) = line_quad_.ref_weights().transpose() *
edge.length();
152 points_x.col(
rr) = line_quad_.points().transpose();
177 Eigen::pow(
rho.array(), 2);
180 Eigen::pow(
rho.array(), 2)
188 line_quad_.compute_points_weights(
193 weights_r.col(
rr) = line_quad_.weights().transpose();
196 Eigen::pow(
proj_h[
rr] / Eigen::cos(line_quad_.points().array()), 2)
202 Eigen::pow(
rho.array(), 2)
215 Eigen::sqrt(Eigen::pow(
proj_d.array(), 2) +
219 Eigen::sqrt(Eigen::pow(
proj_d.array(), 2) +
225 if (base::compute_g_terms_)
237 ).colwise().sum() /
jk;
266 if (base::compute_grad_g_terms_)
282 if (base::compute_g_terms_)
290 if (base::compute_grad_g_terms_)
293 result.grad_g.row(0) = -
I_par.row(0).array() / four_pi;
294 result.grad_g.row(1) = -
I_par.row(1).array() / four_pi;
static EigRowVec< Float > directed_angle_between_vectors(ConstEigRef< EigMatNX< Float, dim > > v1, ConstEigRef< EigMatNX< Float, dim > > v2)
Returns the directional angles between pairs of vectors in a right-hand system where counter-clockwis...
SrcResult integrate(const Complex k, const Triangle< 2 > &src_tri, ConstEigRef< EigMatNX< Float, 3 > > r_obs) override
Computes the integral over the source triangle.
const Complex J
Imaginary unit.
const Float float_eps
Numerical infinitesimal.
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > EigMat
Dynamic-size matrix containing type T.
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.
double Float
Floating point number.
std::complex< Float > Complex
Complex floating point number.
Eigen::Matrix< T, N, 1 > EigColVecN
Fixed-size column vector of size N containing type T.
Eigen::Matrix< T, N, Eigen::Dynamic > EigMatNX
Fixed-height matrix with N rows containing type T.
Namespace for RWG-based BEM functionality.
Data structure to hold the results of integration over the source triangle.