BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorSawtoothRipple.cpp
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/HardParticle/FormFactorSawtoothRipple.cpp
6 //! @brief Implements classes FormFactorSawtoothRipple*.
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 FormFactorSawtoothRippleBox
20 // ************************************************************************** //
21 
23  : ISawtoothRipple({"SawtoothRippleBox", "class_tooltip", {}}, P)
24 {
25 }
26 
28  double asymmetry)
29  : FormFactorSawtoothRippleBox(std::vector<double>{length, width, height, asymmetry})
30 {
31 }
32 
34 {
36 }
37 
39 {
40  visitor->visit(this);
41 }
42 
44 {
45  return ripples::factor_x_box(qx, m_length);
46 }
47 
48 // ************************************************************************** //
49 // class FormFactorSawtoothRippleGauss
50 // ************************************************************************** //
51 
53  : ISawtoothRipple({"SawtoothRippleGauss", "class_tooltip", {}}, P)
54 {
55 }
56 
58  double height, double asymmetry)
59  : FormFactorSawtoothRippleGauss(std::vector<double>{length, width, height, asymmetry})
60 {
61 }
62 
64 {
66 }
67 
69 {
70  visitor->visit(this);
71 }
72 
74 {
76 }
77 
78 // ************************************************************************** //
79 // class FormFactorSawtoothRippleLorentz
80 // ************************************************************************** //
81 
83  : ISawtoothRipple({"SawtoothRippleLorentz", "class_tooltip", {}}, P)
84 {
85 }
86 
88  double height, double asymmetry)
89  : FormFactorSawtoothRippleLorentz(std::vector<double>{length, width, height, asymmetry})
90 {
91 }
92 
94 {
96 }
97 
99 {
100  visitor->visit(this);
101 }
102 
104 {
106 }
std::complex< double > complex_t
Definition: Complex.h:20
Defines classes FormFactorSawtoothRipple*.
Declares computations in namespace ripples.
The form factor for a cosine ripple, with box profile in elongation direction.
FormFactorSawtoothRippleBox * clone() const override final
Returns a clone of this ISample object.
complex_t factor_x(complex_t qx) const override final
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
FormFactorSawtoothRippleBox(const std::vector< double > P)
The form factor for a cosine ripple, with Gaussian profile in elongation direction.
FormFactorSawtoothRippleGauss(const std::vector< double > P)
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
FormFactorSawtoothRippleGauss * clone() const override final
Returns a clone of this ISample object.
complex_t factor_x(complex_t qx) const override final
The form factor for a cosine ripple, with Lorentz form factor in elongation direction.
FormFactorSawtoothRippleLorentz(const std::vector< double > P)
FormFactorSawtoothRippleLorentz * clone() const override final
Returns a clone of this ISample object.
complex_t factor_x(complex_t qx) const override final
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149
virtual void visit(const BasicLattice *)
Definition: INodeVisitor.h:154
const double & m_length
const double & m_width
const double & m_height
Base class for form factors with a triangular ripple profile in the yz plane.
const double & m_asymmetry
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