BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ReCoreShell.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Resample/Particle/ReCoreShell.cpp
6 //! @brief Implements class ReCoreShell.
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 
16 #include "Base/Spin/SpinMatrix.h"
17 #include "Base/Vector/WavevectorInfo.h" // debug
18 
20  : m_core(core)
21  , m_shell(shell)
22 {
23 }
24 
25 ReCoreShell::~ReCoreShell() = default;
26 
28 {
29  return new ReCoreShell(m_core->clone(), m_shell->clone());
30 }
31 
33 {
34  return m_shell->radialExtension();
35 }
36 
37 double ReCoreShell::bottomZ(const IRotation* rotation) const
38 {
39  return m_shell->bottomZ(rotation);
40 }
41 
42 double ReCoreShell::topZ(const IRotation* rotation) const
43 {
44  return m_shell->topZ(rotation);
45 }
46 
48 {
49  m_shell->setAmbientMaterial(material);
50 }
51 
52 complex_t ReCoreShell::theFF(const WavevectorInfo& wavevectors) const
53 {
54  return m_shell->theFF(wavevectors) + m_core->theFF(wavevectors);
55 }
56 
58 {
59  return m_shell->thePolFF(wavevectors) + m_core->thePolFF(wavevectors);
60 }
Defines class ReCoreShell.
Defines class SpinMatrix.
Defines WavevectorInfo.
Abstract base class for reprocessed particles.
Definition: IReParticle.h:37
Abstract base class for rotations.
Definition: Rotations.h:29
A wrapper for underlying material implementation.
Definition: Material.h:35
A reprocessed core shell particle.
Definition: ReCoreShell.h:29
complex_t theFF(const WavevectorInfo &wavevectors) const override
Returns scattering amplitude for complex wavevectors ki, kf.
Definition: ReCoreShell.cpp:52
double radialExtension() const override
Returns the (approximate in some cases) radial size of the particle of this form factor's shape....
Definition: ReCoreShell.cpp:32
double bottomZ(const IRotation *rotation) const override
Returns the z-coordinate of the lowest point in this shape after a given rotation.
Definition: ReCoreShell.cpp:37
~ReCoreShell() override
void setAmbientMaterial(const Material &material) override
Passes the material in which this particle is embedded.
Definition: ReCoreShell.cpp:47
ReCoreShell * clone() const override
Definition: ReCoreShell.cpp:27
std::unique_ptr< IReParticle > m_core
Definition: ReCoreShell.h:48
double topZ(const IRotation *rotation) const override
Returns the z-coordinate of the lowest point in this shape after a given rotation.
Definition: ReCoreShell.cpp:42
ReCoreShell(IReParticle *core, IReParticle *shell)
Definition: ReCoreShell.cpp:19
SpinMatrix thePolFF(const WavevectorInfo &wavevectors) const override
Returns scattering amplitude for matrix interactions.
Definition: ReCoreShell.cpp:57
std::unique_ptr< IReParticle > m_shell
Definition: ReCoreShell.h:49
Holds all wavevector information relevant for calculating form factors.