BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Member Functions | |
PolyhedralFace (const std::vector< kvector_t > &_V=std::vector< kvector_t >(), bool _sym_S2=false) | |
double | area () const |
double | pyramidalVolume () const |
double | radius3d () const |
complex_t | normalProjectionConj (cvector_t q) const |
complex_t | ff_n (int m, cvector_t q) const |
complex_t | ff (cvector_t q, bool sym_Ci) const |
complex_t | ff_2D (cvector_t qpa) const |
void | assert_Ci (const PolyhedralFace &other) const |
Static Public Member Functions | |
static double | diameter (const std::vector< kvector_t > &V) |
Private Member Functions | |
void | decompose_q (cvector_t q, complex_t &qperp, cvector_t &qpa) const |
complex_t | ff_n_core (int m, cvector_t qpa, complex_t qperp) const |
complex_t | edge_sum_ff (cvector_t q, cvector_t qpa, bool sym_Ci) const |
complex_t | expansion (complex_t fac_even, complex_t fac_odd, cvector_t qpa, double abslevel) const |
Private Attributes | |
bool | sym_S2 |
std::vector< PolyhedralEdge > | edges |
double | m_area |
kvector_t | m_normal |
double | m_rperp |
double | m_radius_2d |
double | m_radius_3d |
Static Private Attributes | |
static double | qpa_limit_series = 3e-2 |
static int | n_limit_series = 20 |
A polygon, for form factor computation.
Definition at line 43 of file PolyhedralComponents.h.
PolyhedralFace::PolyhedralFace | ( | const std::vector< kvector_t > & | V = std::vector<kvector_t>() , |
bool | _sym_S2 = false |
||
) |
Sets internal variables for given vertex chain.
V | oriented vertex list |
_sym_S2 | true if face has a perpedicular two-fold symmetry axis |
Definition at line 120 of file PolyhedralComponents.cpp.
References diameter(), BasicVector3D< T >::dot(), edges, m_area, m_normal, m_radius_2d, m_radius_3d, m_rperp, BasicVector3D< T >::mag2(), sym_S2, and BasicVector3D< T >::unit().
|
static |
Static method, returns diameter of circle that contains all vertices.
Definition at line 98 of file PolyhedralComponents.cpp.
Referenced by PolyhedralFace(), and Polyhedron::Polyhedron().
|
inline |
|
inline |
|
inline |
Returns conj(q)*normal [BasicVector3D::dot is antilinear in 'this' argument].
Definition at line 58 of file PolyhedralComponents.h.
References BasicVector3D< T >::dot(), and m_normal.
Returns contribution qn*f_n [of order q^(n+1)] from this face to the polyhedral form factor.
Definition at line 235 of file PolyhedralComponents.cpp.
References decompose_q(), BasicVector3D< T >::dot(), anonymous_namespace{PolyhedralComponents.cpp}::eps, ff_n_core(), m_area, m_normal, m_rperp, BasicVector3D< T >::mag(), BasicVector3D< T >::mag2(), anonymous_namespace{PolyhedralComponents.cpp}::ReciprocalFactorialArray, and sym_S2.
Returns the contribution ff(q) of this face to the polyhedral form factor.
Definition at line 328 of file PolyhedralComponents.cpp.
References decompose_q(), edge_sum_ff(), exp_I(), expansion(), I, m_area, m_radius_2d, m_rperp, BasicVector3D< T >::mag(), BasicVector3D< T >::mag2(), mul_I(), qpa_limit_series, and sym_S2.
Referenced by ff_2D().
Returns the two-dimensional form factor of this face, for use in a prism.
Definition at line 367 of file PolyhedralComponents.cpp.
References BasicVector3D< T >::dot(), edge_sum_ff(), anonymous_namespace{PolyhedralComponents.cpp}::eps, expansion(), ff(), I, m_area, m_normal, m_radius_2d, BasicVector3D< T >::mag(), BasicVector3D< T >::mag2(), qpa_limit_series, and sym_S2.
void PolyhedralFace::assert_Ci | ( | const PolyhedralFace & | other | ) | const |
Throws if deviation from inversion symmetry is detected. Does not check vertices.
Definition at line 391 of file PolyhedralComponents.cpp.
Sets qperp and qpa according to argument q and to this polygon's normal.
Definition at line 194 of file PolyhedralComponents.cpp.
References BasicVector3D< T >::dot(), anonymous_namespace{PolyhedralComponents.cpp}::eps, m_normal, and BasicVector3D< T >::mag().
Referenced by ff(), and ff_n().
Returns core contribution to f_n.
Definition at line 206 of file PolyhedralComponents.cpp.
References PolyhedralEdge::contrib(), BasicVector3D< T >::cross(), BasicVector3D< T >::dot(), PolyhedralEdge::E(), edges, m_normal, m_rperp, StringUtils::scientific(), and sym_S2.
Referenced by expansion(), and ff_n().
Returns core contribution to analytic 2d form factor.
Definition at line 296 of file PolyhedralComponents.cpp.
References BasicVector3D< T >::cross(), BasicVector3D< T >::dot(), PolyhedralEdge::E(), edges, exp_I(), m_normal, PolyhedralEdge::qE(), PolyhedralEdge::qR(), StringUtils::scientific(), MathFunctions::sinc(), and sym_S2.
Referenced by ff(), and ff_2D().
|
private |
Returns sum of n>=1 terms of qpa expansion of 2d form factor.
Definition at line 260 of file PolyhedralComponents.cpp.
References anonymous_namespace{PolyhedralComponents.cpp}::eps, ff_n_core(), I, BasicVector3D< T >::mag2(), mul_I(), and n_limit_series.
Referenced by ff(), and ff_2D().
|
staticprivate |
determines when use power series
Definition at line 65 of file PolyhedralComponents.h.
|
staticprivate |
Definition at line 66 of file PolyhedralComponents.h.
Referenced by expansion().
|
private |
if true, then edges obtainable by inversion are not provided
Definition at line 68 of file PolyhedralComponents.h.
Referenced by edge_sum_ff(), ff(), ff_2D(), ff_n(), ff_n_core(), and PolyhedralFace().
|
private |
Definition at line 69 of file PolyhedralComponents.h.
Referenced by edge_sum_ff(), ff_n_core(), and PolyhedralFace().
|
private |
Definition at line 70 of file PolyhedralComponents.h.
Referenced by area(), assert_Ci(), ff(), ff_2D(), ff_n(), PolyhedralFace(), and pyramidalVolume().
|
private |
normal vector of this polygon's plane
Definition at line 71 of file PolyhedralComponents.h.
Referenced by assert_Ci(), decompose_q(), edge_sum_ff(), ff_2D(), ff_n(), ff_n_core(), normalProjectionConj(), and PolyhedralFace().
|
private |
distance of this polygon's plane from the origin, along 'm_normal'
Definition at line 72 of file PolyhedralComponents.h.
Referenced by assert_Ci(), ff(), ff_n(), ff_n_core(), PolyhedralFace(), and pyramidalVolume().
|
private |
radius of enclosing cylinder
Definition at line 73 of file PolyhedralComponents.h.
Referenced by ff(), ff_2D(), and PolyhedralFace().
|
private |
radius of enclosing sphere
Definition at line 74 of file PolyhedralComponents.h.
Referenced by PolyhedralFace(), and radius3d().