oILAB
Loading...
Searching...
No Matches
ReciprocalLatticeVector.h
Go to the documentation of this file.
1/* This file is part of gbLAB.
2 *
3 * gbLAB is distributed without any warranty under the MIT License.
4 */
5
6#ifndef gbLAB_ReciprocalLatticeVectorBase_h_
7#define gbLAB_ReciprocalLatticeVectorBase_h_
8
9#include <LatticeModule.h>
10
11namespace gbLAB
12{
13 template <int dim>
14 class ReciprocalLatticeVector: public Eigen::Matrix<typename LatticeCore<dim>::IntScalarType,dim,1>
15 {
16 typedef Eigen::Matrix<typename LatticeCore<dim>::IntScalarType,dim,1> BaseType;
17 BaseType& base();
18 const BaseType& base() const;
19
20 public:
21
27
29
31 ReciprocalLatticeVector(const VectorDimD& d, const Lattice<dim>& lat) ;
32 ReciprocalLatticeVector(const VectorDimI& d, const Lattice<dim>& lat) ;
35
43 IntScalarType dot(const LatticeVector<dim>& other) const;
44 IntScalarType dot(const LatticeDirection<dim>& other) const;
45 VectorDimD cartesian() const;
49
50 template<int dm=dim>
51 typename std::enable_if<dm==2,LatticeDirection<dim>>::type
52 cross(const ReciprocalLatticeVector<dim>& other) const;
53
54 template<int dm=dim>
55 typename std::enable_if<dm==2,LatticeDirection<dim>>::type
56 cross() const;
57
58 template<int dm=dim>
59 typename std::enable_if<dm==3,LatticeDirection<dim>>::type
61
62 template<int dm=dim>
63 typename std::enable_if<dm==3,LatticeDirection<dim>>::type
64 cross() const;
65 };
66
67 template<int dim>
69 template<int dim>
71
72} // end namespace
73#endif
Lattice class.
Definition Lattice.h:34
LatticeVector class.
LatticeCore< dim >::VectorDimD VectorDimD
ReciprocalLatticeVector(ReciprocalLatticeVector< dim > &&other)=default
LatticeCore< dim >::VectorDimI VectorDimI
IntScalarType dot(const LatticeVector< dim > &other) const
LatticeCore< dim >::MatrixDimD MatrixDimD
std::enable_if< dm==3, LatticeDirection< dim > >::type cross(const ReciprocalLatticeVector< dim > &other) const
IntScalarType closestPlaneIndexOfPoint(const VectorDimD &P) const
std::enable_if< dm==3, LatticeDirection< dim > >::type cross() const
ReciprocalLatticeVector< dim > & operator=(const ReciprocalLatticeVector< dim > &other)
std::enable_if< dm==2, LatticeDirection< dim > >::type cross() const
IntScalarType planeIndexOfPoint(const VectorDimD &P) const
ReciprocalLatticeVector< dim > & operator+=(const ReciprocalLatticeVector< dim > &other)
LatticeCore< dim >::IntScalarType IntScalarType
Eigen::Matrix< typename LatticeCore< dim >::IntScalarType, dim, 1 > BaseType
ReciprocalLatticeVector(const ReciprocalLatticeVector< dim > &other)=default
ReciprocalLatticeVector< dim > operator-(const ReciprocalLatticeVector< dim > &other) const
ReciprocalLatticeVector< dim > & operator-=(const ReciprocalLatticeVector< dim > &other)
ReciprocalLatticeVector< dim > operator+(const ReciprocalLatticeVector< dim > &other) const
ReciprocalLatticeVector< dim > operator*(const IntScalarType &scalar) const
LatticeCore< dim >::MatrixDimI MatrixDimI
LatticeVector< dim > operator*(const typename LatticeVector< dim >::IntScalarType &scalar, const LatticeVector< dim > &L)
Eigen::Matrix< double, dim, dim > MatrixDimD
Definition LatticeCore.h:25
Eigen::Matrix< IntScalarType, dim, dim > MatrixDimI
Definition LatticeCore.h:28
Eigen::Matrix< double, dim, 1 > VectorDimD
Definition LatticeCore.h:24
long long int IntScalarType
Definition LatticeCore.h:26
Eigen::Matrix< IntScalarType, dim, 1 > VectorDimI
Definition LatticeCore.h:27
LatticeDirection class.