BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ReMesocrystal.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Resample/Particle/ReMesocrystal.h
6 //! @brief Defines class ReMesocrystal.
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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef BORNAGAIN_RESAMPLE_PARTICLE_REMESOCRYSTAL_H
20 #define BORNAGAIN_RESAMPLE_PARTICLE_REMESOCRYSTAL_H
21 
24 
25 class ReParticle;
26 
27 //! A reprocessed MesoCrystal.
28 
29 class ReMesocrystal : public IReParticle {
30 public:
31  ReMesocrystal(const Lattice3D& lattice, const IReParticle& basis, const ReParticle& outer_shape,
32  double position_variance = 0.0);
33  ~ReMesocrystal() override;
34 
35  ReMesocrystal* clone() const override
36  {
38  }
39 
40  void setAmbientMaterial(const Material& material) override
41  {
42  m_basis->setAmbientMaterial(material);
43  }
44 
45  double volume() const override;
46  double radialExtension() const override;
47 
48  double bottomZ(const IRotation* rotation) const override;
49 
50  double topZ(const IRotation* rotation) const override;
51 
52  complex_t theFF(const WavevectorInfo& wavevectors) const override;
53  SpinMatrix thePolFF(const WavevectorInfo& wavevectors) const override;
54 
55 private:
57  complex_t debyeWallerFactor(const R3& q_i) const;
58 
61  ReParticle* m_outer_shape; //!< The outer shape of this mesocrystal
64 };
65 
66 #endif // BORNAGAIN_RESAMPLE_PARTICLE_REMESOCRYSTAL_H
Defines and implements interface IReParticle.
Defines class Lattice.
Abstract base class for reprocessed particles.
Definition: IReParticle.h:37
virtual void setAmbientMaterial(const Material &)
Passes the material in which this particle is embedded.
Definition: IReParticle.h:47
Abstract base class for rotations.
Definition: Rotations.h:29
A Bravais lattice, characterized by three basis vectors, and optionally an ISelectionRule.
Definition: Lattice3D.h:30
A wrapper for underlying material implementation.
Definition: Material.h:35
A reprocessed MesoCrystal.
Definition: ReMesocrystal.h:29
complex_t theFF(const WavevectorInfo &wavevectors) const override
Returns scattering amplitude for complex wavevectors ki, kf.
void calculateLargestReciprocalDistance()
double m_max_rec_length
Definition: ReMesocrystal.h:63
Lattice3D m_lattice
Definition: ReMesocrystal.h:59
double radialExtension() const override
Returns the (approximate in some cases) radial size of the particle of this form factor's shape....
double topZ(const IRotation *rotation) const override
Returns the z-coordinate of the lowest point in this shape after a given rotation.
double m_position_variance
Definition: ReMesocrystal.h:62
SpinMatrix thePolFF(const WavevectorInfo &wavevectors) const override
Returns scattering amplitude for matrix interactions.
double bottomZ(const IRotation *rotation) const override
Returns the z-coordinate of the lowest point in this shape after a given rotation.
complex_t debyeWallerFactor(const R3 &q_i) const
void setAmbientMaterial(const Material &material) override
Passes the material in which this particle is embedded.
Definition: ReMesocrystal.h:40
IReParticle * m_basis
Definition: ReMesocrystal.h:60
ReParticle * m_outer_shape
The outer shape of this mesocrystal.
Definition: ReMesocrystal.h:61
double volume() const override
Returns the total volume of the particle of this form factor's shape.
ReMesocrystal * clone() const override
Definition: ReMesocrystal.h:35
ReMesocrystal(const Lattice3D &lattice, const IReParticle &basis, const ReParticle &outer_shape, double position_variance=0.0)
~ReMesocrystal() override
A reprocessed simple particle, with shape m_ff.
Definition: ReParticle.h:33
Holds all wavevector information relevant for calculating form factors.