BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
IFormFactorPrism.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/HardParticle/IFormFactorPrism.h
6 //! @brief Defines interface IFormFactorPrism.
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_IFORMFACTORPRISM_H
17 #define BORNAGAIN_SAMPLE_HARDPARTICLE_IFORMFACTORPRISM_H
18 
20 #include <memory>
21 
22 namespace ff {
23 
24 class Prism;
25 
26 } // namespace ff
27 
28 
29 //! A prism with a polygonal base, for form factor computation.
30 
31 class IFormFactorPrism : public IFormFactor {
32 public:
33  IFormFactorPrism(const std::vector<double>& PValues);
34  ~IFormFactorPrism() override;
35 
36  double bottomZ(const IRotation* rotation) const override;
37  double topZ(const IRotation* rotation) const override;
38 
39  complex_t formfactor_at_bottom(C3 q) const override;
40  double volume() const override;
41  double radialExtension() const override;
42  virtual double height() const = 0;
43 
44 protected:
45  void setPrism(bool symmetry_Ci, const std::vector<R3>& vertices);
46 
47  // Each child must have a parameter m_height. We would like to move it here,
48  // but this seems incompatible with the current initialization of m_P and
49  // with the order of child constructor arguments, especially Box(l, w, h).
50 
51 private:
52  std::unique_ptr<ff::Prism> pimpl;
53  std::vector<R3> m_vertices; //! for topZ, bottomZ computation only
54 };
55 
56 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_IFORMFACTORPRISM_H
57 #endif // USER_API
Defines interface IDecoratableBorn.
A prism with a polygonal base, for form factor computation.
complex_t formfactor_at_bottom(C3 q) const override
Returns the form factor F(q) of this polyhedron, respecting the offset height/2.
double bottomZ(const IRotation *rotation) const override
double radialExtension() const override
Returns the (approximate in some cases) radial size of the particle of this form factor's shape....
IFormFactorPrism(const std::vector< double > &PValues)
virtual double height() const =0
double volume() const override
Returns the volume of this prism.
std::unique_ptr< ff::Prism > pimpl
void setPrism(bool symmetry_Ci, const std::vector< R3 > &vertices)
double topZ(const IRotation *rotation) const override
std::vector< R3 > m_vertices
~IFormFactorPrism() override
Abstract base class for Born form factors.
Definition: IFormFactor.h:36
Abstract base class for rotations.
Definition: Rotations.h:29