15 #ifndef BORNAGAIN_SAMPLE_LATTICE_LATTICE3D_H
16 #define BORNAGAIN_SAMPLE_LATTICE_LATTICE3D_H
19 #include <heinz/Vectors3D.h>
37 std::string
className() const final {
return "Lattice3D"; }
Base class for tree-like structures containing parameterized objects.
Abstract base class for selection rules.
A Bravais lattice, characterized by three basis vectors, and optionally an ISelectionRule.
I3 nearestReciprocalLatticeVectorCoordinates(R3 q) const
Returns the nearest reciprocal lattice point from a given vector.
Lattice3D rotated(const RotMatrix &rotMatrix) const
Creates rotated lattice.
double unitCellVolume() const
Returns the volume of the unit cell.
R3 basisVectorB() const
Returns basis vector b.
R3 m_rc
Cache of basis vectors in reciprocal space.
R3 getMillerDirection(double h, double k, double l) const
Returns normalized direction corresponding to the given Miller indices.
void computeReciprocalVectors() const
R3 basisVectorC() const
Returns basis vector c.
void setSelectionRule(const ISelectionRule &selection_rule)
Sets a selection rule for the reciprocal vectors.
R3 m_c
Basis vectors in real space.
R3 basisVectorA() const
Returns basis vector a.
std::unique_ptr< ISelectionRule > m_selection_rule
Lattice3D & operator=(const Lattice3D &)=delete
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
void reciprocalLatticeBasis(R3 &ra, R3 &rb, R3 &rc) const
Returns the reciprocal basis vectors.
std::vector< R3 > reciprocalLatticeVectorsWithinRadius(R3 q, double dq) const
Returns a list of reciprocal lattice vectors within distance dq of a vector q.
Lattice3D(R3 a, R3 b, R3 c)
Rotation matrix in three dimensions. Represents group SO(3). Internal parameterization based on quate...