BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
InterferenceFunction3DLattice.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/Aggregate/InterferenceFunction3DLattice.h
6 //! @brief Defines class InterferenceFunction3DLattice.
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_INTERFERENCEFUNCTION3DLATTICE_H
16 #define BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCEFUNCTION3DLATTICE_H
17 
20 
21 class IPeakShape;
22 
23 //! Interference function of a 3D lattice.
24 //! @ingroup interference
25 
27 public:
30 
31  InterferenceFunction3DLattice* clone() const override;
32 
33  void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
34 
35  void setPeakShape(const IPeakShape& peak_shape);
36 
37  const Lattice3D& lattice() const;
38 
39  bool supportsMultilayer() const override { return false; }
40 
41  std::vector<const INode*> getChildren() const override;
42 
43  void onChange() override;
44 
45 private:
46  double iff_without_dw(const kvector_t q) const override;
47  void initRecRadius();
48 
49  Lattice3D m_lattice; // TODO unique_ptr as in other InterferenceFunction%s
50  std::unique_ptr<IPeakShape> m_peak_shape;
51  double m_rec_radius; //!< radius in reciprocal space defining the nearest q vectors to use
52 };
53 
54 #endif // BORNAGAIN_SAMPLE_AGGREGATE_INTERFERENCEFUNCTION3DLATTICE_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
Abstract base class class that defines the peak shape of a Bragg peak.
Definition: IPeakShape.h:25
Interference function of a 3D lattice.
void accept(INodeVisitor *visitor) const override
Calls the INodeVisitor's visit method.
void setPeakShape(const IPeakShape &peak_shape)
double m_rec_radius
radius in reciprocal space defining the nearest q vectors to use
InterferenceFunction3DLattice * clone() const override
Returns a clone of this ISampleNode object.
void onChange() override
Action to be taken in inherited class when a parameter has changed.
std::vector< const INode * > getChildren() const override
Returns a vector of children.
~InterferenceFunction3DLattice() override
std::unique_ptr< IPeakShape > m_peak_shape
InterferenceFunction3DLattice(const Lattice3D &lattice)
bool supportsMultilayer() const override
Indicates if this interference function can be used with a multilayer (DWBA mode)
double iff_without_dw(const kvector_t q) const override
Calculates the structure factor without Debye-Waller factor.
A Bravais lattice, characterized by three basis vectors, and optionally an ISelectionRule.
Definition: Lattice3D.h:29