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

HorizontalCylinder::formfactor: integral now running over angle

parent aaaf38e1
No related branches found
No related tags found
1 merge request!1228Repair slicing and ff computation for HorizontalCylinder (#386)
......@@ -57,14 +57,14 @@ complex_t HorizontalCylinder::formfactor(C3 q) const
radial_part = M_TWOPI * R * R * Math::Bessel::J1c(qR) * exp_I(q.z() * R);
else
radial_part =
2.
* ComplexIntegrator().integrate(
[=](double z) {
double y = sqrt(R * R - z * z);
return y * Math::sinc(q.y() * y) * exp_I(q.z() * (z - m_slice_bottom));
},
m_slice_bottom, m_slice_top);
// integration variable substituted as z = R * sin(t)
radial_part = 2. * pow(R, 2) * exp_I(q.z() * (-m_slice_bottom))
* ComplexIntegrator().integrate(
[=](double t) {
return pow(cos(t), 2) * Math::sinc(q.y() * R * cos(t))
* exp_I(q.z() * R * sin(t));
},
asin(m_slice_bottom / R), asin(m_slice_top / R));
return radial_part * axial_part;
}
......
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