BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
IFormFactorPrism.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/HardParticle/IFormFactorPrism.h
6 //! @brief Defines class 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 BORNAGAIN_CORE_HARDPARTICLE_IFORMFACTORPRISM_H
16 #define BORNAGAIN_CORE_HARDPARTICLE_IFORMFACTORPRISM_H
17 
19 #include <memory>
20 
21 class Prism;
22 
23 //! A prism with a polygonal base, for form factor computation.
24 
26 {
27 public:
28  IFormFactorPrism(const NodeMeta& meta, const std::vector<double>& PValues);
30 
31  double bottomZ(const IRotation& rotation) const override final;
32  double topZ(const IRotation& rotation) const override final;
33 
34  complex_t evaluate_for_q(cvector_t q) const override;
35  double volume() const override;
36  double radialExtension() const override;
37  double getHeight() const;
38 
39 protected:
40  void setPrism(bool symmetry_Ci, const std::vector<kvector_t>& vertices);
41  virtual double height() const = 0; // TODO mv parameter m_height back from children to this
42 
43 private:
44  std::unique_ptr<Prism> pimpl;
45 };
46 
47 #endif // BORNAGAIN_CORE_HARDPARTICLE_IFORMFACTORPRISM_H
std::complex< double > complex_t
Definition: Complex.h:20
Defines pure virtual interface class IFormFactorBorn.
Pure virtual base class for Born form factors.
A prism with a polygonal base, for form factor computation.
double topZ(const IRotation &rotation) const override final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
double radialExtension() const override
Returns the (approximate in some cases) radial size of the particle of this form factor's shape.
virtual double height() const =0
double bottomZ(const IRotation &rotation) const override final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
double getHeight() const
IFormFactorPrism(const NodeMeta &meta, const std::vector< double > &PValues)
double volume() const override
Returns the volume of this prism.
std::unique_ptr< Prism > pimpl
void setPrism(bool symmetry_Ci, const std::vector< kvector_t > &vertices)
complex_t evaluate_for_q(cvector_t q) const override
Returns the form factor F(q) of this polyhedron, respecting the offset height/2.
Pure virtual interface for rotations.
Definition: Rotations.h:27
Definition: Prism.h:23
Metadata of one model node.
Definition: INode.h:37