BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
InterferenceFunctionHardDisk.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/Aggregate/InterferenceFunctionHardDisk.h
6 //! @brief Defines class InterferenceFunctionHardDisk.
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_CORE_AGGREGATE_INTERFERENCEFUNCTIONHARDDISK_H
16 #define BORNAGAIN_CORE_AGGREGATE_INTERFERENCEFUNCTIONHARDDISK_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 {
29 public:
30  InterferenceFunctionHardDisk(double radius, double density, double position_var = 0);
31  ~InterferenceFunctionHardDisk() final = default;
32 
33  InterferenceFunctionHardDisk* clone() const override final;
34 
35  void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
36 
37  double getParticleDensity() const override final;
38 
39  double radius() const;
40  double density() const;
41 
42 private:
43  double iff_without_dw(const kvector_t q) const override final;
44  double packingRatio() const;
45  double integrand(double x) const;
46 
47  double m_radius;
48  double m_density;
49 
50  mutable double m_q, m_c_zero, m_s2, m_packing;
51 };
52 
53 #endif // BORNAGAIN_CORE_AGGREGATE_INTERFERENCEFUNCTIONHARDDISK_H
Defines and implements the interface class IInterferenceFunction.
Pure virtual base class of interference functions.
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149
Percus-Yevick hard disk interference function.
InterferenceFunctionHardDisk * clone() const override final
Returns a clone of this ISample object.
InterferenceFunctionHardDisk(double radius, double density, double position_var=0)
double iff_without_dw(const kvector_t q) const override final
Calculates the structure factor without Debye-Waller factor.
double getParticleDensity() const override final
If defined by this interference function's parameters, returns the particle density (per area).
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
~InterferenceFunctionHardDisk() final=default