BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorCosineRipple.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/HardParticle/FormFactorCosineRipple.cpp
6 //! @brief Implements classes FormFactorCosineRipple*.
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 FormFactorCosineRippleBox
20 // ************************************************************************************************
21 
23  : ICosineRipple({"CosineRippleBox", "class_tooltip", {}}, P)
24 {
25 }
26 
27 FormFactorCosineRippleBox::FormFactorCosineRippleBox(double length, double width, double height)
28  : FormFactorCosineRippleBox(std::vector<double>{length, width, height})
29 {
30 }
31 
33 {
35 }
36 
38 {
39  visitor->visit(this);
40 }
41 
43 {
44  return ripples::factor_x_box(qx, m_length);
45 }
46 
47 // ************************************************************************************************
48 // class FormFactorCosineRippleGauss
49 // ************************************************************************************************
50 
52  : ICosineRipple({"CosineRippleGauss", "class_tooltip", {}}, P)
53 {
54 }
55 
56 FormFactorCosineRippleGauss::FormFactorCosineRippleGauss(double length, double width, double height)
57  : FormFactorCosineRippleGauss(std::vector<double>{length, width, height})
58 {
59 }
60 
62 {
64 }
65 
67 {
68  visitor->visit(this);
69 }
70 
72 {
74 }
75 
76 // ************************************************************************************************
77 // class FormFactorCosineRippleLorentz
78 // ************************************************************************************************
79 
81  : ICosineRipple({"CosineRippleLorentz", "class_tooltip", {}}, P)
82 {
83 }
84 
86  double height)
87  : FormFactorCosineRippleLorentz(std::vector<double>{length, width, height})
88 {
89 }
90 
92 {
94 }
95 
97 {
98  visitor->visit(this);
99 }
100 
102 {
104 }
std::complex< double > complex_t
Definition: Complex.h:20
Defines classes FormFactorCosineRipple*.
Declares computations in namespace ripples.
The form factor for a cosine ripple, with box profile in elongation direction.
FormFactorCosineRippleBox(const std::vector< double > P)
complex_t factor_x(complex_t qx) const final
FormFactorCosineRippleBox * clone() const final
Returns a clone of this ISampleNode object.
void accept(INodeVisitor *visitor) const final
Calls the INodeVisitor's visit method.
The form factor for a cosine ripple, with Gaussian profile in elongation direction.
FormFactorCosineRippleGauss(const std::vector< double > P)
void accept(INodeVisitor *visitor) const final
Calls the INodeVisitor's visit method.
complex_t factor_x(complex_t qx) const final
FormFactorCosineRippleGauss * clone() const final
Returns a clone of this ISampleNode object.
The form factor for a cosine ripple, with Lorentz form factor in elongation direction.
FormFactorCosineRippleLorentz * clone() const final
Returns a clone of this ISampleNode object.
complex_t factor_x(complex_t qx) const final
FormFactorCosineRippleLorentz(const std::vector< double > P)
void accept(INodeVisitor *visitor) const final
Calls the INodeVisitor's visit method.
Base class for form factors with a cosine ripple profile in the yz plane.
Visitor interface to visit ISampleNode objects.
Definition: INodeVisitor.h:146
virtual void visit(const BasicLattice2D *)
Definition: INodeVisitor.h:151
const double & m_length
const double & m_width
const double & m_height
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
Definition: filesystem.h:81