oILAB
Loading...
Searching...
No Matches
BiCrystal.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
7#ifndef gbLAB_BiCrystal_h_
8#define gbLAB_BiCrystal_h_
9
10#include <LatticeModule.h>
11#include <SmithDecomposition.h>
12#include "RationalMatrix.h"
13#include "LLL.h"
14#include "RLLL.h"
15#include <unordered_set>
16#include "Rotation.h"
17
18
19namespace gbLAB
20{
26 template <int dim>
27 class BiCrystal : public RationalMatrix<dim>
28 /* */,public SmithDecomposition<dim>
29 {
35
36
39 static MatrixDimI getLambdaA(const MatrixDimI& M, const MatrixDimI& N);
40 static MatrixDimI getLambdaB(const MatrixDimI& M, const MatrixDimI& N);
42 const Lattice<dim>& B,
44 const MatrixDimI& M,
45 const MatrixDimI& N,
46 const bool& useRLLL);
48 const Lattice<dim>& B,
50 const MatrixDimI& M,
51 const MatrixDimI& N,
52 const bool& useRLLL);
53
54 public:
55
58
63
68
73
78
82 const int sigma;
83
87
91
95
99
104
109
110
113
114 /**********************************************************************/
123 BiCrystal(const Lattice<dim>& A,
124 const Lattice<dim>& B,
125 const bool& useRLLL=false);
126
162
195
204 template<int dm=dim>
205 typename std::enable_if<dm==2 || dm==3,std::map<IntScalarType,Gb<dm>>>::type
206 generateGrainBoundaries(const LatticeDirection<dim>& d, int div=30) const;
207
208
225 template<int dm=dim>
226 typename std::enable_if<dm==2 || dm==3,std::vector<LatticeVector<dim>>>::type
227 box(std::vector<LatticeVector<dim>>& boxVectors,
228 const double& orthogonality,
229 const int& dsclFactor,
230 std::string filename= "",
231 bool orient=false) const;
232 };
233
234
235} // end namespace
236#endif
237
const Lattice< dim > & A
Definition BiCrystal.h:56
LatticeVector< dim > shiftTensorB(const LatticeVector< dim > &d) const
LatticeVector< dim > getLatticeVectorInB(const LatticeVector< dim > &v) const
static MatrixDimI getLambdaA(const MatrixDimI &M, const MatrixDimI &N)
Definition BiCrystal.cpp:42
LatticeVector< dim > getLatticeVectorInD(const LatticeVector< dim > &v) const
const IntScalarType sigmaB
Signed ratio of the unit cell volume of to that of : .
Definition BiCrystal.h:77
ReciprocalLatticeDirection< dim > getReciprocalLatticeDirectionInD(const ReciprocalLatticeVector< dim > &v) const
LatticeVector< dim > shiftTensorA(const LatticeVector< dim > &d) const
const Lattice< dim > dscl
DCSL lattice .
Definition BiCrystal.h:90
const MatrixDimI LambdaB
Shift tensor describes the shift in the CSL when lattice is shifted by a DSCL vector.
Definition BiCrystal.h:108
const Lattice< dim > & B
Definition BiCrystal.h:57
ReciprocalLatticeDirection< dim > getReciprocalLatticeDirectionInA(const ReciprocalLatticeVector< dim > &v) const
LatticeCore< dim >::IntScalarType IntScalarType
Definition BiCrystal.h:30
ReciprocalLatticeDirection< dim > getReciprocalLatticeDirectionInC(const ReciprocalLatticeVector< dim > &v) const
const MatrixDimI M
Integer matrix that connects the bases and of lattices and the CSL , respectively: .
Definition BiCrystal.h:62
LatticeCore< dim >::VectorDimI VectorDimI
Definition BiCrystal.h:33
const IntScalarType sigmaA
Signed ratio of the unit cell volume of to that of . .
Definition BiCrystal.h:72
const MatrixDimI N
Integer matrix that connects the bases and of lattices and the CSL , respectively: .
Definition BiCrystal.h:67
LatticeVector< dim > getLatticeVectorInA(const LatticeVector< dim > &v) const
ReciprocalLatticeDirection< dim > getReciprocalLatticeDirectionInB(const ReciprocalLatticeVector< dim > &v) const
const Lattice< dim > Ap
Lattice with basis .
Definition BiCrystal.h:94
static MatrixDimD getDSCLBasis(const Lattice< dim > &A, const Lattice< dim > &B, const SmithDecomposition< dim > &sd, const MatrixDimI &M, const MatrixDimI &N, const bool &useRLLL)
const int sigma
if , else
Definition BiCrystal.h:82
LatticeDirection< dim > getLatticeDirectionInC(const LatticeVector< dim > &v) const
const Lattice< dim > csl
CSL lattice .
Definition BiCrystal.h:86
static MatrixDimI getN(const RationalMatrix< dim > &rm, const SmithDecomposition< dim > &sd)
Definition BiCrystal.cpp:29
const Lattice< dim > Bp
Lattice with basis .
Definition BiCrystal.h:98
LatticeDirection< dim > getLatticeDirectionInD(const LatticeVector< dim > &v) const
LatticeCore< dim >::MatrixDimI MatrixDimI
Definition BiCrystal.h:34
std::enable_if< dm==2||dm==3, std::map< IntScalarType, Gb< dm > > >::type generateGrainBoundaries(const LatticeDirection< dim > &d, int div=30) const
Given a tilt axis , that belongs to lattices or , this function generate a set of tilt GBs....
static MatrixDimD getCSLBasis(const Lattice< dim > &A, const Lattice< dim > &B, const SmithDecomposition< dim > &sd, const MatrixDimI &M, const MatrixDimI &N, const bool &useRLLL)
Definition BiCrystal.cpp:82
std::enable_if< dm==2||dm==3, std::vector< LatticeVector< dim > > >::type box(std::vector< LatticeVector< dim > > &boxVectors, const double &orthogonality, const int &dsclFactor, std::string filename="", bool orient=false) const
LatticeCore< dim >::VectorDimD VectorDimD
Definition BiCrystal.h:31
LatticeCore< dim >::MatrixDimD MatrixDimD
Definition BiCrystal.h:32
static MatrixDimI getLambdaB(const MatrixDimI &M, const MatrixDimI &N)
Definition BiCrystal.cpp:62
static MatrixDimI getM(const RationalMatrix< dim > &rm, const SmithDecomposition< dim > &sd)
Definition BiCrystal.cpp:16
const MatrixDimI LambdaA
Shift tensor describes the shift in the CSL when lattice is shifted by a DSCL vector.
Definition BiCrystal.h:103
Lattice class.
Definition Lattice.h:34
LatticeVector class.
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.