BornAgain  1.19.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 reflection and scattering
4 //
5 //! @file Sample/HardParticle/IFormFactorPolyhedron.h
6 //! @brief Defines interface 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 USER_API
16 #ifndef BORNAGAIN_SAMPLE_HARDPARTICLE_IFORMFACTORPOLYHEDRON_H
17 #define BORNAGAIN_SAMPLE_HARDPARTICLE_IFORMFACTORPOLYHEDRON_H
18 
21 #include <memory>
22 
23 class Polyhedron;
24 
25 //! A polyhedron, for form factor computation.
26 
28 public:
29  // #ifdef ALGORITHM_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 final;
38  double topZ(const IRotation& rotation) const final;
39 
40  complex_t evaluate_for_q(cvector_t q) const final;
42 
43  double volume() const final;
44  double radialExtension() const 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_SAMPLE_HARDPARTICLE_IFORMFACTORPOLYHEDRON_H
56 #endif // USER_API
std::complex< double > complex_t
Definition: Complex.h:20
Defines interface IBornFF.
Defines classes PolygonalTopology, PolyhedralTopology.
Abstract base class for Born form factors.
Definition: IBornFF.h:41
A polyhedron, for form factor computation.
void assert_platonic() const
Assertions for Platonic solid.
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 final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
double volume() const final
Returns the total volume of the particle of this form factor's shape.
double radialExtension() const final
Returns the (approximate in some cases) radial size of the particle of this form factor's shape.
double topZ(const IRotation &rotation) const final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
std::unique_ptr< Polyhedron > pimpl
complex_t evaluate_for_q(cvector_t q) const final
Returns scattering amplitude for complex scattering wavevector q=k_i-k_f.
Abstract base class for rotations.
Definition: Rotations.h:28
For internal use in IFormFactorPolyhedron.
A polyhedron, implementation class for use in IFormFactorPolyhedron.
Definition: Polyhedron.h:30
Definition: filesystem.h:81
Metadata of one model node.
Definition: INode.h:38