BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
MesoCrystal.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/Particle/MesoCrystal.h
6 //! @brief Defines class MesoCrystal.
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_PARTICLE_MESOCRYSTAL_H
16 #define BORNAGAIN_SAMPLE_PARTICLE_MESOCRYSTAL_H
17 
19 
20 class Crystal;
21 
22 //! A particle with an internal structure of smaller particles.
23 //! @ingroup samples
24 
25 class MesoCrystal : public IParticle {
26 public:
27  MesoCrystal(const Crystal& particle_structure, const IFormFactor& form_factor);
28 
30  MesoCrystal* clone() const final;
31 
32  void accept(INodeVisitor* visitor) const final;
33 
34  SlicedParticle createSlicedParticle(ZLimits limits) const final;
35 
36  std::vector<const INode*> getChildren() const final;
37 
38 private:
39  MesoCrystal(Crystal* p_particle_structure, IFormFactor* p_form_factor);
40  void initialize();
41 
42  std::unique_ptr<Crystal> m_particle_structure; //!< Crystal structure
43  std::unique_ptr<IFormFactor> m_meso_form_factor; //!< Outer shape of this mesocrystal
44 };
45 
46 #endif // BORNAGAIN_SAMPLE_PARTICLE_MESOCRYSTAL_H
Defines interface IParticle.
A crystal structure, defined by a Bravais lattice, a basis, and a position variance.
Definition: Crystal.h:35
Abstract base class for all form factors.
Definition: IFormFactor.h:36
Visitor interface to visit ISampleNode objects.
Definition: INodeVisitor.h:146
Base class for tree-like structures containing parameterized objects.
Definition: INode.h:49
Abstract base class for Particle, ParticleComposition, ParticleCoreShell, MesoCrystal.
Definition: IParticle.h:33
A particle with an internal structure of smaller particles.
Definition: MesoCrystal.h:25
MesoCrystal * clone() const final
Returns a clone of this ISampleNode object.
Definition: MesoCrystal.cpp:30
void accept(INodeVisitor *visitor) const final
Calls the INodeVisitor's visit method.
Definition: MesoCrystal.cpp:41
std::unique_ptr< Crystal > m_particle_structure
Crystal structure.
Definition: MesoCrystal.h:42
std::vector< const INode * > getChildren() const final
Returns a vector of children.
Definition: MesoCrystal.cpp:67
std::unique_ptr< IFormFactor > m_meso_form_factor
Outer shape of this mesocrystal.
Definition: MesoCrystal.h:43
void initialize()
Definition: MesoCrystal.cpp:79
SlicedParticle createSlicedParticle(ZLimits limits) const final
Creates a sliced form factor for this particle.
Definition: MesoCrystal.cpp:46
MesoCrystal(const Crystal &particle_structure, const IFormFactor &form_factor)
Definition: MesoCrystal.cpp:22
Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.
Definition: ZLimits.h:45
Definition: filesystem.h:81
Struct that contains information on a sliced particle.