21 {{0, 1, 4, 3},
false},
22 {{1, 2, 5, 4},
false},
23 {{2, 0, 3, 5},
false},
27 FormFactorTetrahedron::FormFactorTetrahedron(
const std::vector<double> P)
30 "actually, not a tetrahedron, but a trigonal frustum",
31 {{
"BaseEdge",
"nm",
"edge of base triangle", 0, +INF, 0},
32 {
"Height",
"nm",
"height of frustum", 0, +INF, 0},
33 {
"Alpha",
"rad",
"angle between base and a side face", 0., M_PI_2, 0}}},
35 m_base_edge(m_P[0]), m_height(m_P[1]), m_alpha(m_P[2])
40 FormFactorTetrahedron::FormFactorTetrahedron(
double base_edge,
double height,
double alpha)
51 m_height - effects.dz_bottom - effects.dz_top, m_alpha);
52 return createTransformedFormFactor(slicedff, rot, effects.position);
58 if (!std::isfinite(cot_alpha) || cot_alpha < 0)
60 double r = cot_alpha * 2 * std::sqrt(3.) * m_height / m_base_edge;
62 std::ostringstream ostr;
63 ostr <<
"Incompatible parameters in Tetrahedron: ";
64 ostr <<
"(base_edge=" << m_base_edge;
65 ostr <<
", height:" << m_height;
66 ostr <<
", alpha[rad]:" << m_alpha <<
")";
70 double a = m_base_edge;
72 double ac = a / sqrt(3) / 2;
73 double ah = a / sqrt(3);
74 double b = a * (1 - r);
76 double bc = b / sqrt(3) / 2;
77 double bh = b / sqrt(3);
79 double zcom = m_height * (.5 - 2 * r / 3 + r * r / 4) / (1 - r + r * r / 3);
87 {-bc, bs, m_height - zcom},
88 {-bc, -bs, m_height - zcom},
89 {bh, 0., 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: