32 throw std::runtime_error(
"pyramid angle alpha out of bounds");
34 std::ostringstream ostr;
35 ostr <<
"Cone() -> Error in class initialization ";
36 ostr <<
"with parameters radius:" <<
m_radius;
38 ostr <<
" alpha[rad]:" <<
m_alpha <<
"\n\n";
39 ostr <<
"Check for 'height <= radius*tan(alpha)' failed.";
40 throw std::runtime_error(ostr.str());
54 if (std::abs(q.mag()) < std::numeric_limits<double>::epsilon()) {
61 return M_PI / 3. * (
R *
R *
H + (
R *
R - R2 * R2) * (apex_height -
H));
66 complex_t q_p = std::sqrt(q.x() * q.x() + q.y() * q.y());
Defines Bessel functions in namespace Math.
Defines M_PI and some more mathematical constants.
Defines class DoubleEllipse.
Defines classes RealIntegrator, ComplexIntegrator.
To integrate a complex function of a real variable.
complex_t integrate(const std::function< complex_t(double)> &f, double lmin, double lmax)
A conical frustum (cone truncated parallel to the base) with circular base.
complex_t formfactor_at_bottom(C3 q) const override
Cone(double radius, double height, double alpha)
void checkNodeArgs() const
Raises exception if a parameter value is invalid.
double J1c(double x)
Bessel function J1(x)/x.
double cot(double x)
cotangent function: