BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorBar.cpp
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/HardParticle/FormFactorBar.cpp
6 //! @brief Implements classes FormFactorBar*.
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 FormFactorBarGauss
20 // ************************************************************************** //
21 
22 FormFactorBarGauss::FormFactorBarGauss(const std::vector<double> P)
23  : IProfileRectangularRipple({"BarGauss", "class_tooltip", {}}, P)
24 {
25 }
26 
28  : FormFactorBarGauss(std::vector<double>{length, width, height})
29 {
30 }
31 
33 {
35 }
36 
38 {
39  visitor->visit(this);
40 }
41 
43 {
45 }
46 
47 // ************************************************************************** //
48 // class FormFactorBarLorentz
49 // ************************************************************************** //
50 
51 FormFactorBarLorentz::FormFactorBarLorentz(const std::vector<double> P)
52  : IProfileRectangularRipple({"BarLorentz", "class_tooltip", {}}, P)
53 {
54 }
55 
57  : FormFactorBarLorentz(std::vector<double>{length, width, height})
58 {
59 }
60 
62 {
64 }
65 
67 {
68  visitor->visit(this);
69 }
70 
72 {
74 }
std::complex< double > complex_t
Definition: Complex.h:20
Defines classes FormFactorBar*.
Declares computations in namespace ripples.
The form factor of an elongated bar, with Gaussian profile in elongation direction.
Definition: FormFactorBar.h:23
FormFactorBarGauss * clone() const final
Returns a clone of this ISample object.
complex_t factor_x(complex_t qx) const final
void accept(INodeVisitor *visitor) const final
Calls the INodeVisitor's visit method.
FormFactorBarGauss(const std::vector< double > P)
The form factor of an elongated, with Lorentz form factor in elongation direction.
Definition: FormFactorBar.h:37
FormFactorBarLorentz(const std::vector< double > P)
complex_t factor_x(complex_t qx) const final
FormFactorBarLorentz * clone() const final
Returns a clone of this ISample object.
void accept(INodeVisitor *visitor) const 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
Base class for form factors with a rectangular ripple (bar) profile in the yz plane.
const double & m_length
const double & m_width
const double & m_height
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