BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
IFormFactorPolyhedron.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/HardParticle/IFormFactorPolyhedron.h
6 //! @brief Defines class IFormFactorPolyhedron.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************** //
14 
15 #ifndef BORNAGAIN_CORE_HARDPARTICLE_IFORMFACTORPOLYHEDRON_H
16 #define BORNAGAIN_CORE_HARDPARTICLE_IFORMFACTORPOLYHEDRON_H
17 
20 #include <memory>
21 
22 class Polyhedron;
23 
24 //! A polyhedron, for form factor computation.
25 
27 {
28 public:
29 #ifdef POLYHEDRAL_DIAGNOSTIC
30  static void setLimits(double _q, int _n);
31 #endif
32 
34  IFormFactorPolyhedron(const NodeMeta& meta, const std::vector<double>& PValues);
36 
37  double bottomZ(const IRotation& rotation) const override final;
38  double topZ(const IRotation& rotation) const override final;
39 
40  complex_t evaluate_for_q(cvector_t q) const override final;
42 
43  double volume() const override final;
44  double radialExtension() const override final;
45  void assert_platonic() const;
46 
47 protected:
48  void setPolyhedron(const PolyhedralTopology& topology, double z_bottom,
49  const std::vector<kvector_t>& vertices);
50 
51 private:
52  std::unique_ptr<Polyhedron> pimpl;
53 };
54 
55 #endif // BORNAGAIN_CORE_HARDPARTICLE_IFORMFACTORPOLYHEDRON_H
std::complex< double > complex_t
Definition: Complex.h:20
Defines pure virtual interface class IFormFactorBorn.
Defines classes PolygonalTopology, PolyhedralTopology.
Pure virtual base class for Born form factors.
A polyhedron, for form factor computation.
void assert_platonic() const
Assertions for Platonic solid.
double volume() const override final
Returns the total volume of the particle of this form factor's shape.
void setPolyhedron(const PolyhedralTopology &topology, double z_bottom, const std::vector< kvector_t > &vertices)
Called by child classes to set faces and other internal variables.
IFormFactorPolyhedron()=delete
complex_t evaluate_centered(cvector_t q) const
double bottomZ(const IRotation &rotation) const override final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
complex_t evaluate_for_q(cvector_t q) const override final
Returns scattering amplitude for complex scattering wavevector q=k_i-k_f.
double radialExtension() const override final
Returns the (approximate in some cases) radial size of the particle of this form factor's shape.
double topZ(const IRotation &rotation) const override final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
std::unique_ptr< Polyhedron > pimpl
Pure virtual interface for rotations.
Definition: Rotations.h:27
For internal use in IFormFactorPolyhedron.
A polyhedron, implementation class for use in IFormFactorPolyhedron.
Definition: Polyhedron.h:25
Metadata of one model node.
Definition: INode.h:37