15 #ifndef BORNAGAIN_SAMPLE_LATTICE_LATTICE2D_H
16 #define BORNAGAIN_SAMPLE_LATTICE_LATTICE2D_H
25 Lattice2D(
const std::vector<double>& PValues);
56 std::string
className() const final {
return "BasicLattice2D"; }
57 std::vector<ParaMeta>
parDefs() const final
59 return {{
"Length1",
"nm",
"lattice constant 1", 0, +
INF, 0},
60 {
"Length2",
"nm",
"lattice constant 2", 0, +
INF, 0},
61 {
"Alpha",
"rad",
"angle between lattice vectors 1 and 2", -
INF, +
INF, 0}};
81 std::string
className() const final {
return "SquareLattice2D"; }
82 std::vector<ParaMeta>
parDefs() const final
84 return {{
"Length",
"nm",
"lattice constant", 0, +
INF, 0}};
103 std::string
className() const final {
return "HexagonalLattice2D"; }
106 return {{
"Length",
"nm",
"lattice constant", 0, +
INF, 0},
107 {
"Xi",
"rad",
"angle between x axis and lattice vector", -
INF, +
INF, 0}};
Defines and implements the standard mix-in ICloneable.
A two-dimensional Bravais lattice with no special symmetry.
double latticeAngle() const override
double unitCellArea() const override
double length1() const override
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
BasicLattice2D * clone() const override
double length2() const override
BasicLattice2D(double length1, double length2, double angle, double xi)
A two-dimensional Bravais lattice with hexagonal symmetry.
double length2() const override
double length1() const override
double unitCellArea() const override
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
HexagonalLattice2D * clone() const override
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
double latticeAngle() const override
HexagonalLattice2D(double length, double xi)
Interface for polymorphic classes that should not be copied, except by explicit cloning.
Base class for tree-like structures containing parameterized objects.
A two-dimensional Bravais lattice.
double rotationAngle() const
ReciprocalBases reciprocalBases() const
virtual double latticeAngle() const =0
Lattice2D(const std::vector< double > &PValues)
virtual double length2() const =0
Lattice2D * clone() const override=0
virtual double length1() const =0
void setRotationEnabled(bool enabled)
virtual double unitCellArea() const =0
A two-dimensional Bravais lattice with square unit cell.
double unitCellArea() const override
double length2() const override
SquareLattice2D * clone() const override
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
double latticeAngle() const override
double length1() const override
SquareLattice2D(double length, double xi=0.0)
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
double m_asy
x,y coordinates of a*
double m_bsy
x,y coordinates of b*