BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
InterferenceFunctionFinite3DLattice.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/Aggregate/InterferenceFunctionFinite3DLattice.h
6 //! @brief Defines class InterferenceFunctionFinite3DLattice.
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_INTERFERENCEFUNCTIONFINITE3DLATTICE_H
16 #define BORNAGAIN_CORE_AGGREGATE_INTERFERENCEFUNCTIONFINITE3DLATTICE_H
17 
19 #include "Sample/Lattice/Lattice.h"
20 
21 //! Interference function of a finite 3D lattice.
22 //! @ingroup interference
23 
25 {
26 public:
27  InterferenceFunctionFinite3DLattice(const Lattice& lattice, unsigned N_1, unsigned N_2,
28  unsigned N_3);
30 
31  InterferenceFunctionFinite3DLattice* clone() const override final;
32 
33  void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
34 
35  unsigned numberUnitCells1() const { return m_N_1; }
36  unsigned numberUnitCells2() const { return m_N_2; }
37  unsigned numberUnitCells3() const { return m_N_3; }
38 
39  const Lattice& lattice() const;
40 
41  bool supportsMultilayer() const override final { return false; }
42 
43  std::vector<const INode*> getChildren() const override final;
44 
45 private:
46  double iff_without_dw(const kvector_t q) const override final;
47  void setLattice(const Lattice& lattice);
48 
49  std::unique_ptr<Lattice> mP_lattice;
50  unsigned m_N_1, m_N_2, m_N_3; //!< Size of the finite lattice in lattice units
51 };
52 
53 #endif // BORNAGAIN_CORE_AGGREGATE_INTERFERENCEFUNCTIONFINITE3DLATTICE_H
Defines and implements the interface class IInterferenceFunction.
Defines class Lattice.
Pure virtual base class of interference functions.
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149
Interference function of a finite 3D lattice.
InterferenceFunctionFinite3DLattice(const Lattice &lattice, unsigned N_1, unsigned N_2, unsigned N_3)
bool supportsMultilayer() const override final
Indicates if this interference function can be used with a multilayer (DWBA mode)
double iff_without_dw(const kvector_t q) const override final
Calculates the structure factor without Debye-Waller factor.
std::vector< const INode * > getChildren() const override final
Returns a vector of children (const).
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
InterferenceFunctionFinite3DLattice * clone() const override final
Returns a clone of this ISample object.
unsigned m_N_3
Size of the finite lattice in lattice units.
A lattice with three basis vectors.
Definition: Lattice.h:28