BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
Bar.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/HardParticle/Bar.h
6 //! @brief Defines classes Bar*.
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 
15 #ifndef BORNAGAIN_SAMPLE_HARDPARTICLE_BAR_H
16 #define BORNAGAIN_SAMPLE_HARDPARTICLE_BAR_H
17 
19 
20 //! The form factor of an elongated bar, with Gaussian profile in elongation direction.
21 //! @ingroup legacyGrating
23 public:
24  BarGauss(double length, double width, double height);
25 #ifndef USER_API
26  BarGauss(std::vector<double> P);
27  BarGauss* clone() const override;
28  std::string className() const final { return "BarGauss"; }
29  // const auto tooltip = "class_tooltip";
30  std::vector<ParaMeta> parDefs() const final
31  {
32  return {{"Length", "nm", "Characteristic length", 0, INF, 1.},
33  {"Width", "nm", "Width", 0, INF, 1.},
34  {"Height", "nm", "Height", 0, INF, 1.}};
35  }
36 #endif // USER_API
37 
38 private:
39  complex_t factor_x(complex_t qx) const override;
40 };
41 
42 //! The form factor of an elongated, with Lorentz form factor in elongation direction.
43 //! @ingroup legacyGrating
45 public:
46  BarLorentz(double length, double width, double height);
47 #ifndef USER_API
48  BarLorentz(std::vector<double> P);
49  BarLorentz* clone() const override;
50  std::string className() const final { return "BarLorentz"; }
51  // const auto tooltip = "class_tooltip";
52  std::vector<ParaMeta> parDefs() const final
53  {
54  return {{"Length", "nm", "Characteristic length", 0, INF, 1.},
55  {"Width", "nm", "Width", 0, INF, 1.},
56  {"Height", "nm", "Height", 0, INF, 1.}};
57  }
58 #endif // USER_API
59 
60 private:
61  complex_t factor_x(complex_t qx) const override;
62 };
63 
64 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_BAR_H
const double INF
Definition: INode.h:26
Defines interface classes IProfileRipple, ICosineRipple, ISawtoothRipple.
The form factor of an elongated bar, with Gaussian profile in elongation direction.
Definition: Bar.h:22
complex_t factor_x(complex_t qx) const override
Definition: Bar.cpp:38
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
Definition: Bar.h:30
BarGauss(double length, double width, double height)
Definition: Bar.cpp:28
BarGauss * clone() const override
Returns a clone of this ISampleNode object.
Definition: Bar.cpp:33
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
Definition: Bar.h:28
The form factor of an elongated, with Lorentz form factor in elongation direction.
Definition: Bar.h:44
BarLorentz * clone() const override
Returns a clone of this ISampleNode object.
Definition: Bar.cpp:58
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
Definition: Bar.h:52
complex_t factor_x(complex_t qx) const override
Definition: Bar.cpp:63
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
Definition: Bar.h:50
BarLorentz(double length, double width, double height)
Definition: Bar.cpp:53
Base class for form factors with a rectangular ripple (bar) profile in the yz plane.
double width() const
double height() const
double length() const