26 , m_height_flattening(m_P[2])
31 std::ostringstream ostr;
32 ostr <<
"::TruncatedSpheroid() -> Error in class initialization with parameters ";
36 ostr <<
"Check for 'height <= 2.*radius*height_flattening' failed.";
37 throw std::runtime_error(ostr.str());
39 m_shape3D = std::make_unique<TruncatedEllipsoidNet>(
55 if (std::abs(q.mag()) <= std::numeric_limits<double>::epsilon())
58 complex_t z_part = exp_I(q.z() * (
H - fp *
R));
65 double Rz = std::sqrt(
R *
R - Z * Z / (fp * fp));
66 complex_t qrRz = std::sqrt(q.x() * q.x() + q.y() * q.y()) * Rz;
69 return Rz * Rz * J1_qrRz_div_qrRz * exp_I(q.z() * Z);
Defines Bessel functions in namespace Math.
Defines M_PI and some more mathematical constants.
Defines classes RealIntegrator, ComplexIntegrator.
Defines class TruncatedEllipsoidNet.
Defines class TruncatedSpheroid.
To integrate a complex function of a real variable.
complex_t integrate(const std::function< complex_t(double)> &f, double lmin, double lmax)
void checkNodeArgs() const
Raises exception if a parameter value is invalid.
A truncated spheroid. An ellipsoid with two equal axis, truncated by a plane perpendicular to the thi...
const double & m_height_flattening
complex_t formfactor_at_bottom(C3 q) const override
TruncatedSpheroid(double radius, double height, double height_flattening, double dh)
double J1c(double x)
Bessel function J1(x)/x.