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

rescale Z

parent 8fa0f676
No related branches found
No related tags found
1 merge request!1145Optimize integrands in form factor quadrature
......@@ -46,15 +46,15 @@ complex_t TruncatedSpheroid::formfactor_at_bottom(C3 q) const
if (std::abs(q.mag()) <= std::numeric_limits<double>::epsilon())
return M_PI / 3. / fp * (H * H * (3. * R - H / fp) - m_dh * m_dh * (3. * R - m_dh / fp));
return M_TWOPI * exp_I(q.z() * (H - fp * R))
return M_TWOPI * exp_I(q.z() * (H - fp * R)) * fp
* ComplexIntegrator().integrate(
[=](double Z) {
double Rz = std::sqrt(R * R - Z * Z / (fp * fp));
double Rz = std::sqrt(R * R - Z * Z);
complex_t qrRz = std::sqrt(q.x() * q.x() + q.y() * q.y()) * Rz;
return Rz * Rz * Math::Bessel::J1c(qrRz) * exp_I(q.z() * Z);
return Rz * Rz * Math::Bessel::J1c(qrRz) * exp_I(q.z() * Z * fp);
},
fp * R - H, fp * R - m_dh);
R - H / fp, R - m_dh / fp);
}
std::string TruncatedSpheroid::validate() const
......
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