BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SampleComponents.cpp
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/SampleBuilderEngine/SampleComponents.cpp
6 //! @brief Implements sample components for complex sample builders.
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 
16 #include "Base/Const/Units.h"
18 
19 // ************************************************************************** //
21 // ************************************************************************** //
22 {
23  add("FTDistribution2DCauchy", new FTDistribution2DCauchy(0.5, 1.0, 0));
24  add("FTDistribution2DGauss", new FTDistribution2DGauss(0.5, 1.0, 0));
25  add("FTDistribution2DGate", new FTDistribution2DGate(0.5, 1.0, 0));
26  add("FTDistribution2DCone", new FTDistribution2DCone(0.5, 1.0, 0));
27  add("FTDistribution2DVoigt", new FTDistribution2DVoigt(0.5, 1.0, 0, 0.2));
28 }
29 
30 // ************************************************************************** //
32 // ************************************************************************** //
33 {
34  add("AnisoPyramid", new FormFactorAnisoPyramid(10.0, 20.0, 5.0, Units::deg2rad(54.73)));
35 
36  add("Box", new FormFactorBox(10.0, 20.0, 5.0));
37 
38  // TODO: activate this when supported by GUI
39  // add("CantellatedCube", new FormFactorCantellatedCube(15.0, 6.0));
40 
41  add("Cone", new FormFactorCone(5.0, 6.0, Units::deg2rad(54.73)));
42 
43  add("Cone6", new FormFactorCone6(2. / sqrt(3.) * 5.0, 5.0, Units::deg2rad(54.73)));
44 
45  add("Cuboctahedron", new FormFactorCuboctahedron(10.0, 5.0, 1.0, Units::deg2rad(54.73)));
46 
47  add("Cylinder", new FormFactorCylinder(5.0, 10.0));
48 
49  add("Dodecahedron", new FormFactorDodecahedron(5.0));
50 
51  add("Dot", new FormFactorDot(5.0));
52 
53  add("EllipsoidalCylinder", new FormFactorEllipsoidalCylinder(5.0, 10.0, 15.0));
54 
55  add("FullSphere", new FormFactorFullSphere(5.0));
56 
57  add("FullSpheroid", new FormFactorFullSpheroid(5.0, 10.0));
58 
59  add("HemiEllipsoid", new FormFactorHemiEllipsoid(5.0, 10.0, 15.0));
60 
61  add("Icosahedron", new FormFactorIcosahedron(10.0));
62 
63  add("Prism3", new FormFactorPrism3(10.0, 5.0));
64 
65  add("Prism6", new FormFactorPrism6(2. / sqrt(3.) * 5.0, 5.0));
66 
67  add("Pyramid", new FormFactorPyramid(10.0, 5.0, Units::deg2rad(54.73)));
68 
69  add("CosineRippleBox", new FormFactorCosineRippleBox(100.0, 20.0, 4.0));
70 
71  add("SawtoothRippleBox", new FormFactorSawtoothRippleBox(100.0, 20.0, 4.0, 0.0));
72 
73  add("Tetrahedron", new FormFactorTetrahedron(10.0, 4.0, Units::deg2rad(54.73)));
74 
75  add("TruncatedCube", new FormFactorTruncatedCube(15.0, 6.0));
76 
77  add("TruncatedSphere", new FormFactorTruncatedSphere(5.0, 7.0, 0));
78 
79  add("TruncatedSpheroid", new FormFactorTruncatedSpheroid(5.0, 7.0, 1.0, 0));
80 }
Includes all particle-shape form-factor definitions.
Defines sample components for complex sample builders.
Defines some unit conversion factors and other constants in namespace Units.
Two-dimensional Cauchy distribution in Fourier space; corresponds to a normalized exp(-r) in real spa...
Two-dimensional cone distribution in Fourier space; corresponds to 1-r if r<1 (and 0 otherwise) in re...
Two-dimensional gate distribution in Fourier space; corresponds to normalized constant if r<1 (and 0 ...
Two-dimensional Gauss distribution in Fourier space; corresponds to normalized exp(-r^2/2) in real sp...
Two-dimensional Voigt distribution in Fourier space; corresponds to eta*Gauss + (1-eta)*Cauchy.
A frustum (truncated pyramid) with rectangular base.
A rectangular prism (parallelepiped).
Definition: FormFactorBox.h:24
A frustum (truncated pyramid) with regular hexagonal base.
A conical frustum (cone truncated parallel to the base) with circular base.
The form factor for a cosine ripple, with box profile in elongation direction.
A truncated bifrustum with quadratic base.
A circular cylinder.
A regular dodecahedron.
A dot, with scattering power as a sphere of radius rscat, but with F(q)=const.
Definition: FormFactorDot.h:24
A cylinder with elliptical base.
A full spheroid (an ellipsoid with two equal axes, hence with circular cross section)
An hemi ellipsoid, obtained by truncating a full ellipsoid in the middle plane spanned by two princip...
A regular icosahedron.
A prism based on an equilateral triangle.
A prism based on a regular hexagonal.
A frustum with a quadratic base.
The form factor for a cosine ripple, with box profile in elongation direction.
A frustum with equilateral trigonal base.
A cube, with tetrahedral truncation of all corners.
void add(const std::string &key, IFTDistribution2D *item)
Definition: IRegistry.h:51
double deg2rad(double angle)
Definition: Units.h:47