15 #ifndef BORNAGAIN_CORE_HARDPARTICLE_POLYHEDRALCOMPONENTS_H
16 #define BORNAGAIN_CORE_HARDPARTICLE_POLYHEDRALCOMPONENTS_H
46 static double diameter(
const std::vector<kvector_t>& V);
47 #ifdef POLYHEDRAL_DIAGNOSTIC
48 static void setLimits(
double _qpa,
int _n);
51 PolyhedralFace(
const std::vector<kvector_t>& _V = std::vector<kvector_t>(),
52 bool _sym_S2 =
false);
54 double area()
const {
return m_area; }
55 double pyramidalVolume()
const {
return m_rperp * m_area / 3; }
56 double radius3d()
const {
return m_radius_3d; }
65 static double qpa_limit_series;
66 static int n_limit_series;
69 std::vector<PolyhedralEdge> edges;
77 complex_t ff_n_core(
int m,
cvector_t qpa, complex_t qperp)
const;
79 complex_t expansion(complex_t fac_even, complex_t fac_odd,
cvector_t qpa,
80 double abslevel)
const;
Defines complex_t, and a few elementary functions.
Defines basic vectors in R^3 and C^3.
auto dot(const BasicVector3D< U > &v) const
Returns dot product of vectors (antilinear in the first [=self] argument).
One edge of a polygon, for form factor computation.
complex_t contrib(int m, cvector_t qpa, complex_t qrperp) const
Returns sum_l=0^M/2 u^2l v^(M-2l) / (2l+1)!(M-2l)! - vperp^M/M!
A polygon, for form factor computation.
complex_t ff_n(int m, cvector_t q) const
Returns contribution qn*f_n [of order q^(n+1)] from this face to the polyhedral form factor.
complex_t normalProjectionConj(cvector_t q) const
Returns conj(q)*normal [BasicVector3D::dot is antilinear in 'this' argument].
static double diameter(const std::vector< kvector_t > &V)
Static method, returns diameter of circle that contains all vertices.
complex_t ff_2D(cvector_t qpa) const
Returns the two-dimensional form factor of this face, for use in a prism.
PolyhedralFace(const std::vector< kvector_t > &_V=std::vector< kvector_t >(), bool _sym_S2=false)
Sets internal variables for given vertex chain.
void assert_Ci(const PolyhedralFace &other) const
Throws if deviation from inversion symmetry is detected. Does not check vertices.
complex_t ff(cvector_t q, bool sym_Ci) const
Returns the contribution ff(q) of this face to the polyhedral form factor.