7#ifndef gbLAB_RationalReciprocalLatticeDirection_cpp_
8#define gbLAB_RationalReciprocalLatticeDirection_cpp_
43 return dir.cartesian() * rat.asDouble();
50 return rat * other.
dot(dir);
71 assert(&dir.lattice == &other.
dir.lattice &&
"Rational Lattice Vector Type belong to different Lattices.");
72 const VectorDimI temp(rat.n * other.
rat.d * dir.reciprocalLatticeVector() + other.
rat.n * rat.d * other.
dir.reciprocalLatticeVector());
82 assert(&dir.lattice == &other.
dir.lattice &&
"ReciprocalLatticeVectorType belong to different Lattices.");
83 const VectorDimI temp(rat.n * other.
rat.d * dir.reciprocalLatticeVector() - other.
rat.n * rat.d * other.
dir.reciprocalLatticeVector());
93 assert(&dir.lattice == &other.
lattice &&
"ReciprocalLatticeVectorType belong to different Lattices.");
102 assert(&dir.lattice == &other.
lattice &&
"ReciprocalLatticeVectorType belong to different Lattices.");
111 return dir.reciprocalLatticeVector().squaredNorm() * std::pow(rat.asDouble(), 2);
120 template struct RationalReciprocalLatticeDirection<1>;
IntScalarType dot(const ReciprocalLatticeVector< dim > &other) const
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)
const ReciprocalLatticeDirection< dim > dir
LatticeCore< dim >::IntScalarType IntScalarType
RationalReciprocalLatticeDirection< dim > operator/(const IntScalarType &scalar) const
RationalReciprocalLatticeDirection(const Rational< IntScalarType > &_rat, const ReciprocalLatticeDirection< dim > &_dir)
RationalReciprocalLatticeDirection< dim > operator*(const IntScalarType &scalar) const
VectorDimD cartesian() const
Rational< IntScalarType > dot(const LatticeVector< dim > &other) const
const Rational< IntScalarType > rat
RationalReciprocalLatticeDirection< dim > operator-(const RationalReciprocalLatticeDirection< dim > &other) const
LatticeCore< dim >::VectorDimI VectorDimI
RationalReciprocalLatticeDirection< dim > operator+(const RationalReciprocalLatticeDirection< dim > &other) const
double squaredNorm() const
LatticeCore< dim >::VectorDimD VectorDimD