BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Interference function of a 2D superlattice with a configurable interference function for each lattice site.
Definition at line 25 of file Interference2DSuperLattice.h.
Public Member Functions | |
Interference2DSuperLattice (const Lattice2D &lattice, unsigned size_1, unsigned size_2) | |
Interference2DSuperLattice (double length_1, double length_2, double alpha, double xi, unsigned size_1, unsigned size_2) | |
Constructor of two-dimensional interference function. More... | |
~Interference2DSuperLattice () override | |
void | checkNodeArgs () const |
Raises exception if a parameter value is invalid. More... | |
std::string | className () const final |
Returns the class name, to be hard-coded in each leaf class that inherits from INode. More... | |
Interference2DSuperLattice * | clone () const override |
unsigned | domainSize1 () const |
unsigned | domainSize2 () const |
double | DWfactor (R3 q) const |
structureFactors the Debye-Waller factor for a given wavevector transfer More... | |
bool | integrationOverXi () const |
const Lattice2D & | lattice () const |
std::vector< const INode * > | nodeChildren () const override |
Returns all children. More... | |
std::vector< const INode * > | nodeOffspring () const |
Returns all descendants. More... | |
std::vector< ParaMeta > | parDefs () const final |
Returns the parameter definitions, to be hard-coded in each leaf class. More... | |
virtual double | particleDensity () const |
If defined by this interference function's parameters, returns the particle density (per area). Otherwise, returns zero or a user-defined value. More... | |
double | positionVariance () const |
Returns the position variance. More... | |
void | setIntegrationOverXi (bool integrate_xi) |
void | setPositionVariance (double var) |
Sets the variance of the position for the calculation of the DW factor It is defined as the variance in each relevant dimension. More... | |
void | setSubstructureIFF (const IInterference &sub_iff) |
double | structureFactor (R3 q, double outer_iff=1.0) const override |
The interference function for a given wavevector transfer. More... | |
const IInterference & | substructureIFF () const |
virtual bool | supportsMultilayer () const |
Indicates if this interference function can be used with a sample (DWBA mode) More... | |
virtual void | transferToCPP () |
Used for Python overriding of clone (see swig/tweaks.py) More... | |
Protected Member Functions | |
double | iff_no_inner (R3 q, double outer_iff) const |
Calculates the structure factor in the absence of extra inner structure. More... | |
Protected Attributes | |
std::vector< double > | m_P |
double | m_position_var |
Private Member Functions | |
double | iff_without_dw (R3 q) const override |
Calculates the structure factor without Debye-Waller factor. More... | |
double | iff_without_dw (R3 q, double xi) const |
double | interferenceForXi (double xi, double qx, double qy, double outer_iff) const |
Private Attributes | |
bool | m_integrate_xi |
Integrate over the orientation xi. More... | |
std::unique_ptr< Lattice2D > | m_lattice |
unsigned | m_size_1 |
unsigned | m_size_2 |
Size of the finite lattice in lattice units. More... | |
std::unique_ptr< IInterference > | m_substructure |
IFF of substructure. More... | |
Interference2DSuperLattice::Interference2DSuperLattice | ( | const Lattice2D & | lattice, |
unsigned | size_1, | ||
unsigned | size_2 | ||
) |
Definition at line 24 of file Interference2DSuperLattice.cpp.
References Lattice2D::clone(), lattice(), m_lattice, and setSubstructureIFF().
Referenced by clone().
Interference2DSuperLattice::Interference2DSuperLattice | ( | double | length_1, |
double | length_2, | ||
double | alpha, | ||
double | xi, | ||
unsigned | size_1, | ||
unsigned | size_2 | ||
) |
Constructor of two-dimensional interference function.
length_1 | length of first lattice vector in nanometers |
length_2 | length of second lattice vector in nanometers |
alpha | angle between lattice vectors in radians |
xi | rotation of lattice with respect to x-axis (beam direction) in radians |
size_1 | correlation length in direction 1 |
size_2 | correlation length in direction 2 |
Definition at line 43 of file Interference2DSuperLattice.cpp.
|
overridedefault |
|
inherited |
Raises exception if a parameter value is invalid.
Definition at line 27 of file INode.cpp.
References ASSERT, RealLimits::check(), INode::className(), INF, RealLimits::limited(), RealLimits::limitless(), INode::m_P, ParaMeta::name, RealLimits::nonnegative(), INode::parDefs(), ParaMeta::vMax, and ParaMeta::vMin.
Referenced by BarGauss::BarGauss(), BarLorentz::BarLorentz(), Bipyramid4::Bipyramid4(), Box::Box(), CantellatedCube::CantellatedCube(), Cone::Cone(), ConstantBackground::ConstantBackground(), CosineRippleBox::CosineRippleBox(), CosineRippleGauss::CosineRippleGauss(), CosineRippleLorentz::CosineRippleLorentz(), Cylinder::Cylinder(), DistributionCosine::DistributionCosine(), DistributionGate::DistributionGate(), DistributionGaussian::DistributionGaussian(), DistributionLogNormal::DistributionLogNormal(), DistributionLorentz::DistributionLorentz(), DistributionTrapezoid::DistributionTrapezoid(), Dodecahedron::Dodecahedron(), EllipsoidalCylinder::EllipsoidalCylinder(), FootprintGauss::FootprintGauss(), FootprintSquare::FootprintSquare(), FuzzySphere::FuzzySphere(), GaussSphere::GaussSphere(), HemiEllipsoid::HemiEllipsoid(), HollowSphere::HollowSphere(), HorizontalCylinder::HorizontalCylinder(), Icosahedron::Icosahedron(), LongBoxGauss::LongBoxGauss(), LongBoxLorentz::LongBoxLorentz(), PlatonicOctahedron::PlatonicOctahedron(), PlatonicTetrahedron::PlatonicTetrahedron(), Prism3::Prism3(), Prism6::Prism6(), Profile1DCauchy::Profile1DCauchy(), Profile1DCosine::Profile1DCosine(), Profile1DGate::Profile1DGate(), Profile1DGauss::Profile1DGauss(), Profile1DTriangle::Profile1DTriangle(), Profile1DVoigt::Profile1DVoigt(), Profile2DCauchy::Profile2DCauchy(), Profile2DCone::Profile2DCone(), Profile2DGate::Profile2DGate(), Profile2DGauss::Profile2DGauss(), Profile2DVoigt::Profile2DVoigt(), Pyramid2::Pyramid2(), Pyramid3::Pyramid3(), Pyramid4::Pyramid4(), Pyramid6::Pyramid6(), RotationEuler::RotationEuler(), RotationX::RotationX(), RotationY::RotationY(), RotationZ::RotationZ(), SawtoothRippleBox::SawtoothRippleBox(), SawtoothRippleGauss::SawtoothRippleGauss(), SawtoothRippleLorentz::SawtoothRippleLorentz(), Sphere::Sphere(), Spheroid::Spheroid(), TruncatedCube::TruncatedCube(), TruncatedSphere::TruncatedSphere(), and TruncatedSpheroid::TruncatedSpheroid().
|
inlinefinalvirtual |
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
Implements INode.
Definition at line 33 of file Interference2DSuperLattice.h.
|
overridevirtual |
Implements IInterference.
Definition at line 52 of file Interference2DSuperLattice.cpp.
References Interference2DSuperLattice(), integrationOverXi(), m_lattice, IInterference::m_position_var, m_size_1, m_size_2, and m_substructure.
|
inline |
|
inline |
|
inherited |
structureFactors the Debye-Waller factor for a given wavevector transfer
Definition at line 48 of file IInterference.cpp.
References IInterference::m_position_var, and IInterference::supportsMultilayer().
Referenced by IInterference::iff_no_inner(), and interferenceForXi().
|
protectedinherited |
Calculates the structure factor in the absence of extra inner structure.
Definition at line 56 of file IInterference.cpp.
References IInterference::DWfactor(), and IInterference::iff_without_dw().
Referenced by IInterference::structureFactor().
|
overrideprivatevirtual |
Calculates the structure factor without Debye-Waller factor.
Implements IInterference.
Definition at line 100 of file Interference2DSuperLattice.cpp.
References ASSERT.
Referenced by interferenceForXi().
|
private |
Definition at line 105 of file Interference2DSuperLattice.cpp.
References Math::Laue(), m_lattice, m_size_1, and m_size_2.
|
inline |
Definition at line 50 of file Interference2DSuperLattice.h.
References m_integrate_xi.
Referenced by clone().
|
private |
Definition at line 119 of file Interference2DSuperLattice.cpp.
References IInterference::DWfactor(), iff_without_dw(), m_lattice, and m_substructure.
Referenced by structureFactor().
const Lattice2D & Interference2DSuperLattice::lattice | ( | ) | const |
Definition at line 87 of file Interference2DSuperLattice.cpp.
References m_lattice.
Referenced by Interference2DSuperLattice().
|
overridevirtual |
Returns all children.
Reimplemented from INode.
Definition at line 95 of file Interference2DSuperLattice.cpp.
References m_lattice, and m_substructure.
|
inherited |
Returns all descendants.
Definition at line 61 of file INode.cpp.
References INode::nodeChildren().
|
inlinefinalvirtual |
Returns the parameter definitions, to be hard-coded in each leaf class.
Reimplemented from INode.
Definition at line 34 of file Interference2DSuperLattice.h.
References INF.
|
inlinevirtualinherited |
If defined by this interference function's parameters, returns the particle density (per area). Otherwise, returns zero or a user-defined value.
Reimplemented in InterferenceHardDisk, InterferenceFinite2DLattice, Interference2DParaCrystal, and Interference2DLattice.
Definition at line 44 of file IInterference.h.
|
inlineinherited |
Returns the position variance.
Definition at line 40 of file IInterference.h.
References IInterference::m_position_var.
void Interference2DSuperLattice::setIntegrationOverXi | ( | bool | integrate_xi | ) |
Definition at line 81 of file Interference2DSuperLattice.cpp.
References m_integrate_xi, and m_lattice.
|
inherited |
Sets the variance of the position for the calculation of the DW factor It is defined as the variance in each relevant dimension.
Definition at line 40 of file IInterference.cpp.
References IInterference::m_position_var.
Referenced by ExemplarySamples::createFiniteSquareLattice2D(), and ExemplarySamples::createSuperLattice().
void Interference2DSuperLattice::setSubstructureIFF | ( | const IInterference & | sub_iff | ) |
Definition at line 61 of file Interference2DSuperLattice.cpp.
References IInterference::clone(), and m_substructure.
Referenced by Interference2DSuperLattice(), and ExemplarySamples::createSuperLattice().
|
overridevirtual |
The interference function for a given wavevector transfer.
Reimplemented from IInterference.
Definition at line 71 of file Interference2DSuperLattice.cpp.
References RealIntegrator::integrate(), interferenceForXi(), m_integrate_xi, m_lattice, and M_TWOPI.
const IInterference & Interference2DSuperLattice::substructureIFF | ( | ) | const |
Definition at line 66 of file Interference2DSuperLattice.cpp.
References m_substructure.
|
inlinevirtualinherited |
Indicates if this interference function can be used with a sample (DWBA mode)
Reimplemented in InterferenceFinite3DLattice, and Interference3DLattice.
Definition at line 47 of file IInterference.h.
Referenced by IInterference::DWfactor().
|
inlinevirtualinherited |
Used for Python overriding of clone (see swig/tweaks.py)
Definition at line 32 of file ICloneable.h.
|
private |
Integrate over the orientation xi.
Definition at line 62 of file Interference2DSuperLattice.h.
Referenced by integrationOverXi(), setIntegrationOverXi(), and structureFactor().
|
private |
Definition at line 63 of file Interference2DSuperLattice.h.
Referenced by Interference2DSuperLattice(), clone(), iff_without_dw(), interferenceForXi(), lattice(), nodeChildren(), setIntegrationOverXi(), and structureFactor().
|
protectedinherited |
Definition at line 63 of file INode.h.
Referenced by IFootprintFactor::IFootprintFactor(), INode::checkNodeArgs(), IProfile1D::pythonConstructor(), IProfile2D::pythonConstructor(), IFormFactor::pythonConstructor(), Profile1DVoigt::pythonConstructor(), and Profile2DVoigt::pythonConstructor().
|
protectedinherited |
Definition at line 53 of file IInterference.h.
Referenced by IInterference::IInterference(), Interference1DLattice::clone(), Interference2DLattice::clone(), Interference2DParaCrystal::clone(), clone(), Interference3DLattice::clone(), InterferenceFinite2DLattice::clone(), InterferenceFinite3DLattice::clone(), InterferenceHardDisk::clone(), InterferenceNone::clone(), InterferenceRadialParaCrystal::clone(), InterferenceTwin::clone(), IInterference::DWfactor(), IInterference::positionVariance(), and IInterference::setPositionVariance().
|
private |
Definition at line 65 of file Interference2DSuperLattice.h.
Referenced by clone(), domainSize1(), and iff_without_dw().
|
private |
Size of the finite lattice in lattice units.
Definition at line 65 of file Interference2DSuperLattice.h.
Referenced by clone(), domainSize2(), and iff_without_dw().
|
private |
IFF of substructure.
Definition at line 64 of file Interference2DSuperLattice.h.
Referenced by clone(), interferenceForXi(), nodeChildren(), setSubstructureIFF(), and substructureIFF().