38 assert(
r.array().all() > 0 &&
"HGF::compute(): Distance must be greater than 0.");
39 return Eigen::exp(-
J * k *
r.array()) /
r.array() / four_pi;
51 assert(
r.array().all() > 0 &&
"HGF::compute_grad(): Distance must be greater than 0.");
55 (
r.array() *
r.array() *
r.array()) / four_pi;
69 assert(
r.array().all() > 0 &&
"SingularitySubtractedHGF::compute(): Distance must be greater than 0.");
70 return (Eigen::exp(-
J * k *
r.array()) - one) /
r.array() / four_pi;
82 assert(
r.array().all() > 0 &&
"SingularitySubtractedHGF::compute_grad(): Distance must be greater than 0.");
89 Eigen::exp(-
jkr.array()) * (one +
jkr.array()) - (one + half * k * k *
r_sq.array())
90 ) /
r_cu.array() / four_pi;
105 if (std::abs(k) == 0.0)
108 const Float tol = KERNEL_DEFAULT_TOL;
119 if ((
multiplier.array().abs() <= tol *
val.array().abs()).all())
122 val.array() /= four_pi;
137 if (std::abs(k) == 0.0)
140 const Float tol = KERNEL_DEFAULT_TOL;
EigMatNX< Complex, 3 > compute_grad(ConstEigRef< EigColVecN< Float, 3 > > r_obs, ConstEigRef< EigMatNX< Float, 3 > > r_src, const Complex k) const
Computes the gradient of the kernel for given observation and source points.
EigRowVec< Complex > compute(ConstEigRef< EigColVecN< Float, 3 > > r_obs, ConstEigRef< EigMatNX< Float, 3 > > r_src, const Complex k) const
Computes the kernel for given observation and source points.
EigMatNX< Complex, 3 > compute_grad(ConstEigRef< EigColVecN< Float, 3 > > r_obs, ConstEigRef< EigMatNX< Float, 3 > > r_src, const Complex k) const
Computes the gradient of the kernel for given observation and source points.
EigRowVec< Complex > compute(ConstEigRef< EigColVecN< Float, 3 > > r_obs, ConstEigRef< EigMatNX< Float, 3 > > r_src, const Complex k) const
Computes the kernel for given observation and source points.
EigMatNX< Complex, 3 > compute_grad(ConstEigRef< EigColVecN< Float, 3 > > r_obs, ConstEigRef< EigMatNX< Float, 3 > > r_src, const Complex k) const
Computes the gradient of the kernel for given observation and source points.
EigRowVec< Complex > compute(ConstEigRef< EigColVecN< Float, 3 > > r_obs, ConstEigRef< EigMatNX< Float, 3 > > r_src, const Complex k) const
Computes the kernel for given observation and source points.
const Complex J
Imaginary unit.
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.
Primary namespace for the OpenBEM library.