Skip to content
Snippets Groups Projects
Commit 11e5befb authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Polyhedron: simplify

parent 64d40113
No related branches found
No related tags found
1 merge request!594Depend on libformfactor; rename pyramid classes; add formfactors of Platonic 4 and 8-hedra
...@@ -113,17 +113,15 @@ std::vector<R3> ff::Polyhedron::vertices() const ...@@ -113,17 +113,15 @@ std::vector<R3> ff::Polyhedron::vertices() const
//! Returns the form factor F(q) of this polyhedron, respecting the offset z_bottom. //! Returns the form factor F(q) of this polyhedron, respecting the offset z_bottom.
complex_t ff::Polyhedron::formfactor_at_bottom(const C3& _q) const complex_t ff::Polyhedron::formfactor_at_bottom(const C3& q) const
{ {
C3 q{_q};
return exp_I(-m_z_bottom * q.z()) * formfactor_at_center(q); return exp_I(-m_z_bottom * q.z()) * formfactor_at_center(q);
} }
//! Returns the form factor F(q) of this polyhedron, with origin at z=0. //! Returns the form factor F(q) of this polyhedron, with origin at z=0.
complex_t ff::Polyhedron::formfactor_at_center(const C3& _q) const complex_t ff::Polyhedron::formfactor_at_center(const C3& q) const
{ {
C3 q{_q};
double q_red = m_radius * q.mag(); double q_red = m_radius * q.mag();
#ifdef ALGORITHM_DIAGNOSTIC #ifdef ALGORITHM_DIAGNOSTIC
polyhedralDiagnosis.reset(); polyhedralDiagnosis.reset();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment