BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
A polygon, for form factor computation. More...
Public Member Functions | |
PolyhedralFace (const std::vector< kvector_t > &_V=std::vector< kvector_t >(), bool _sym_S2=false) | |
Sets internal variables for given vertex chain. More... | |
double | area () const |
void | assert_Ci (const PolyhedralFace &other) const |
Throws if deviation from inversion symmetry is detected. Does not check vertices. More... | |
complex_t | ff (cvector_t q, bool sym_Ci) const |
Returns the contribution ff(q) of this face to the polyhedral form factor. More... | |
complex_t | ff_2D (cvector_t qpa) const |
Returns the two-dimensional form factor of this face, for use in a prism. More... | |
complex_t | ff_2D_direct (cvector_t qpa) const |
Two-dimensional form factor, for use in prism, from sum over edge form factors. More... | |
complex_t | ff_2D_expanded (cvector_t qpa) const |
Two-dimensional form factor, for use in prism, from power series. More... | |
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. More... | |
complex_t | normalProjectionConj (cvector_t q) const |
Returns conj(q)*normal [BasicVector3D::dot is antilinear in 'this' argument]. More... | |
double | pyramidalVolume () const |
double | radius3d () const |
Static Public Member Functions | |
static double | diameter (const std::vector< kvector_t > &V) |
Static method, returns diameter of circle that contains all vertices. More... | |
Private Member Functions | |
void | decompose_q (cvector_t q, complex_t &qperp, cvector_t &qpa) const |
Sets qperp and qpa according to argument q and to this polygon's normal. More... | |
complex_t | edge_sum_ff (cvector_t q, cvector_t qpa, bool sym_Ci) const |
Returns core contribution to analytic 2d form factor. More... | |
complex_t | expansion (complex_t fac_even, complex_t fac_odd, cvector_t qpa, double abslevel) const |
Returns sum of n>=1 terms of qpa expansion of 2d form factor. More... | |
complex_t | ff_n_core (int m, cvector_t qpa, complex_t qperp) const |
Returns core contribution to f_n. More... | |
Private Attributes | |
std::vector< PolyhedralEdge > | edges |
double | m_area |
kvector_t | m_normal |
normal vector of this polygon's plane More... | |
double | m_radius_2d |
radius of enclosing cylinder More... | |
double | m_radius_3d |
radius of enclosing sphere More... | |
double | m_rperp |
distance of this polygon's plane from the origin, along 'm_normal' More... | |
bool | sym_S2 |
if true, then edges obtainable by inversion are not provided More... | |
Static Private Attributes | |
static int | n_limit_series = 20 |
static double | qpa_limit_series = 1e-2 |
determines when use power series More... | |
A polygon, for form factor computation.
Definition at line 60 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 126 of file PolyhedralComponents.cpp.
References RealSpace::cross(), diameter(), BasicVector3D< T >::dot(), RealSpace::dot(), edges, m_area, m_normal, m_radius_2d, m_radius_3d, m_rperp, BasicVector3D< T >::mag2(), sym_S2, and BasicVector3D< T >::unit().
|
inline |
void PolyhedralFace::assert_Ci | ( | const PolyhedralFace & | other | ) | const |
Throws if deviation from inversion symmetry is detected. Does not check vertices.
Definition at line 376 of file PolyhedralComponents.cpp.
Sets qperp and qpa according to argument q and to this polygon's normal.
Definition at line 200 of file PolyhedralComponents.cpp.
References BasicVector3D< T >::dot(), m_normal, and BasicVector3D< T >::mag().
Referenced by ff(), and ff_n().
|
static |
Static method, returns diameter of circle that contains all vertices.
Definition at line 112 of file PolyhedralComponents.cpp.
Referenced by PolyhedralFace(), and Polyhedron::Polyhedron().
Returns core contribution to analytic 2d form factor.
Definition at line 282 of file PolyhedralComponents.cpp.
References BasicVector3D< T >::cross(), BasicVector3D< T >::dot(), PolyhedralEdge::E(), edges, exp_I(), m_normal, PolyhedralEdge::qE(), PolyhedralEdge::qR(), Math::sinc(), and sym_S2.
Referenced by ff(), and ff_2D_direct().
|
private |
Returns sum of n>=1 terms of qpa expansion of 2d form factor.
Definition at line 253 of file PolyhedralComponents.cpp.
References ff_n_core(), I, BasicVector3D< T >::mag2(), mul_I(), and n_limit_series.
Referenced by ff(), and ff_2D_expanded().
Returns the contribution ff(q) of this face to the polyhedral form factor.
Definition at line 310 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.
Returns the two-dimensional form factor of this face, for use in a prism.
Definition at line 360 of file PolyhedralComponents.cpp.
References BasicVector3D< T >::dot(), ff_2D_direct(), ff_2D_expanded(), m_area, m_normal, m_radius_2d, BasicVector3D< T >::mag(), qpa_limit_series, and sym_S2.
Two-dimensional form factor, for use in prism, from sum over edge form factors.
Definition at line 353 of file PolyhedralComponents.cpp.
References edge_sum_ff(), I, BasicVector3D< T >::mag2(), and sym_S2.
Referenced by ff_2D().
Two-dimensional form factor, for use in prism, from power series.
Definition at line 346 of file PolyhedralComponents.cpp.
References expansion(), and m_area.
Referenced by ff_2D().
Returns contribution qn*f_n [of order q^(n+1)] from this face to the polyhedral form factor.
Definition at line 231 of file PolyhedralComponents.cpp.
References decompose_q(), BasicVector3D< T >::dot(), ff_n_core(), m_area, m_normal, m_rperp, BasicVector3D< T >::mag(), BasicVector3D< T >::mag2(), and sym_S2.
Returns core contribution to f_n.
Definition at line 212 of file PolyhedralComponents.cpp.
References PolyhedralEdge::contrib(), BasicVector3D< T >::cross(), BasicVector3D< T >::dot(), PolyhedralEdge::E(), edges, m_normal, and m_rperp.
Referenced by expansion(), and ff_n().
Returns conj(q)*normal [BasicVector3D::dot is antilinear in 'this' argument].
Definition at line 71 of file PolyhedralComponents.h.
References BasicVector3D< T >::dot(), and m_normal.
|
inline |
|
inline |
|
private |
Definition at line 84 of file PolyhedralComponents.h.
Referenced by PolyhedralFace(), edge_sum_ff(), and ff_n_core().
|
private |
Definition at line 85 of file PolyhedralComponents.h.
Referenced by PolyhedralFace(), area(), assert_Ci(), ff(), ff_2D(), ff_2D_expanded(), ff_n(), and pyramidalVolume().
|
private |
normal vector of this polygon's plane
Definition at line 86 of file PolyhedralComponents.h.
Referenced by PolyhedralFace(), assert_Ci(), decompose_q(), edge_sum_ff(), ff_2D(), ff_n(), ff_n_core(), and normalProjectionConj().
|
private |
radius of enclosing cylinder
Definition at line 88 of file PolyhedralComponents.h.
Referenced by PolyhedralFace(), ff(), and ff_2D().
|
private |
radius of enclosing sphere
Definition at line 89 of file PolyhedralComponents.h.
Referenced by PolyhedralFace(), and radius3d().
|
private |
distance of this polygon's plane from the origin, along 'm_normal'
Definition at line 87 of file PolyhedralComponents.h.
Referenced by PolyhedralFace(), assert_Ci(), ff(), ff_n(), ff_n_core(), and pyramidalVolume().
|
staticprivate |
Definition at line 81 of file PolyhedralComponents.h.
Referenced by expansion().
|
staticprivate |
determines when use power series
Definition at line 80 of file PolyhedralComponents.h.
|
private |
if true, then edges obtainable by inversion are not provided
Definition at line 83 of file PolyhedralComponents.h.
Referenced by PolyhedralFace(), edge_sum_ff(), ff(), ff_2D(), ff_2D_direct(), and ff_n().