BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorSphereGaussianRadius.h
Go to the documentation of this file.
1
// ************************************************************************** //
2
//
3
// BornAgain: simulate and fit scattering at grazing incidence
4
//
5
//! @file Sample/SoftParticle/FormFactorSphereGaussianRadius.h
6
//! @brief Defines and implements class FormFactorSphereGaussianRadius.
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_SOFTPARTICLE_FORMFACTORSPHEREGAUSSIANRADIUS_H
16
#define BORNAGAIN_CORE_SOFTPARTICLE_FORMFACTORSPHEREGAUSSIANRADIUS_H
17
18
#include "
Sample/Scattering/IFormFactorBorn.h
"
19
#include <memory>
20
21
//! A sphere with gaussian radius distribution.
22
//! @ingroup softParticle
23
24
class
FormFactorSphereGaussianRadius
:
public
IFormFactorBorn
25
{
26
public
:
27
FormFactorSphereGaussianRadius
(
const
std::vector<double> P);
28
FormFactorSphereGaussianRadius
(
double
mean,
double
sigma);
29
30
FormFactorSphereGaussianRadius
*
clone
() const override final
31
{
32
return
new
FormFactorSphereGaussianRadius
(
m_mean
,
m_sigma
);
33
}
34
35
void
accept
(
INodeVisitor
* visitor)
const
override
final
{ visitor->visit(
this
); }
36
37
double
radialExtension
() const override final {
return
m_mean
; }
38
39
complex_t
evaluate_for_q
(
cvector_t
q)
const
override
final
;
40
41
protected
:
42
void
onChange
() override final;
43
44
private:
45
double
calculateMeanR3
() const;
46
47
const
double
&
m_mean
;
//!< This is the mean radius
48
const
double
&
m_sigma
;
49
double
m_mean_r3
;
//!< This is the radius that gives the mean volume
50
};
51
52
#endif
// BORNAGAIN_CORE_SOFTPARTICLE_FORMFACTORSPHEREGAUSSIANRADIUS_H
complex_t
std::complex< double > complex_t
Definition:
Complex.h:20
IFormFactorBorn.h
Defines pure virtual interface class IFormFactorBorn.
BasicVector3D< std::complex< double > >
FormFactorSphereGaussianRadius
A sphere with gaussian radius distribution.
Definition:
FormFactorSphereGaussianRadius.h:25
FormFactorSphereGaussianRadius::accept
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
Definition:
FormFactorSphereGaussianRadius.h:35
FormFactorSphereGaussianRadius::m_mean
const double & m_mean
This is the mean radius.
Definition:
FormFactorSphereGaussianRadius.h:47
FormFactorSphereGaussianRadius::m_sigma
const double & m_sigma
Definition:
FormFactorSphereGaussianRadius.h:48
FormFactorSphereGaussianRadius::m_mean_r3
double m_mean_r3
This is the radius that gives the mean volume.
Definition:
FormFactorSphereGaussianRadius.h:49
FormFactorSphereGaussianRadius::radialExtension
double radialExtension() const override final
Returns the (approximate in some cases) radial size of the particle of this form factor's shape.
Definition:
FormFactorSphereGaussianRadius.h:37
FormFactorSphereGaussianRadius::calculateMeanR3
double calculateMeanR3() const
Definition:
FormFactorSphereGaussianRadius.cpp:50
FormFactorSphereGaussianRadius::onChange
void onChange() override final
Action to be taken in inherited class when a parameter has changed.
Definition:
FormFactorSphereGaussianRadius.cpp:45
FormFactorSphereGaussianRadius::FormFactorSphereGaussianRadius
FormFactorSphereGaussianRadius(const std::vector< double > P)
Definition:
FormFactorSphereGaussianRadius.cpp:20
FormFactorSphereGaussianRadius::evaluate_for_q
complex_t evaluate_for_q(cvector_t q) const override final
Returns scattering amplitude for complex scattering wavevector q=k_i-k_f.
Definition:
FormFactorSphereGaussianRadius.cpp:37
FormFactorSphereGaussianRadius::clone
FormFactorSphereGaussianRadius * clone() const override final
Returns a clone of this ISample object.
Definition:
FormFactorSphereGaussianRadius.h:30
IFormFactorBorn
Pure virtual base class for Born form factors.
Definition:
IFormFactorBorn.h:32
INodeVisitor
Visitor interface to visit ISample objects.
Definition:
INodeVisitor.h:149
Sample
SoftParticle
FormFactorSphereGaussianRadius.h
Generated by
1.9.1