BornAgain  1.19.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 reflection and scattering
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_SAMPLE_AGGREGATE_INTERFERENCEFUNCTIONFINITE3DLATTICE_H
16 #define BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCEFUNCTIONFINITE3DLATTICE_H
17 
20 
21 //! Interference function of a finite 3D lattice.
22 //! @ingroup interference
23 
25 public:
26  InterferenceFunctionFinite3DLattice(const Lattice3D& lattice, unsigned N_1, unsigned N_2,
27  unsigned N_3);
29 
31 
32  void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
33 
34  unsigned numberUnitCells1() const { return m_N_1; }
35  unsigned numberUnitCells2() const { return m_N_2; }
36  unsigned numberUnitCells3() const { return m_N_3; }
37 
38  const Lattice3D& lattice() const;
39 
40  bool supportsMultilayer() const override { return false; }
41 
42  std::vector<const INode*> getChildren() const override;
43 
44 private:
45  double iff_without_dw(const kvector_t q) const override;
46  void setLattice(const Lattice3D& lattice);
47 
48  std::unique_ptr<Lattice3D> m_lattice;
49  unsigned m_N_1, m_N_2, m_N_3; //!< Size of the finite lattice in lattice units
50 };
51 
52 #endif // BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCEFUNCTIONFINITE3DLATTICE_H
Defines and implements the interface class IInterferenceFunction.
Defines class Lattice.
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
Interference function of a finite 3D lattice.
double iff_without_dw(const kvector_t 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 multilayer (DWBA mode)
InterferenceFunctionFinite3DLattice * clone() const override
Returns a clone of this ISampleNode object.
InterferenceFunctionFinite3DLattice(const Lattice3D &lattice, unsigned N_1, unsigned N_2, unsigned N_3)
void accept(INodeVisitor *visitor) const override
Calls the INodeVisitor's visit method.
std::vector< const INode * > getChildren() const override
Returns a vector of children.
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:29