Skip to content
Snippets Groups Projects
Commit f7ad16a1 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

reuse sqrt(1-z^2)

parent bd86b724
No related branches found
No related tags found
1 merge request!1145Optimize integrands in form factor quadrature
......@@ -59,7 +59,8 @@ complex_t HemiEllipsoid::formfactor_at_bottom(C3 q) const
complex_t qxRz = q.x() * Rz;
complex_t qyWz = q.y() * Wz;
complex_t gamma = std::sqrt(qxRz * qxRz + qyWz * qyWz);
complex_t gamma = std::sqrt((q.x() * R)*(q.x() * R)
+ (q.y() * W) * (q.y() * W)) * std::sqrt(1.0 - z * z);
complex_t J1_gamma_div_gamma = Math::Bessel::J1c(gamma);
return Rz * Wz * J1_gamma_div_gamma * exp_I(q.z() * H * z);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment