Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
Lattices_NEW/ReciprocalLatticeVector.h
Go to the documentation of this file.
1/* This file is part of model.
2 *
3 * MoDELib is distributed without any warranty under the MIT License.
4 */
5
6#ifndef model_ReciprocalLatticeVectorBase_h_
7#define model_ReciprocalLatticeVectorBase_h_
8
9#include <LatticeModule.h>
10
11namespace model
12{
13 template <int dim>
14 class ReciprocalLatticeVectorBase : 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
32 template<typename OtherDerived>
33 ReciprocalLatticeVectorBase(const Eigen::MatrixBase<OtherDerived>& other,
34 const Lattice<dim>& lat) :
35 /* init base */ BaseType(other),
36 /* init base */ lattice(lat)
37 {
40 }
50 IntScalarType dot(const LatticeVector<dim>& other) const;
51 VectorDimD cartesian() const;
52 double planeSpacing() const;
57
58 };
59
60 template<int dim>
62
63
64
65template <int dim>
67{
68
69public:
70
75
78
79 template<typename OtherDerived>
80 ReciprocalLatticeVector(const Eigen::MatrixBase<OtherDerived>& other,
81 const Lattice<dim>& lat) :
82 /* init base */ ReciprocalLatticeVectorBase<dim>(other,lat)
83 {
86 }
87
88};
89
90
91template <>
93{
94
95public:
96
97
102
103
105 ReciprocalLatticeVector(const VectorDimD& d, const Lattice<3>& lat) ;
106
107 template<typename OtherDerived>
108 ReciprocalLatticeVector(const Eigen::MatrixBase<OtherDerived>& other,
109 const Lattice<3>& lat) :
110 /* init base */ ReciprocalLatticeVectorBase<3>(other,lat)
111 {
114 }
115
117
118};
119
120
121} // end namespace
122#endif
ReciprocalLatticeVector(const Eigen::MatrixBase< OtherDerived > &other, const Lattice< 3 > &lat)
ReciprocalLatticeVectorBase(const ReciprocalLatticeVectorBase< dim > &other)=default
IntScalarType dot(const LatticeVector< dim > &other) const
ReciprocalLatticeVectorBase(ReciprocalLatticeVectorBase< dim > &&other)=default
IntScalarType planeIndexOfPoint(const VectorDimD &P) const
IntScalarType closestPlaneIndexOfPoint(const VectorDimD &P) const
ReciprocalLatticeVectorBase(const Eigen::MatrixBase< OtherDerived > &other, const Lattice< dim > &lat)
ReciprocalLatticeVectorBase< dim > operator+(const ReciprocalLatticeVectorBase< dim > &other) const
ReciprocalLatticeVectorBase< dim > & operator-=(const ReciprocalLatticeVectorBase< dim > &other)
ReciprocalLatticeVectorBase< dim > & operator+=(const ReciprocalLatticeVectorBase< dim > &other)
ReciprocalLatticeVectorBase< dim > & operator=(const ReciprocalLatticeVectorBase< dim > &other)
ReciprocalLatticeVectorBase< dim > operator*(const IntScalarType &scalar) const
ReciprocalLatticeVectorBase< dim > operator-(const ReciprocalLatticeVectorBase< dim > &other) const
ReciprocalLatticeVector(const Eigen::MatrixBase< OtherDerived > &other, const Lattice< dim > &lat)
ReciprocalLatticeVector(const VectorDimD &d, const Lattice< dim > &lat)
Eigen::Matrix< long int, dim, 1 > VectorDimI
LatticeDirectionType cross(const ReciprocalLatticeVectorType &other) const
Eigen::Matrix< double, dim, dim > MatrixDimD
Eigen::Matrix< double, dim, 1 > VectorDimD
ReciprocalLatticeVector(const Lattice< dim > &lat)
auto operator*(const std::shared_ptr< BilinearForm< T1, T2 > > &f, const IntegrationDomain< FE, D, Q, Rule > &dom)
Eigen::Matrix< IntScalarType, dim, dim > MatrixDimI
Definition LatticeCore.h:28
long long int IntScalarType
Definition LatticeCore.h:26
Eigen::Matrix< double, dim, 1 > VectorDimD
Definition LatticeCore.h:24
Eigen::Matrix< double, dim, dim > MatrixDimD
Definition LatticeCore.h:25
Eigen::Matrix< IntScalarType, dim, 1 > VectorDimI
Definition LatticeCore.h:27