BornAgain  1.19.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 reflection and scattering
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_SAMPLE_AGGREGATE_INTERFERENCEFUNCTIONHARDDISK_H
16 #define BORNAGAIN_SAMPLE_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 public:
29  InterferenceFunctionHardDisk(double radius, double density, double position_var = 0);
30  ~InterferenceFunctionHardDisk() override = default;
31 
32  InterferenceFunctionHardDisk* clone() const override;
33 
34  void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
35 
36  double getParticleDensity() const override;
37 
38  double radius() const;
39  double density() const;
40 
41 private:
42  double iff_without_dw(const kvector_t q) const override;
43  double packingRatio() const;
44  double integrand(double x) const;
45 
46  double m_radius;
47  double m_density;
48 
49  mutable double m_q, m_c_zero, m_s2, m_packing;
50 };
51 
52 #endif // BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCEFUNCTIONHARDDISK_H
Defines and implements the interface class IInterferenceFunction.
Abstract base class of interference functions.
Visitor interface to visit ISampleNode objects.
Definition: INodeVisitor.h:146
virtual void visit(const BasicLattice2D *)
Definition: INodeVisitor.h:151
Percus-Yevick hard disk interference function.
InterferenceFunctionHardDisk * clone() const override
Returns a clone of this ISampleNode object.
double iff_without_dw(const kvector_t q) const override
Calculates the structure factor without Debye-Waller factor.
InterferenceFunctionHardDisk(double radius, double density, double position_var=0)
double getParticleDensity() const override
If defined by this interference function's parameters, returns the particle density (per area).
~InterferenceFunctionHardDisk() override=default
void accept(INodeVisitor *visitor) const override
Calls the INodeVisitor's visit method.