BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
IProfileRipple.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
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 BORNAGAIN_CORE_HARDPARTICLE_IPROFILERIPPLE_H
16 #define BORNAGAIN_CORE_HARDPARTICLE_IPROFILERIPPLE_H
17 
19 
20 //! Base class for form factors with a cosine ripple profile in the yz plane.
21 
23 {
24 public:
25  IProfileRipple(const NodeMeta& meta, const std::vector<double>& PValues);
26 
27  double getLength() const { return m_length; }
28  double getHeight() const { return m_height; }
29  double getWidth() const { return m_width; }
30 
31  double radialExtension() const override final;
32 
33  complex_t evaluate_for_q(cvector_t q) const override final;
34 
35 protected:
36  const double& m_length;
37  const double& m_width;
38  const double& m_height;
39 
40  virtual void onChange() override = 0;
41  virtual complex_t factor_x(complex_t qx) const = 0;
42  virtual complex_t factor_yz(complex_t qy, complex_t qz) const = 0;
43 };
44 
45 //! Base class for form factors with a rectangular ripple (bar) profile in the yz plane.
46 
48 {
49 public:
50  IProfileRectangularRipple(const NodeMeta& meta, const std::vector<double>& PValues);
51 
52 private:
53  virtual void onChange() override final;
54  complex_t factor_yz(complex_t qy, complex_t qz) const final;
55 };
56 
57 //! Base class for form factors with a cosine ripple profile in the yz plane.
58 
60 {
61 public:
62  ICosineRipple(const NodeMeta& meta, const std::vector<double>& PValues);
63 
64 private:
65  virtual void onChange() override final;
66  complex_t factor_yz(complex_t qy, complex_t qz) const final;
67 };
68 
69 //! Base class for form factors with a triangular ripple profile in the yz plane.
70 
72 {
73 public:
74  ISawtoothRipple(const NodeMeta& meta, const std::vector<double>& PValues);
75 
76  double getAsymmetry() const { return m_asymmetry; }
77 
78 protected:
79  const double& m_asymmetry;
80 
81 private:
82  virtual void onChange() override final;
83  complex_t factor_yz(complex_t qy, complex_t qz) const final;
84 };
85 
86 #endif // BORNAGAIN_CORE_HARDPARTICLE_IPROFILERIPPLE_H
std::complex< double > complex_t
Definition: Complex.h:20
Defines pure virtual interface class IFormFactorBorn.
Base class for form factors with a cosine ripple profile in the yz plane.
Pure virtual base class for Born form factors.
Base class for form factors with a rectangular ripple (bar) profile in the yz plane.
Base class for form factors with a cosine ripple profile in the yz plane.
double getHeight() const
virtual complex_t factor_yz(complex_t qy, complex_t qz) const =0
double getLength() const
double getWidth() const
const double & m_length
const double & m_width
virtual complex_t factor_x(complex_t qx) const =0
IProfileRipple(const NodeMeta &meta, const std::vector< double > &PValues)
virtual void onChange() override=0
Action to be taken in inherited class when a parameter has changed.
double radialExtension() const override final
Returns the (approximate in some cases) radial size of the particle of this form factor's shape.
complex_t evaluate_for_q(cvector_t q) const override final
Returns scattering amplitude for complex scattering wavevector q=k_i-k_f.
const double & m_height
Base class for form factors with a triangular ripple profile in the yz plane.
double getAsymmetry() const
const double & m_asymmetry
Metadata of one model node.
Definition: INode.h:37