BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
InterferenceHardDiskItem Class Reference

Description

Definition at line 145 of file InterferenceItems.h.

Inheritance diagram for InterferenceHardDiskItem:
[legend]
Collaboration diagram for InterferenceHardDiskItem:
[legend]

Public Member Functions

 InterferenceHardDiskItem ()
 
std::unique_ptr< IInterference > createInterference () const override
 
DoubleDescriptor density () const
 
DoubleDescriptor positionVariance () const
 
DoubleDescriptor radius () const
 
void serialize (Streamer &s) override
 

Protected Attributes

DoubleProperty m_positionVariance
 

Private Attributes

DoubleProperty m_density
 
DoubleProperty m_radius
 

Constructor & Destructor Documentation

◆ InterferenceHardDiskItem()

InterferenceHardDiskItem::InterferenceHardDiskItem ( )

Definition at line 312 of file InterferenceItems.cpp.

313 {
314  m_radius.init("Radius", "Hard disk radius", 5.0, Unit::nanometer, "radius");
315  m_density.init("Total particle density", "Particle density in particles per area", 0.002,
316  Unit::nanometerMinus2, "density");
317 }
@ nanometerMinus2
@ nanometer
void init(const QString &label, const QString &tooltip, double value, const variant< QString, Unit > &unit, const QString &persistentTag)

References DoubleProperty::init(), m_density, m_radius, nanometer, and nanometerMinus2.

Here is the call graph for this function:

Member Function Documentation

◆ createInterference()

std::unique_ptr< IInterference > InterferenceHardDiskItem::createInterference ( ) const
overridevirtual

Implements InterferenceItem.

Definition at line 319 of file InterferenceItems.cpp.

320 {
321  auto result = std::make_unique<InterferenceHardDisk>(m_radius, m_density);
322  result->setPositionVariance(positionVariance());
323  return std::unique_ptr<IInterference>(result.release());
324 }
DoubleDescriptor positionVariance() const

References m_density, m_radius, and InterferenceItem::positionVariance().

Here is the call graph for this function:

◆ density()

DoubleDescriptor InterferenceHardDiskItem::density ( ) const

Definition at line 334 of file InterferenceItems.cpp.

335 {
336  return m_density;
337 }

References m_density.

◆ positionVariance()

◆ radius()

DoubleDescriptor InterferenceHardDiskItem::radius ( ) const

Definition at line 339 of file InterferenceItems.cpp.

340 {
341  return m_radius;
342 }

References m_radius.

◆ serialize()

void InterferenceHardDiskItem::serialize ( Streamer s)
overridevirtual

Implements InterferenceItem.

Definition at line 326 of file InterferenceItems.cpp.

327 {
328  s.assertVersion(0);
332 }
void assertVersion(unsigned expectedVersion) const
As reader, throws DeserializationException unless the expected version is read. As writer,...
Definition: Streamer.cpp:26
void rwProperty(Streamer &s, DoubleProperty &d)

References Streamer::assertVersion(), m_density, InterferenceItem::m_positionVariance, m_radius, and Serialize::rwProperty().

Here is the call graph for this function:

Member Data Documentation

◆ m_density

DoubleProperty InterferenceHardDiskItem::m_density
private

◆ m_positionVariance

◆ m_radius

DoubleProperty InterferenceHardDiskItem::m_radius
private

The documentation for this class was generated from the following files: