Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
Lattices/LatticeVector.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_LatticeVector_h_
9#define model_LatticeVector_h_
10
11#include <cfloat> // FLT_EPSILON
12#include <Eigen/Dense>
13#include <Lattice.h>
15
16namespace model
17{
18
19 template <int dim>
20 class LatticeVector // : public Eigen::Matrix<long int,dim,1>
21 {
22 static_assert(dim>0,"dim must be > 0.");
23
24 Eigen::Matrix<long int,dim,1> _base;
25
26 public:
28 typedef Eigen::Matrix<long int,dim,1> BaseType;
29
31 const BaseType& base() const;
32
33 static constexpr double roundTol=FLT_EPSILON;
34 typedef Eigen::Matrix< double,dim,1> VectorDimD;
35 typedef Eigen::Matrix<long int,dim,1> VectorDimI;
36 typedef Eigen::Matrix<double,dim,dim> MatrixDimD;
40
42
45 const LatticeType& lat) ;
47 const LatticeType& lat) ;
52 LatticeVectorType operator*(const long int& scalar) const;
53 long int dot(const ReciprocalLatticeVectorType& other) const;
57 const LatticeType& lat);
58 };
59
60 template<int dim>
61 LatticeVector<dim> operator*(const long int& scalar, const LatticeVector<dim>& L);
62
63} // end namespace
64#endif
LatticeVector(const VectorDimD &d, const LatticeType &lat)
static VectorDimI d2contra(const VectorDimD &d, const LatticeType &lat)
LatticeVectorType & operator-=(const LatticeVectorType &other)
LatticeVectorType operator+(const LatticeVectorType &other) const
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
LatticeVector(const VectorDimI &d, const LatticeType &lat)
const BaseType & base() const
LatticeVectorType operator*(const long int &scalar) const
auto operator*(const std::shared_ptr< BilinearForm< T1, T2 > > &f, const IntegrationDomain< FE, D, Q, Rule > &dom)