7#ifndef gbLAB_RationalLatticeDirection_cpp_
8#define gbLAB_RationalLatticeDirection_cpp_
43 return dir.cartesian() * rat.asDouble();
50 return rat * dir.dot(other);
71 assert(&dir.lattice == &other.
dir.lattice &&
"Rational Lattice Vector Type belong to different Lattices.");
73 const VectorDimI temp(rat.n * other.
rat.d * dir.latticeVector() + other.
rat.n * rat.d * other.
dir.latticeVector());
83 assert(&dir.lattice == &other.
dir.lattice &&
"ReciprocalLatticeVectorType belong to different Lattices.");
85 const VectorDimI temp(rat.n * other.
rat.d * dir.latticeVector() - other.
rat.n * rat.d * other.
dir.latticeVector());
95 assert(&dir.lattice == &other.
lattice &&
"ReciprocalLatticeVectorType belong to different Lattices.");
104 assert(&dir.lattice == &other.
lattice &&
"ReciprocalLatticeVectorType belong to different Lattices.");
114 return dir.latticeVector().squaredNorm() * std::pow(rat.asDouble(), 2);
123 template struct RationalLatticeDirection<1>;
const Lattice< dim > & lattice
OperatorSum< E1, E2, dim > operator+(const Operator< E1, dim > &u, const Operator< E2, dim > &v)
LatticeVector< dim > operator*(const typename LatticeVector< dim >::IntScalarType &scalar, const LatticeVector< dim > &L)
LatticeCore< dim >::VectorDimI VectorDimI
VectorDimD cartesian() const
RationalLatticeDirection< dim > operator/(const IntScalarType &scalar) const
Rational< IntScalarType > dot(const ReciprocalLatticeVector< dim > &other) const
LatticeCore< dim >::VectorDimD VectorDimD
RationalLatticeDirection< dim > operator*(const IntScalarType &scalar) const
RationalLatticeDirection(const Rational< IntScalarType > &_rat, const LatticeDirection< dim > &_dir)
const LatticeDirection< dim > dir
double squaredNorm() const
RationalLatticeDirection< dim > operator+(const RationalLatticeDirection< dim > &other) const
LatticeCore< dim >::IntScalarType IntScalarType
const Rational< IntScalarType > rat
RationalLatticeDirection< dim > operator-(const RationalLatticeDirection< dim > &other) const