BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
InterferenceHardDisk.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/Aggregate/InterferenceHardDisk.h
6 //! @brief Defines class InterferenceHardDisk.
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_AGGREGATE_INTERFERENCEHARDDISK_H
16 #define BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCEHARDDISK_H
17 
19 
20 //! Percus-Yevick hard disk interference function.
21 //!
22 //! M.S. Ripoll & C.F. Tejero (1995) Approximate analytical expression for the direct correlation
23 //! function of hard discs within the Percus-Yevick equation, Molecular Physics, 85:2, 423-428,
24 //! DOI: 10.1080/00268979500101211
25 //! @ingroup interference
26 
28 public:
29  InterferenceHardDisk(double radius, double density, double position_var = 0);
30  ~InterferenceHardDisk() override = default;
31  std::vector<ParaMeta> parDefs() const final
32  {
33  return {{"Radius", "nm", "particle radius", 0, +INF, 0},
34  {"Density", "nm^-2", "particle density", 0, +INF, 0},
35  {"Variance", "nm?", "position variance", 0, +INF, 0}};
36  }
37 
38  InterferenceHardDisk* clone() const override;
39  std::string className() const final { return "InterferenceHardDisk"; }
40 
41  double particleDensity() const override;
42 
43  double radius() const;
44  double density() const;
45 
46 private:
47  double iff_without_dw(R3 q) const override;
48  double packingRatio() const;
49 
50  double m_radius;
51  double m_density;
52 };
53 
54 #endif // BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCEHARDDISK_H
Defines and implements the interface class IInterference.
const double INF
Definition: INode.h:26
Abstract base class of interference functions.
Definition: IInterference.h:24
Percus-Yevick hard disk interference function.
double iff_without_dw(R3 q) const override
Calculates the structure factor without Debye-Waller factor.
InterferenceHardDisk * clone() const override
InterferenceHardDisk(double radius, double density, double position_var=0)
~InterferenceHardDisk() override=default
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
double particleDensity() const override
If defined by this interference function's parameters, returns the particle density (per area)....
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.