42 return {+ainv * std::sin(xialpha), -ainv * std::cos(xialpha), -binv * std::sin(xi),
43 +binv * std::cos(xi)};
63 throw std::runtime_error(
64 "BasicLattice2D::BasicLattice2D() -> Error. Lattice length can't be "
89 throw std::runtime_error(
90 "SquareLattice2D::SquareLattice2D() -> Error. Lattice length can't be "
119 throw std::runtime_error(
"HexagonalLattice2D::HexagonalLattice2D() -> Error. "
120 "Lattice length can't be negative or zero.");
Defines M_PI and some more mathematical constants.
Defines classes of Lattice2D family.
Defines class RealLimits.
A two-dimensional Bravais lattice with no special symmetry.
double unitCellArea() const override
BasicLattice2D * clone() const override
BasicLattice2D(double length1, double length2, double angle, double xi)
A two-dimensional Bravais lattice with hexagonal symmetry.
double unitCellArea() const override
HexagonalLattice2D * clone() const override
double latticeAngle() const override
HexagonalLattice2D(double length, double xi)
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
virtual double length1() const =0
void setRotationEnabled(bool enabled)
static RealLimits positive()
Creates an object which can have only positive values (>0., zero is not included)
void check(const std::string &name, double value) const
Throws if value is outside limits. Parameter 'name' is for exception message.
A two-dimensional Bravais lattice with square unit cell.
double unitCellArea() const override
SquareLattice2D * clone() const override
double latticeAngle() const override
SquareLattice2D(double length, double xi=0.0)