23 Prism::Prism(
bool symmetry_Ci,
double height,
const std::vector<kvector_t>& vertices)
27 for (
const kvector_t& vertex : vertices) {
28 m_vertices.push_back(vertex);
29 m_vertices.push_back(vertex +
kvector_t{0, 0, m_height});
33 m_base = std::unique_ptr<PolyhedralFace>(
new PolyhedralFace(vertices, symmetry_Ci));
34 }
catch (std::invalid_argument& e) {
35 throw std::invalid_argument(std::string(
"Invalid parameterization of Prism: ") + e.what());
36 }
catch (std::logic_error& e) {
37 throw std::logic_error(std::string(
"Bug in Prism: ") + e.what()
38 +
" [please report to the maintainers]");
39 }
catch (std::exception& e) {
40 throw std::runtime_error(std::string(
"Unexpected exception in Prism: ") + e.what()
41 +
" [please report to the maintainers]");
45 double Prism::area()
const
47 return m_base->area();
50 const std::vector<kvector_t>& Prism::vertices()
58 #ifdef POLYHEDRAL_DIAGNOSTIC
59 diagnosis.maxOrder = 0;
60 diagnosis.nExpandedFaces = 0;
65 }
catch (std::logic_error& e) {
66 throw std::logic_error(std::string(
"Bug in Prism: ") + e.what()
67 +
" [please report to the maintainers]");
68 }
catch (std::runtime_error& e) {
69 throw std::runtime_error(std::string(
"Numeric computation failed in Prism: ") + e.what()
70 +
" [please report to the maintainers]");
71 }
catch (std::exception& e) {
72 throw std::runtime_error(std::string(
"Unexpected exception in Prism: ") + e.what()
73 +
" [please report to the maintainers]");
complex_t exp_I(complex_t z)
Returns exp(I*z), where I is the imaginary unit.
Defines namespace MathFunctions.
T z() const
Returns z-component in cartesian coordinate system.
T y() const
Returns y-component in cartesian coordinate system.
T x() const
Returns x-component in cartesian coordinate system.
A polygon, for form factor computation.
complex_t evaluate_for_q(const cvector_t &q) const
needed for topZ, bottomZ computation
double sinc(double x)
sinc function: