BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
InterferenceFinite3DLattice.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/Aggregate/InterferenceFinite3DLattice.h
6 //! @brief Defines class InterferenceFinite3DLattice.
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_INTERFERENCEFINITE3DLATTICE_H
16 #define BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCEFINITE3DLATTICE_H
17 
20 
21 //! Interference function of a finite 3D lattice.
22 //! @ingroup interference
23 
25 public:
26  InterferenceFinite3DLattice(const Lattice3D& lattice, unsigned N_1, unsigned N_2, unsigned N_3);
28 
29  InterferenceFinite3DLattice* clone() const override;
30  std::string className() const final { return "InterferenceFinite3DLattice"; }
31 
32  unsigned numberUnitCells1() const { return m_N_1; }
33  unsigned numberUnitCells2() const { return m_N_2; }
34  unsigned numberUnitCells3() const { return m_N_3; }
35 
36  const Lattice3D& lattice() const;
37 
38  bool supportsMultilayer() const override { return false; }
39 
40  std::vector<const INode*> nodeChildren() const override;
41 
42 private:
43  double iff_without_dw(R3 q) const override;
44  void setLattice(const Lattice3D& lattice);
45 
46  std::unique_ptr<Lattice3D> m_lattice;
47  unsigned m_N_1, m_N_2, m_N_3; //!< Size of the finite lattice in lattice units
48 };
49 
50 #endif // BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCEFINITE3DLATTICE_H
Defines and implements the interface class IInterference.
Defines class Lattice.
Abstract base class of interference functions.
Definition: IInterference.h:24
Interference function of a finite 3D lattice.
~InterferenceFinite3DLattice() override
InterferenceFinite3DLattice * clone() const override
InterferenceFinite3DLattice(const Lattice3D &lattice, unsigned N_1, unsigned N_2, unsigned N_3)
void setLattice(const Lattice3D &lattice)
double iff_without_dw(R3 q) const override
Calculates the structure factor without Debye-Waller factor.
bool supportsMultilayer() const override
Indicates if this interference function can be used with a sample (DWBA mode)
std::vector< const INode * > nodeChildren() const override
Returns all children.
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
std::unique_ptr< Lattice3D > m_lattice
unsigned m_N_3
Size of the finite lattice in lattice units.
A Bravais lattice, characterized by three basis vectors, and optionally an ISelectionRule.
Definition: Lattice3D.h:30