22 {{0, 1, 5, 4},
false},
23 {{1, 2, 6, 5},
false},
24 {{2, 3, 7, 6},
false},
25 {{3, 0, 4, 7},
false},
30 FormFactorPyramid::FormFactorPyramid(
const std::vector<double> P)
32 "frustum with quadratic base",
33 {{
"BaseEdge",
"nm",
"base edge length", 0, +INF, 0},
34 {
"Height",
"nm",
"height", 0, +INF, 0},
35 {
"Alpha",
"rad",
"angle between base and a side face", 0., M_PI, 0}}},
37 m_base_edge(m_P[0]), m_height(m_P[1]), m_alpha(m_P[2])
42 FormFactorPyramid::FormFactorPyramid(
double base_edge,
double height,
double alpha)
53 m_height - effects.dz_bottom - effects.dz_top, m_alpha);
54 return createTransformedFormFactor(slicedff, rot, effects.position);
60 if (!std::isfinite(cot_alpha))
62 double r = cot_alpha * 2 * m_height / m_base_edge;
64 std::ostringstream ostr;
65 ostr <<
"FormFactorPyramid() -> Error in class initialization with parameters";
66 ostr <<
" base_edge:" << m_base_edge;
67 ostr <<
" height:" << m_height;
68 ostr <<
" alpha[rad]:" << m_alpha <<
"\n\n";
69 ostr <<
"Check for 'height <= base_edge*tan(alpha)' failed.";
73 double a = m_base_edge / 2;
74 double b = a * (1 - r);
76 double zcom = m_height * (.5 - 2 * r / 3 + r * r / 4) / (1 - r + r * r / 3);
85 {-b, -b, m_height - zcom},
86 {b, -b, m_height - zcom},
87 {b, b, m_height - zcom},
88 {-b, b, m_height - zcom}});
Defines many exception classes in namespace Exceptionss.
Defines M_PI and some more mathematical constants.
Defines namespace MathFunctions.
Pure virtual interface for rotations.
For internal use in IFormFactorPolyhedron.
Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.
double cot(double x)
cotangent function: