BornAgain  1.18.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 scattering at grazing incidence
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_CORE_PARTICLE_MESOCRYSTAL_H
16 #define BORNAGAIN_CORE_PARTICLE_MESOCRYSTAL_H
17 
19 
21 
22 //! A particle with an internal structure of smaller particles.
23 //! @ingroup samples
24 
25 class MesoCrystal : public IParticle
26 {
27 public:
28  MesoCrystal(const IClusteredParticles& particle_structure, const IFormFactor& form_factor);
29 
31  MesoCrystal* clone() const override final;
32 
33  void accept(INodeVisitor* visitor) const override final;
34 
35  SlicedParticle createSlicedParticle(ZLimits limits) const override final;
36 
37  std::vector<const INode*> getChildren() const override final;
38 
39 private:
40  MesoCrystal(IClusteredParticles* p_particle_structure, IFormFactor* p_form_factor);
41  void initialize();
42 
43  std::unique_ptr<IClusteredParticles> mp_particle_structure; //!< Crystal structure
44  std::unique_ptr<IFormFactor> mp_meso_form_factor; //!< Outer shape of this mesocrystal
45 };
46 
47 #endif // BORNAGAIN_CORE_PARTICLE_MESOCRYSTAL_H
Defines interface IParticle.
An ordered assembly of particles.
Pure virtual base class for all form factors.
Definition: IFormFactor.h:40
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149
Base class for tree-like structures containing parameterized objects.
Definition: INode.h:49
Pure virtual base class for Particle, ParticleComposition, ParticleCoreShell, MesoCrystal.
Definition: IParticle.h:33
A particle with an internal structure of smaller particles.
Definition: MesoCrystal.h:26
std::unique_ptr< IClusteredParticles > mp_particle_structure
Crystal structure.
Definition: MesoCrystal.h:43
MesoCrystal * clone() const override final
Returns a clone of this ISample object.
Definition: MesoCrystal.cpp:30
MesoCrystal(const IClusteredParticles &particle_structure, const IFormFactor &form_factor)
Definition: MesoCrystal.cpp:21
SlicedParticle createSlicedParticle(ZLimits limits) const override final
Creates a sliced form factor for this particle.
Definition: MesoCrystal.cpp:46
std::vector< const INode * > getChildren() const override final
Returns a vector of children (const).
Definition: MesoCrystal.cpp:67
std::unique_ptr< IFormFactor > mp_meso_form_factor
Outer shape of this mesocrystal.
Definition: MesoCrystal.h:44
void initialize()
Definition: MesoCrystal.cpp:79
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
Definition: MesoCrystal.cpp:41
Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.
Definition: ZLimits.h:41
Struct that contains information on a sliced particle.