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

Description

Definition at line 127 of file InterferenceItems.h.

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

Public Member Functions

 InterferenceFinite2DLatticeItem ()
 
std::unique_ptr< IInterference > createInterference () const override
 
UIntDescriptor domainSize1 () const
 
UIntDescriptor domainSize2 () const
 
SelectionDescriptor< Lattice2DItem * > latticeType () const
 
DoubleDescriptor positionVariance () const
 
void serialize (Streamer &s) override
 
void setDomainSize1 (unsigned int domain_size1)
 
void setDomainSize2 (unsigned int domain_size2)
 
void setLatticeType (Lattice2DItem *p)
 
void setXiIntegration (bool xiIntegration)
 
bool xiIntegration () const
 

Protected Attributes

SelectionProperty< Lattice2DItem * > m_latticeType
 
DoubleProperty m_positionVariance
 
bool m_xiIntegration
 

Private Attributes

UIntProperty m_domainSize1
 
UIntProperty m_domainSize2
 

Constructor & Destructor Documentation

◆ InterferenceFinite2DLatticeItem()

InterferenceFinite2DLatticeItem::InterferenceFinite2DLatticeItem ( )

Definition at line 259 of file InterferenceItems.cpp.

261 {
262  m_domainSize1.init("Domain size 1", "Domain size 1 in number of unit cells", 100,
263  Unit::unitless, "size1");
264  m_domainSize2.init("Domain size 2", "Domain size 2 in number of unit cells", 100,
265  Unit::unitless, "size2");
266 }
@ unitless
Interference2DAbstractLatticeItem(bool xiIntegration)
void init(const QString &label, const QString &tooltip, uint value, const variant< QString, Unit > &unit, const QString &persistentTag)

References UIntProperty::init(), m_domainSize1, m_domainSize2, and unitless.

Here is the call graph for this function:

Member Function Documentation

◆ createInterference()

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

Implements InterferenceItem.

Definition at line 268 of file InterferenceItems.cpp.

269 {
270  Lattice2DItem* latticeItem = latticeType().currentItem();
271  auto result = std::make_unique<InterferenceFinite2DLattice>(*latticeItem->createLattice(),
273 
274  result->setIntegrationOverXi(xiIntegration());
275  result->setPositionVariance(positionVariance());
276 
277  return result;
278 }
SelectionDescriptor< Lattice2DItem * > latticeType() const
DoubleDescriptor positionVariance() const
virtual std::unique_ptr< Lattice2D > createLattice() const =0

References Lattice2DItem::createLattice(), Interference2DAbstractLatticeItem::latticeType(), m_domainSize1, m_domainSize2, InterferenceItem::positionVariance(), and Interference2DAbstractLatticeItem::xiIntegration().

Here is the call graph for this function:

◆ domainSize1()

UIntDescriptor InterferenceFinite2DLatticeItem::domainSize1 ( ) const

Definition at line 290 of file InterferenceItems.cpp.

291 {
292  return m_domainSize1;
293 }

References m_domainSize1.

◆ domainSize2()

UIntDescriptor InterferenceFinite2DLatticeItem::domainSize2 ( ) const

Definition at line 300 of file InterferenceItems.cpp.

301 {
302  return m_domainSize2;
303 }

References m_domainSize2.

◆ latticeType()

◆ positionVariance()

◆ serialize()

void InterferenceFinite2DLatticeItem::serialize ( Streamer s)
overridevirtual

Implements InterferenceItem.

Definition at line 280 of file InterferenceItems.cpp.

281 {
282  s.assertVersion(0);
284  Serialize::rwValue(s, "integrate", m_xiIntegration);
285  Serialize::rwSelected<Lattice2DItemCatalog>(s, m_latticeType);
288 }
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)
void rwValue(Streamer &s, const QString &tag, bool &val)
Definition: Serialize.cpp:19

References Streamer::assertVersion(), m_domainSize1, m_domainSize2, Interference2DAbstractLatticeItem::m_latticeType, InterferenceItem::m_positionVariance, Interference2DAbstractLatticeItem::m_xiIntegration, Serialize::rwProperty(), and Serialize::rwValue().

Here is the call graph for this function:

◆ setDomainSize1()

void InterferenceFinite2DLatticeItem::setDomainSize1 ( unsigned int  domain_size1)

Definition at line 295 of file InterferenceItems.cpp.

296 {
297  m_domainSize1.set(size);
298 }
void set(uint d)
Definition: UIntProperty.h:50

References m_domainSize1, and UIntProperty::set().

Here is the call graph for this function:

◆ setDomainSize2()

void InterferenceFinite2DLatticeItem::setDomainSize2 ( unsigned int  domain_size2)

Definition at line 305 of file InterferenceItems.cpp.

306 {
307  m_domainSize2.set(size);
308 }

References m_domainSize2, and UIntProperty::set().

Here is the call graph for this function:

◆ setLatticeType()

void Interference2DAbstractLatticeItem::setLatticeType ( Lattice2DItem p)
inherited

Definition at line 99 of file InterferenceItems.cpp.

100 {
101  m_latticeType.set(p);
102 }
void set(T t, bool callInitializer=false)
Directly set the new item.

References Interference2DAbstractLatticeItem::m_latticeType, and SelectionProperty< T >::set().

Here is the call graph for this function:

◆ setXiIntegration()

void Interference2DAbstractLatticeItem::setXiIntegration ( bool  xiIntegration)
inherited

Definition at line 109 of file InterferenceItems.cpp.

110 {
112 }

References Interference2DAbstractLatticeItem::m_xiIntegration, and Interference2DAbstractLatticeItem::xiIntegration().

Referenced by SampleEditorController::setIntegrateOverXi().

Here is the call graph for this function:

◆ xiIntegration()

Member Data Documentation

◆ m_domainSize1

UIntProperty InterferenceFinite2DLatticeItem::m_domainSize1
private

◆ m_domainSize2

UIntProperty InterferenceFinite2DLatticeItem::m_domainSize2
private

◆ m_latticeType

◆ m_positionVariance

◆ m_xiIntegration


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