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