BornAgain  1.18.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 scattering at grazing incidence
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 
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 
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.
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
FormFactorCosineRippleBox * clone() const override final
Returns a clone of this ISample object.
complex_t factor_x(complex_t qx) const override final
FormFactorCosineRippleBox(const std::vector< double > P)
The form factor for a cosine ripple, with Gaussian profile in elongation direction.
FormFactorCosineRippleGauss(const std::vector< double > P)
complex_t factor_x(complex_t qx) const override final
FormFactorCosineRippleGauss * clone() const override final
Returns a clone of this ISample object.
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
The form factor for a cosine ripple, with Lorentz form factor in elongation direction.
FormFactorCosineRippleLorentz * clone() const override final
Returns a clone of this ISample object.
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
complex_t factor_x(complex_t qx) const override final
FormFactorCosineRippleLorentz(const std::vector< double > P)
Base class for form factors with a cosine ripple profile in the yz plane.
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
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