BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
IProfileRipple.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/HardParticle/IProfileRipple.h
6 //! @brief Defines interface classes IProfileRipple, ICosineRipple, ISawtoothRipple.
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_IPROFILERIPPLE_H
17 #define BORNAGAIN_SAMPLE_HARDPARTICLE_IPROFILERIPPLE_H
18 
20 
21 //! Base class for form factors with a cosine ripple profile in the yz plane.
22 
23 class IProfileRipple : public IFormFactor {
24 public:
25  IProfileRipple(const std::vector<double>& PValues);
26 
27  double length() const { return m_length; }
28  double height() const { return m_height; }
29  double width() const { return m_width; }
30 
31  double radialExtension() const override;
32 
33  complex_t formfactor_at_bottom(C3 q) const override;
34 
35 protected:
36  const double& m_length;
37  const double& m_width;
38  const double& m_height;
39 
40  virtual complex_t factor_x(complex_t qx) const = 0;
41  virtual complex_t factor_yz(complex_t qy, complex_t qz) const = 0;
42 };
43 
44 //! Base class for form factors with a rectangular ripple (bar) profile in the yz plane.
45 
47 public:
48  IProfileRectangularRipple(const std::vector<double>& PValues);
49 
50 private:
51  complex_t factor_yz(complex_t qy, complex_t qz) const override;
52 };
53 
54 //! Base class for form factors with a cosine ripple profile in the yz plane.
55 
56 class ICosineRipple : public IProfileRipple {
57 public:
58  ICosineRipple(const std::vector<double>& PValues);
59 
60 private:
61  complex_t factor_yz(complex_t qy, complex_t qz) const override;
62 };
63 
64 //! Base class for form factors with a triangular ripple profile in the yz plane.
65 
67 public:
68  ISawtoothRipple(const std::vector<double>& PValues);
69 
70  double asymmetry() const { return m_asymmetry; }
71 
72 protected:
73  const double& m_asymmetry;
74 
75 private:
76  complex_t factor_yz(complex_t qy, complex_t qz) const override;
77 };
78 
79 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_IPROFILERIPPLE_H
80 #endif // USER_API
Defines interface IDecoratableBorn.
Base class for form factors with a cosine ripple profile in the yz plane.
ICosineRipple(const std::vector< double > &PValues)
complex_t factor_yz(complex_t qy, complex_t qz) const override
Complex form factor.
Abstract base class for Born form factors.
Definition: IFormFactor.h:36
Base class for form factors with a rectangular ripple (bar) profile in the yz plane.
complex_t factor_yz(complex_t qy, complex_t qz) const override
Complex form factor.
IProfileRectangularRipple(const std::vector< double > &PValues)
Base class for form factors with a cosine ripple profile in the yz plane.
double radialExtension() const override
Returns the (approximate in some cases) radial size of the particle of this form factor's shape....
IProfileRipple(const std::vector< double > &PValues)
virtual complex_t factor_yz(complex_t qy, complex_t qz) const =0
double width() const
const double & m_length
const double & m_width
virtual complex_t factor_x(complex_t qx) const =0
double height() const
complex_t formfactor_at_bottom(C3 q) const override
double length() const
const double & m_height
Base class for form factors with a triangular ripple profile in the yz plane.
double asymmetry() const
const double & m_asymmetry
ISawtoothRipple(const std::vector< double > &PValues)
complex_t factor_yz(complex_t qy, complex_t qz) const override
Complex form factor.