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

Description

Definition at line 145 of file FormFactorItems.h.

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

Public Member Functions

 Bipyramid4Item ()
 
std::unique_ptr< IFormFactor > createFormFactor () const override
 
DoubleDescriptors geometryValues () const override
 
QVector< DoubleProperty * > serializationProperties () override
 
virtual void serialize (Streamer &s)
 

Constructor & Destructor Documentation

◆ Bipyramid4Item()

Bipyramid4Item::Bipyramid4Item ( )

Definition at line 108 of file FormFactorItems.cpp.

109 {
110  m_length.init("Length", "Side length of the common square base", 20.0, Unit::nanometer,
111  "length");
112 
113  m_height.init("Height", "Height of the lower pyramid", 13.0, Unit::nanometer, "height");
114 
115  m_heightRatio.init("Height ratio", "Ratio of heights of top to bottom pyramids", 0.7,
116  Unit::unitless, 3, RealLimits::lowerLimited(0.0), "heightRatio");
117 
118  m_alpha.init("Alpha", "Dihedral angle between base and facets", 60.0, Unit::degree, "alpha");
119 }
@ unitless
@ nanometer
@ degree

References degree, nanometer, and unitless.

Member Function Documentation

◆ createFormFactor()

std::unique_ptr< IFormFactor > Bipyramid4Item::createFormFactor ( ) const
overridevirtual

Implements FormFactorItem.

Definition at line 121 of file FormFactorItems.cpp.

122 {
123  return std::make_unique<Bipyramid4>(length(), height(), heightRatio(), alpha() * Units::deg);
124 }

◆ geometryValues()

DoubleDescriptors Bipyramid4Item::geometryValues ( ) const
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 155 of file FormFactorItems.h.

156  {
157  return {length(), height(), heightRatio(), alpha()};
158  }

◆ serializationProperties()

QVector<DoubleProperty*> Bipyramid4Item::serializationProperties ( )
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 159 of file FormFactorItems.h.

160  {
161  return {&m_length, &m_height, &m_heightRatio, &m_alpha};
162  }

◆ serialize()

void FormFactorItem::serialize ( Streamer s)
virtualinherited

Definition at line 473 of file FormFactorItems.cpp.

474 {
475  s.assertVersion(0);
476  for (auto* p : serializationProperties())
477  Serialize::rwProperty(s, *p);
478 }
virtual QVector< DoubleProperty * > serializationProperties()=0
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(), Serialize::rwProperty(), and FormFactorItem::serializationProperties().

Here is the call graph for this function:

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