8#ifndef model_LatticeVector_cpp_
9#define model_LatticeVector_cpp_
11#include<LatticeModule.h>
60 assert(&
lattice == &other.
lattice &&
"LatticeVectors belong to different Lattices.");
67 assert(&
lattice == &other.
lattice &&
"LatticeVectors belong to different Lattices.");
75 assert(&
lattice == &other.
lattice &&
"LatticeVectors belong to different Lattices.");
82 assert(&
lattice == &other.
lattice &&
"LatticeVectors belong to different Lattices.");
96 assert(&
lattice == &other.
lattice &&
"LatticeVectors belong to different Lattices.");
103 assert(&
lattice == &other.
lattice &&
"LatticeVectors belong to different Lattices.");
110 return lattice.latticeBasis *
base().template cast<double>();
121 std::cout <<
"d2contra, nd=" << nd.transpose() << std::endl;
122 std::cout <<
"d2contra, rd=" << rd.transpose() << std::endl;
123 throw std::runtime_error(
"Input vector is not a lattice vector");
125 return rd.template cast<long int>();
134 template class LatticeVector<3>;
const MatrixDimD reciprocalBasis
Eigen::Matrix< long int, dim, 1 > BaseType
Eigen::Matrix< long int, dim, 1 > VectorDimI
const LatticeType & lattice
static constexpr double roundTol
ReciprocalLatticeVector< dim > ReciprocalLatticeVectorType
LatticeVector< dim > LatticeVectorType
VectorDimD cartesian() const
static VectorDimI d2contra(const VectorDimD &d, const LatticeType &lat)
LatticeVectorType & operator-=(const LatticeVectorType &other)
LatticeVectorType operator+(const LatticeVectorType &other) const
LatticeVector(const LatticeType &lat)
Lattice< dim > LatticeType
long int dot(const ReciprocalLatticeVectorType &other) const
ReciprocalLatticeDirection< dim > ReciprocalLatticeDirectionType
LatticeVectorType operator-(const LatticeVectorType &other) const
LatticeVectorType & operator+=(const LatticeVectorType &other)
ReciprocalLatticeDirectionType cross(const LatticeVectorType &other) const
Eigen::Matrix< double, dim, 1 > VectorDimD
LatticeVectorType operator*(const long int &scalar) const
const LatticeType & lattice
auto operator*(const std::shared_ptr< BilinearForm< T1, T2 > > &f, const IntegrationDomain< FE, D, Q, Rule > &dom)
auto eval(const std::shared_ptr< T > &t)