BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
A Bravais lattice, characterized by three basis vectors, and optionally an ISelectionRule.
Definition at line 30 of file Lattice3D.h.
Public Member Functions | |
Lattice3D (const Lattice3D &lattice) | |
Lattice3D (R3 a, R3 b, R3 c) | |
~Lattice3D () override | |
R3 | basisVectorA () const |
Returns basis vector a. More... | |
R3 | basisVectorB () const |
Returns basis vector b. More... | |
R3 | basisVectorC () const |
Returns basis vector c. More... | |
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... | |
R3 | getMillerDirection (double h, double k, double l) const |
Returns normalized direction corresponding to the given Miller indices. More... | |
I3 | nearestReciprocalLatticeVectorCoordinates (R3 q) const |
Returns the nearest reciprocal lattice point from a given vector. More... | |
virtual std::vector< const INode * > | nodeChildren () const |
Returns all children. More... | |
std::vector< const INode * > | nodeOffspring () const |
Returns all descendants. More... | |
Lattice3D & | operator= (const Lattice3D &)=delete |
virtual std::vector< ParaMeta > | parDefs () const |
Returns the parameter definitions, to be hard-coded in each leaf class. More... | |
void | reciprocalLatticeBasis (R3 &ra, R3 &rb, R3 &rc) const |
Returns the reciprocal basis vectors. More... | |
std::vector< R3 > | reciprocalLatticeVectorsWithinRadius (R3 q, double dq) const |
Returns a list of reciprocal lattice vectors within distance dq of a vector q. More... | |
Lattice3D | rotated (const RotMatrix &rotMatrix) const |
Creates rotated lattice. More... | |
void | setSelectionRule (const ISelectionRule &selection_rule) |
Sets a selection rule for the reciprocal vectors. More... | |
double | unitCellVolume () const |
Returns the volume of the unit cell. More... | |
Protected Attributes | |
std::vector< double > | m_P |
Private Member Functions | |
void | computeReciprocalVectors () const |
Private Attributes | |
R3 | m_a |
R3 | m_b |
R3 | m_c |
Basis vectors in real space. More... | |
R3 | m_ra |
R3 | m_rb |
R3 | m_rc |
Cache of basis vectors in reciprocal space. More... | |
std::unique_ptr< ISelectionRule > | m_selection_rule |
Lattice3D::Lattice3D | ( | R3 | a, |
R3 | b, | ||
R3 | c | ||
) |
Definition at line 21 of file Lattice3D.cpp.
References computeReciprocalVectors().
Lattice3D::Lattice3D | ( | const Lattice3D & | lattice | ) |
Definition at line 29 of file Lattice3D.cpp.
References m_selection_rule, and setSelectionRule().
|
overridedefault |
|
inline |
Returns basis vector a.
Definition at line 43 of file Lattice3D.h.
References m_a.
Referenced by Interference3DLattice::Interference3DLattice(), and ReMesocrystal::calculateLargestReciprocalDistance().
|
inline |
Returns basis vector b.
Definition at line 46 of file Lattice3D.h.
References m_b.
Referenced by Interference3DLattice::Interference3DLattice(), and ReMesocrystal::calculateLargestReciprocalDistance().
|
inline |
Returns basis vector c.
Definition at line 49 of file Lattice3D.h.
References m_c.
Referenced by Interference3DLattice::Interference3DLattice(), and ReMesocrystal::calculateLargestReciprocalDistance().
|
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 37 of file Lattice3D.h.
|
private |
Definition at line 99 of file Lattice3D.cpp.
References m_a, m_b, m_c, m_ra, m_rb, m_rc, and M_TWOPI.
Referenced by Lattice3D().
R3 Lattice3D::getMillerDirection | ( | double | h, |
double | k, | ||
double | l | ||
) | const |
I3 Lattice3D::nearestReciprocalLatticeVectorCoordinates | ( | R3 | q | ) | const |
Returns the nearest reciprocal lattice point from a given vector.
Definition at line 69 of file Lattice3D.cpp.
References m_a, m_b, m_c, and M_TWOPI.
Referenced by reciprocalLatticeVectorsWithinRadius().
|
virtualinherited |
Returns all children.
Reimplemented in ISimulation2D, ISimulation, ParticleCoreShell, ParticleComposition, Particle, MesoCrystal, IParticle, Crystal, MultiLayer, Layer, LayerInterface, ParticleLayout, InterferenceRadialParaCrystal, InterferenceFinite3DLattice, InterferenceFinite2DLattice, Interference3DLattice, Interference2DSuperLattice, Interference2DParaCrystal, Interference2DLattice, Interference1DLattice, ConvolutionDetectorResolution, IDetector, and Beam.
Definition at line 56 of file INode.cpp.
Referenced by NodeUtils::AllDescendantsOfType(), NodeUtils::ChildNodesOfType(), ISampleNode::containedMaterials(), and INode::nodeOffspring().
|
inherited |
Returns all descendants.
Definition at line 61 of file INode.cpp.
References INode::nodeChildren().
|
inlinevirtualinherited |
Returns the parameter definitions, to be hard-coded in each leaf class.
Reimplemented in ConstantBackground, GaussSphere, FuzzySphere, RotationEuler, RotationZ, RotationY, RotationX, Crystal, Layer, HexagonalLattice2D, SquareLattice2D, BasicLattice2D, LayerRoughness, TruncatedSpheroid, TruncatedSphere, TruncatedCube, Spheroid, Sphere, SawtoothRippleLorentz, SawtoothRippleGauss, SawtoothRippleBox, Pyramid6, Pyramid4, Pyramid3, Pyramid2, Prism6, Prism3, PlatonicTetrahedron, PlatonicOctahedron, LongBoxLorentz, LongBoxGauss, Icosahedron, HorizontalCylinder, HollowSphere, HemiEllipsoid, EllipsoidalCylinder, Dodecahedron, Cylinder, CosineRippleLorentz, CosineRippleGauss, CosineRippleBox, Cone, CantellatedCube, Box, Bipyramid4, BarLorentz, BarGauss, Profile2DVoigt, Profile2DCone, Profile2DGate, Profile2DGauss, Profile2DCauchy, Profile1DVoigt, Profile1DCosine, Profile1DTriangle, Profile1DGate, Profile1DGauss, Profile1DCauchy, MisesGaussPeakShape, MisesFisherGaussPeakShape, LorentzFisherPeakShape, GaussFisherPeakShape, IsotropicLorentzPeakShape, IsotropicGaussPeakShape, ParticleLayout, InterferenceTwin, InterferenceRadialParaCrystal, InterferenceHardDisk, Interference2DSuperLattice, Interference2DParaCrystal, Interference1DLattice, DistributionTrapezoid, DistributionCosine, DistributionLogNormal, DistributionGaussian, DistributionLorentz, DistributionGate, ResolutionFunction2DGaussian, PolFilter, FootprintSquare, and FootprintGauss.
Definition at line 51 of file INode.h.
Referenced by INode::checkNodeArgs(), and IFormFactor::pythonConstructor().
void Lattice3D::reciprocalLatticeBasis | ( | R3 & | ra, |
R3 & | rb, | ||
R3 & | rc | ||
) | const |
std::vector< R3 > Lattice3D::reciprocalLatticeVectorsWithinRadius | ( | R3 | q, |
double | dq | ||
) | const |
Returns a list of reciprocal lattice vectors within distance dq of a vector q.
Definition at line 75 of file Lattice3D.cpp.
References m_a, m_b, m_c, m_ra, m_rb, m_rc, m_selection_rule, M_TWOPI, and nearestReciprocalLatticeVectorCoordinates().
Referenced by Interference3DLattice::iff_without_dw(), ReMesocrystal::theFF(), and ReMesocrystal::thePolFF().
Creates rotated lattice.
Definition at line 38 of file Lattice3D.cpp.
References m_a, m_b, m_c, m_selection_rule, setSelectionRule(), and RotMatrix::transformed().
void Lattice3D::setSelectionRule | ( | const ISelectionRule & | selection_rule | ) |
Sets a selection rule for the reciprocal vectors.
Definition at line 109 of file Lattice3D.cpp.
References ISelectionRule::clone(), and m_selection_rule.
Referenced by Lattice3D(), and rotated().
double Lattice3D::unitCellVolume | ( | ) | const |
Returns the volume of the unit cell.
Definition at line 56 of file Lattice3D.cpp.
Referenced by Compute::Slicing::createParticleInSlice(), ReMesocrystal::theFF(), and ReMesocrystal::thePolFF().
|
private |
Definition at line 72 of file Lattice3D.h.
Referenced by basisVectorA(), computeReciprocalVectors(), nearestReciprocalLatticeVectorCoordinates(), reciprocalLatticeVectorsWithinRadius(), rotated(), and unitCellVolume().
|
private |
Definition at line 72 of file Lattice3D.h.
Referenced by basisVectorB(), computeReciprocalVectors(), nearestReciprocalLatticeVectorCoordinates(), reciprocalLatticeVectorsWithinRadius(), rotated(), and unitCellVolume().
|
private |
Basis vectors in real space.
Definition at line 72 of file Lattice3D.h.
Referenced by basisVectorC(), computeReciprocalVectors(), nearestReciprocalLatticeVectorCoordinates(), reciprocalLatticeVectorsWithinRadius(), rotated(), and unitCellVolume().
|
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().
|
mutableprivate |
Definition at line 75 of file Lattice3D.h.
Referenced by computeReciprocalVectors(), getMillerDirection(), reciprocalLatticeBasis(), and reciprocalLatticeVectorsWithinRadius().
|
private |
Definition at line 75 of file Lattice3D.h.
Referenced by computeReciprocalVectors(), getMillerDirection(), reciprocalLatticeBasis(), and reciprocalLatticeVectorsWithinRadius().
|
private |
Cache of basis vectors in reciprocal space.
Definition at line 75 of file Lattice3D.h.
Referenced by computeReciprocalVectors(), getMillerDirection(), reciprocalLatticeBasis(), and reciprocalLatticeVectorsWithinRadius().
|
private |
Definition at line 73 of file Lattice3D.h.
Referenced by Lattice3D(), reciprocalLatticeVectorsWithinRadius(), rotated(), and setSelectionRule().