BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
SawtoothRipple.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/HardParticle/SawtoothRipple.cpp
6 //! @brief Implements 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 
17 
18 // ************************************************************************************************
19 // class SawtoothRippleBox
20 // ************************************************************************************************
21 
22 SawtoothRippleBox::SawtoothRippleBox(const std::vector<double> P)
23  : ISawtoothRipple(P)
24 {
25  checkNodeArgs();
26 }
27 
28 SawtoothRippleBox::SawtoothRippleBox(double length, double width, double height, double asymmetry)
29  : SawtoothRippleBox(std::vector<double>{length, width, height, asymmetry})
30 {
31 }
32 
34 {
36 }
37 
38 complex_t SawtoothRippleBox::factor_x(complex_t qx) const
39 {
40  return ripples::factor_x_box(qx, m_length);
41 }
42 
43 // ************************************************************************************************
44 // class SawtoothRippleGauss
45 // ************************************************************************************************
46 
47 SawtoothRippleGauss::SawtoothRippleGauss(const std::vector<double> P)
48  : ISawtoothRipple(P)
49 {
50  checkNodeArgs();
51 }
52 
53 SawtoothRippleGauss::SawtoothRippleGauss(double length, double width, double height,
54  double asymmetry)
55  : SawtoothRippleGauss(std::vector<double>{length, width, height, asymmetry})
56 {
57 }
58 
60 {
62 }
63 
64 complex_t SawtoothRippleGauss::factor_x(complex_t qx) const
65 {
67 }
68 
69 // ************************************************************************************************
70 // class SawtoothRippleLorentz
71 // ************************************************************************************************
72 
74  : ISawtoothRipple(P)
75 {
76  checkNodeArgs();
77 }
78 
79 SawtoothRippleLorentz::SawtoothRippleLorentz(double length, double width, double height,
80  double asymmetry)
81  : SawtoothRippleLorentz(std::vector<double>{length, width, height, asymmetry})
82 {
83 }
84 
86 {
88 }
89 
90 complex_t SawtoothRippleLorentz::factor_x(complex_t qx) const
91 {
93 }
Declares computations in namespace ripples.
Defines classes SawtoothRipple*.
void checkNodeArgs() const
Raises exception if a parameter value is invalid.
Definition: INode.cpp:27
double width() const
const double & m_length
const double & m_width
double height() const
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
The form factor for a cosine ripple, with box profile in elongation direction.
complex_t factor_x(complex_t qx) const override
SawtoothRippleBox * clone() const override
Returns a clone of this ISampleNode object.
SawtoothRippleBox(double length, double width, double height, double asymmetry)
The form factor for a cosine ripple, with Gaussian profile in elongation direction.
SawtoothRippleGauss * clone() const override
Returns a clone of this ISampleNode object.
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.
SawtoothRippleLorentz(double length, double width, double height, double asymmetry)
SawtoothRippleLorentz * clone() const override
Returns a clone of this ISampleNode object.
complex_t factor_x(complex_t qx) const override
complex_t factor_x_box(complex_t q, double l)
Definition: Ripples.cpp:20
complex_t factor_x_Lorentz(complex_t q, double l)
Definition: Ripples.cpp:30
complex_t factor_x_Gauss(complex_t q, double l)
Definition: Ripples.cpp:25