BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
CosineRipple.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/HardParticle/CosineRipple.h
6 //! @brief Defines classes CosineRipple*.
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_SAMPLE_HARDPARTICLE_COSINERIPPLE_H
16 #define BORNAGAIN_SAMPLE_HARDPARTICLE_COSINERIPPLE_H
17 
19 
20 //! The form factor for a cosine ripple, with box profile in elongation direction.
21 //! @ingroup legacyGrating
23 public:
24  CosineRippleBox(double length, double width, double height);
25 #ifndef USER_API
26  CosineRippleBox(std::vector<double> P);
27  CosineRippleBox* clone() const override;
28  std::string className() const final { return "CosineRippleBox"; }
29  // const auto tooltip = "class_tooltip";
30  std::vector<ParaMeta> parDefs() const final
31  {
32  return {{"Length", "nm", "Characteristic length", 0, INF, 1.},
33  {"Width", "nm", "Width", 0, INF, 1.},
34  {"Height", "nm", "Height", 0, INF, 1.}};
35  }
36 
37 private:
38  complex_t factor_x(complex_t qx) const override;
39 #endif // USER_API
40 };
41 
42 //! The form factor for a cosine ripple, with Gaussian profile in elongation direction.
43 //! @ingroup legacyGrating
45 public:
46  CosineRippleGauss(double length, double width, double height);
47 #ifndef USER_API
48  CosineRippleGauss(std::vector<double> P);
49  CosineRippleGauss* clone() const override;
50  std::string className() const final { return "CosineRippleGauss"; }
51  // const auto tooltip = "class_tooltip";
52  std::vector<ParaMeta> parDefs() const final
53  {
54  return {{"Length", "nm", "Characteristic length", 0, INF, 1.},
55  {"Width", "nm", "Width", 0, INF, 1.},
56  {"Height", "nm", "Height", 0, INF, 1.}};
57  }
58 
59 private:
60  complex_t factor_x(complex_t qx) const override;
61 #endif // USER_API
62 };
63 
64 //! The form factor for a cosine ripple, with Lorentz form factor in elongation direction.
65 //! @ingroup legacyGrating
67 public:
68  CosineRippleLorentz(double length, double width, double height);
69 #ifndef USER_API
70  CosineRippleLorentz(std::vector<double> P);
71  CosineRippleLorentz* clone() const override;
72  std::string className() const final { return "CosineRippleLorentz"; }
73  // const auto tooltip = "class_tooltip";
74  std::vector<ParaMeta> parDefs() const final
75  {
76  return {{"Length", "nm", "Characteristic length", 0, INF, 1.},
77  {"Width", "nm", "Width", 0, INF, 1.},
78  {"Height", "nm", "Height", 0, INF, 1.}};
79  }
80 
81 private:
82  complex_t factor_x(complex_t qx) const override;
83 #endif // USER_API
84 };
85 
86 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_COSINERIPPLE_H
const double INF
Definition: INode.h:26
Defines interface classes IProfileRipple, ICosineRipple, ISawtoothRipple.
The form factor for a cosine ripple, with box profile in elongation direction.
Definition: CosineRipple.h:22
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
Definition: CosineRipple.h:30
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
Definition: CosineRipple.h:28
CosineRippleBox(double length, double width, double height)
complex_t factor_x(complex_t qx) const override
CosineRippleBox * clone() const override
Returns a clone of this ISampleNode object.
The form factor for a cosine ripple, with Gaussian profile in elongation direction.
Definition: CosineRipple.h:44
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
Definition: CosineRipple.h:50
CosineRippleGauss * clone() const override
Returns a clone of this ISampleNode object.
CosineRippleGauss(double length, double width, double height)
complex_t factor_x(complex_t qx) const override
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
Definition: CosineRipple.h:52
The form factor for a cosine ripple, with Lorentz form factor in elongation direction.
Definition: CosineRipple.h:66
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
Definition: CosineRipple.h:72
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
Definition: CosineRipple.h:74
complex_t factor_x(complex_t qx) const override
CosineRippleLorentz * clone() const override
Returns a clone of this ISampleNode object.
CosineRippleLorentz(double length, double width, double height)
Base class for form factors with a cosine ripple profile in the yz plane.
double width() const
double height() const
double length() const