Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
Lattices/ReciprocalLatticeVector.h
Go to the documentation of this file.
1/* This file is part of PIL, the Particle Interaction Library.
2 *
3 *
4 * MODEL is distributed without any warranty under the
5 * GNU General Public License (GPL) v2 <http://www.gnu.org/licenses/>.
6 */
7
8#ifndef model_ReciprocalLatticeVector_h_
9#define model_ReciprocalLatticeVector_h_
10
11#include <iostream>
12#include <cfloat> // FLT_EPSILON
13#include <Eigen/Dense>
14#include <Lattice.h>
15
16namespace model
17{
18
19
20 template <int dim>
21 class ReciprocalLatticeVector //: public Eigen::Matrix<long int,dim,1>
22 {
23 static_assert(dim>0,"dim must be > 0.");
24
25 Eigen::Matrix<long int,dim,1> _base;
26
27 public:
28
29 typedef Eigen::Matrix<long int,dim,1> BaseType;
31
32 BaseType& base();
33 const BaseType& base() const;
34
35 static constexpr double roundTol=FLT_EPSILON;
36 typedef Eigen::Matrix< double,dim,1> VectorDimD;
37 typedef Eigen::Matrix<long int,dim,1> VectorDimI;
38 typedef Eigen::Matrix<double,dim,dim> MatrixDimD;
42
44
52 ReciprocalLatticeVectorType operator*(const long int& scalar) const;
53 long int dot(const LatticeVectorType& other) const;
55 VectorDimD cartesian() const;
56 static VectorDimI d2cov(const VectorDimD& d,const LatticeType& lat);
57 double planeSpacing() const;
59 long int closestPlaneIndexOfPoint(const VectorDimD& P) const;
60 long int planeIndexOfPoint(const VectorDimD& P) const ;
61 long int planeIndexOfPoint(const LatticeVector<dim>& P) const;
62 };
63
64 template<int dim>
66
67} // end namespace
68#endif
static VectorDimI d2cov(const VectorDimD &d, const LatticeType &lat)
ReciprocalLatticeVector< dim > ReciprocalLatticeVectorType
ReciprocalLatticeVectorType operator-(const ReciprocalLatticeVectorType &other) const
ReciprocalLatticeVectorType operator*(const long int &scalar) const
Eigen::Matrix< long int, dim, 1 > VectorDimI
LatticeDirectionType cross(const ReciprocalLatticeVectorType &other) const
ReciprocalLatticeVectorType & operator+=(const ReciprocalLatticeVectorType &other)
Eigen::Matrix< double, dim, dim > MatrixDimD
long int planeIndexOfPoint(const VectorDimD &P) const
Eigen::Matrix< double, dim, 1 > VectorDimD
Eigen::Matrix< long int, dim, 1 > BaseType
long int closestPlaneIndexOfPoint(const VectorDimD &P) const
ReciprocalLatticeVectorType operator+(const ReciprocalLatticeVectorType &other) const
ReciprocalLatticeVectorType & operator-=(const ReciprocalLatticeVectorType &other)
long int dot(const LatticeVectorType &other) const
auto operator*(const std::shared_ptr< BilinearForm< T1, T2 > > &f, const IntegrationDomain< FE, D, Q, Rule > &dom)