oILAB
Loading...
Searching...
No Matches
gbLAB::BiCrystal< dim > Class Template Reference

#include <BiCrystal.h>

+ Inheritance diagram for gbLAB::BiCrystal< dim >:

Public Member Functions

LatticeVector< dim > shiftTensorA (const LatticeVector< dim > &d) const
 
LatticeVector< dim > shiftTensorB (const LatticeVector< dim > &d) const
 
 BiCrystal (const Lattice< dim > &A, const Lattice< dim > &B, const bool &useRLLL=false)
 Constructs a bicrystal from two lattices \(\mathcal A \) and \(\mathcal B \) by computing the parallel bases \(\textbf A^\|, \textbf B^\|, \textbf C^\|, \textbf D^\|\) for lattices \(\mathcal A, \mathcal B, \mathcal C, \mathcal D\), respectively. If the flag useRLLL is .true., then the bases of CSL and DSCL are reduced using the LLL algorithm.
 
LatticeVector< dim > getLatticeVectorInA (const LatticeVector< dim > &v) const
 
LatticeVector< dim > getLatticeVectorInB (const LatticeVector< dim > &v) const
 
LatticeVector< dim > getLatticeVectorInD (const LatticeVector< dim > &v) const
 
LatticeDirection< dim > getLatticeDirectionInC (const LatticeVector< dim > &v) const
 
LatticeDirection< dim > getLatticeDirectionInD (const LatticeVector< dim > &v) const
 
ReciprocalLatticeDirection< dim > getReciprocalLatticeDirectionInA (const ReciprocalLatticeVector< dim > &v) const
 
ReciprocalLatticeDirection< dim > getReciprocalLatticeDirectionInB (const ReciprocalLatticeVector< dim > &v) const
 
ReciprocalLatticeDirection< dim > getReciprocalLatticeDirectionInC (const ReciprocalLatticeVector< dim > &v) const
 
ReciprocalLatticeDirection< dim > getReciprocalLatticeDirectionInD (const ReciprocalLatticeVector< dim > &v) const
 
template<int dm = dim>
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 \(\textbf d\), that belongs to lattices \(\mathcal A\) or \(\mathcal B\), this function generate a set of tilt GBs. CURRENTLY ONLY WORDS FOR DIMENSION 3.
 
template<int dm = dim>
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
 
- Public Member Functions inherited from gbLAB::RationalMatrix< dim >
 RationalMatrix (const MatrixDimD &R)
 
 RationalMatrix (const MatrixDimI &Rn, const IntScalarType &Rd)
 
 RationalMatrix (const MatrixDimI &Rn, const MatrixDimI &Rd)
 
MatrixDimD asMatrix () const
 
- Public Member Functions inherited from gbLAB::SmithDecomposition< dim >
 SmithDecomposition (const MatrixNi &A)
 
const MatrixNimatrixU () const
 
const MatrixNimatrixD () const
 
const MatrixNimatrixV () const
 
const MatrixNimatrixX () const
 
const MatrixNimatrixY () const
 

Data Fields

const Lattice< dim > & A
 
const Lattice< dim > & B
 
const MatrixDimI M
 Integer matrix that connects the bases \( \textbf A^{\|} \) and \( \textbf C^{\|} \) of lattices \(\mathcal A\) and the CSL \(\mathcal C\), respectively: \( \textbf C^{\|} = \textbf A^{\|} \textbf M\).
 
const MatrixDimI N
 Integer matrix that connects the bases \( \textbf B^{\|} \) and \( \textbf C^{\|} \) of lattices \(\mathcal B\) and the CSL \(\mathcal C\), respectively: \( \textbf C^{\|} = \textbf B^{\|} \textbf N\).
 
const IntScalarType sigmaA
 Signed ratio of the unit cell volume of \(\mathcal C\) to that of \(\mathcal A\). \( \Sigma_{\mathcal A} = \det(\textbf M)\).
 
const IntScalarType sigmaB
 Signed ratio of the unit cell volume of \(\mathcal C\) to that of \(\mathcal B\): \( \Sigma_{\mathcal B} = \det(\textbf N)\).
 
const int sigma
 \( \Sigma = |\Sigma_{\mathcal A}|\) if \( \Sigma_{\mathcal A} = \Sigma_{\mathcal B}\), else \( \Sigma = 0 \)
 
const Lattice< dim > csl
 CSL lattice \(\mathcal C\).
 
const Lattice< dim > dscl
 DCSL lattice \(\mathcal D\).
 
const Lattice< dim > Ap
 Lattice \(\mathcal A\) with basis \(\textbf A^\|\).
 
const Lattice< dim > Bp
 Lattice \(\mathcal B\) with basis \(\textbf B^\|\).
 
const MatrixDimI LambdaA
 Shift tensor \(\Lambda_{\mathcal A}:\mathbb Z_{\mathcal D} \to \mathbb Z_{\mathcal D}\) describes the shift in the CSL when lattice \(\mathcal A\) is shifted by a DSCL vector.
 
const MatrixDimI LambdaB
 Shift tensor \(\Lambda_{\mathcal B}:\mathbb Z_{\mathcal D} \to \mathbb Z_{\mathcal D}\) describes the shift in the CSL when lattice \(\mathcal B\) is shifted by a DSCL vector.
 
- Data Fields inherited from gbLAB::RationalMatrix< dim >
const MatrixDimIintegerMatrix
 
const IntScalarTypemu
 

Private Types

typedef LatticeCore< dim >::IntScalarType IntScalarType
 
typedef LatticeCore< dim >::VectorDimD VectorDimD
 
typedef LatticeCore< dim >::MatrixDimD MatrixDimD
 
typedef LatticeCore< dim >::VectorDimI VectorDimI
 
typedef LatticeCore< dim >::MatrixDimI MatrixDimI
 

Static Private Member Functions

static MatrixDimI getM (const RationalMatrix< dim > &rm, const SmithDecomposition< dim > &sd)
 
static MatrixDimI getN (const RationalMatrix< dim > &rm, const SmithDecomposition< dim > &sd)
 
static MatrixDimI getLambdaA (const MatrixDimI &M, const MatrixDimI &N)
 
static MatrixDimI getLambdaB (const MatrixDimI &M, const MatrixDimI &N)
 
static MatrixDimD getCSLBasis (const Lattice< dim > &A, const Lattice< dim > &B, const SmithDecomposition< dim > &sd, const MatrixDimI &M, const MatrixDimI &N, const bool &useRLLL)
 
static MatrixDimD getDSCLBasis (const Lattice< dim > &A, const Lattice< dim > &B, const SmithDecomposition< dim > &sd, const MatrixDimI &M, const MatrixDimI &N, const bool &useRLLL)
 

Detailed Description

template<int dim>
class gbLAB::BiCrystal< dim >

Class template that computes the coincident-site-lattice (CSL) of two parent lattices using the Smith Normal Form [1].

[1] Coincidence Lattices and Associated Shear Transformations

Examples
testCoincidentRotations.cpp, testGb.cpp, testGb3d.cpp, testGenerateGBs.cpp, testMoire.cpp, and testSNF.cpp.

Definition at line 27 of file BiCrystal.h.

Member Typedef Documentation

◆ IntScalarType

template<int dim>
typedef LatticeCore<dim>::IntScalarType gbLAB::BiCrystal< dim >::IntScalarType
private

Definition at line 30 of file BiCrystal.h.

◆ MatrixDimD

template<int dim>
typedef LatticeCore<dim>::MatrixDimD gbLAB::BiCrystal< dim >::MatrixDimD
private

Definition at line 32 of file BiCrystal.h.

◆ MatrixDimI

template<int dim>
typedef LatticeCore<dim>::MatrixDimI gbLAB::BiCrystal< dim >::MatrixDimI
private

Definition at line 34 of file BiCrystal.h.

◆ VectorDimD

template<int dim>
typedef LatticeCore<dim>::VectorDimD gbLAB::BiCrystal< dim >::VectorDimD
private

Definition at line 31 of file BiCrystal.h.

◆ VectorDimI

template<int dim>
typedef LatticeCore<dim>::VectorDimI gbLAB::BiCrystal< dim >::VectorDimI
private

Definition at line 33 of file BiCrystal.h.

Constructor & Destructor Documentation

◆ BiCrystal()

template<int dim>
gbLAB::BiCrystal< dim >::BiCrystal ( const Lattice< dim > &  A,
const Lattice< dim > &  B,
const bool &  useRLLL = false 
)

Constructs a bicrystal from two lattices \(\mathcal A \) and \(\mathcal B \) by computing the parallel bases \(\textbf A^\|, \textbf B^\|, \textbf C^\|, \textbf D^\|\) for lattices \(\mathcal A, \mathcal B, \mathcal C, \mathcal D\), respectively. If the flag useRLLL is .true., then the bases of CSL and DSCL are reduced using the LLL algorithm.

Parameters
[in]Lattices\(\mathcal A \) and \(\mathcal B \), and useRLLL flag
Returns
A bicrystal object

Definition at line 157 of file BiCrystal.cpp.

Member Function Documentation

◆ box()

template<int dim>
template<int dm>
template std::vector< LatticeVector< 3 > > gbLAB::BiCrystal< dim >::box< 3 > ( std::vector< LatticeVector< dim > > &  boxVectors,
const double &  orthogonality,
const int &  dsclFactor,
std::string  filename = "",
bool  orient = false 
) const

This function outputs/prints a 2D bicrystal (two lattices that form the GB and the CSL) bounded by a box defined using two input box vectors. The box vectors have to be linearly independent lattice vectors. The function optimizes boxVectors[0] to make the box as orthogonal as possible depending on the orthogonality parameter.

Template Parameters
dmdimension (int)
Parameters
boxVectorstwo linearly independent lattice vectors.
orthogonality(double) a value in the interval \([0,1]\).
filename(optional) name of the output file
orient(optional) While printing to a file, orient the system such that one of the box sides is along the global x axis. This flag does not influence the returning configuration, only the configuration printed to the file.
Returns
lattice points of the bicrystal (along with the CSL) bounded by the box (std::vector<LatticeVector<2>>).

Definition at line 500 of file BiCrystal.cpp.

◆ generateGrainBoundaries()

template<int dim>
template<int dm>
template std::map< BiCrystal< 3 >::IntScalarType, Gb< 3 > > gbLAB::BiCrystal< dim >::generateGrainBoundaries< 3 > ( const LatticeDirection< dim > &  d,
int  div = 30 
) const

Given a tilt axis \(\textbf d\), that belongs to lattices \(\mathcal A\) or \(\mathcal B\), this function generate a set of tilt GBs. CURRENTLY ONLY WORDS FOR DIMENSION 3.

Template Parameters
dm
Parameters
d- LatticeDirection that describes the tilt axis
div- parameter to span the GBs
Returns
A data structure that stores GBs sorted in increasing order of their inclination angle.
Examples
testGenerateGBs.cpp.

Definition at line 446 of file BiCrystal.cpp.

◆ getCSLBasis()

template<int dim>
BiCrystal< dim >::MatrixDimD gbLAB::BiCrystal< dim >::getCSLBasis ( const Lattice< dim > &  A,
const Lattice< dim > &  B,
const SmithDecomposition< dim > &  sd,
const MatrixDimI M,
const MatrixDimI N,
const bool &  useRLLL 
)
staticprivate

Definition at line 82 of file BiCrystal.cpp.

◆ getDSCLBasis()

template<int dim>
BiCrystal< dim >::MatrixDimD gbLAB::BiCrystal< dim >::getDSCLBasis ( const Lattice< dim > &  A,
const Lattice< dim > &  B,
const SmithDecomposition< dim > &  sd,
const MatrixDimI M,
const MatrixDimI N,
const bool &  useRLLL 
)
staticprivate

Definition at line 131 of file BiCrystal.cpp.

◆ getLambdaA()

template<int dim>
BiCrystal< dim >::MatrixDimI gbLAB::BiCrystal< dim >::getLambdaA ( const MatrixDimI M,
const MatrixDimI N 
)
staticprivate

Definition at line 42 of file BiCrystal.cpp.

◆ getLambdaB()

template<int dim>
BiCrystal< dim >::MatrixDimI gbLAB::BiCrystal< dim >::getLambdaB ( const MatrixDimI M,
const MatrixDimI N 
)
staticprivate

Definition at line 62 of file BiCrystal.cpp.

◆ getLatticeDirectionInC()

template<int dim>
LatticeDirection< dim > gbLAB::BiCrystal< dim >::getLatticeDirectionInC ( const LatticeVector< dim > &  v) const

Outputs lattice direction in the CSL \(\mathcal C\) that is parallel to the inputted vector \(\textbf v\) that belongs to one of the four lattices, \(\mathcal A\), \(\mathcal B\), \(\mathcal C\), or \(\mathcal D\),

Parameters
v- lattice vector
Returns
LatticeDirection in \(\mathcal C\)
Examples
testGb3d.cpp, and testGenerateGBs.cpp.

Definition at line 296 of file BiCrystal.cpp.

◆ getLatticeDirectionInD()

template<int dim>
LatticeDirection< dim > gbLAB::BiCrystal< dim >::getLatticeDirectionInD ( const LatticeVector< dim > &  v) const

Outputs lattice direction in the DSCL \(\mathcal D\) that is parallel to the inputted vector \(\textbf v\) that belongs to one of the four lattices, \(\mathcal A\), \(\mathcal B\), \(\mathcal C\), or \(\mathcal D\),

Parameters
v- lattice vector
Returns
LatticeDirection in \(\mathcal D\)
Examples
testGenerateGBs.cpp.

Definition at line 324 of file BiCrystal.cpp.

◆ getLatticeVectorInA()

template<int dim>
LatticeVector< dim > gbLAB::BiCrystal< dim >::getLatticeVectorInA ( const LatticeVector< dim > &  v) const

Outputs lattice vector in lattice \(\mathcal A\) that is equal to the inputted vector \(\textbf v\) that belongs to \(\mathcal A\) or \(\mathcal C\)

Parameters
v- lattice vector
Returns
LatticeVector in \(\mathcal A\)

Definition at line 230 of file BiCrystal.cpp.

◆ getLatticeVectorInB()

template<int dim>
LatticeVector< dim > gbLAB::BiCrystal< dim >::getLatticeVectorInB ( const LatticeVector< dim > &  v) const

Outputs lattice vector in lattice \(\mathcal B\) that is equal to the inputted vector \(\textbf v\) that belongs to \(\mathcal B\) or \(\mathcal C\)

Parameters
v- lattice vector
Returns
LatticeVector in \(\mathcal B\)

Definition at line 248 of file BiCrystal.cpp.

◆ getLatticeVectorInD()

template<int dim>
LatticeVector< dim > gbLAB::BiCrystal< dim >::getLatticeVectorInD ( const LatticeVector< dim > &  v) const

Outputs lattice vector in lattice \(\mathcal D\) that is equal to the inputted vector \(\textbf v\) that belongs to \(\mathcal A\), \(\mathcal B\), \(\mathcal C\), or \(\mathcal D\)

Parameters
v- lattice vector
Returns
LatticeVector in \(\mathcal D\)

Definition at line 266 of file BiCrystal.cpp.

◆ getM()

template<int dim>
BiCrystal< dim >::MatrixDimI gbLAB::BiCrystal< dim >::getM ( const RationalMatrix< dim > &  rm,
const SmithDecomposition< dim > &  sd 
)
staticprivate

Definition at line 16 of file BiCrystal.cpp.

◆ getN()

template<int dim>
BiCrystal< dim >::MatrixDimI gbLAB::BiCrystal< dim >::getN ( const RationalMatrix< dim > &  rm,
const SmithDecomposition< dim > &  sd 
)
staticprivate

Definition at line 29 of file BiCrystal.cpp.

◆ getReciprocalLatticeDirectionInA()

template<int dim>
ReciprocalLatticeDirection< dim > gbLAB::BiCrystal< dim >::getReciprocalLatticeDirectionInA ( const ReciprocalLatticeVector< dim > &  v) const

Outputs reciprocal lattice direction in the dual lattice \(\mathcal A^*\) that is parallel to the inputted reciprocal vector \(\textbf v\) that belongs to one of the four dual lattices, \(\mathcal A^*\), \(\mathcal B^*\), \(\mathcal C^*\), or \(\mathcal D^*\),

Parameters
v- lattice vector
Returns
ReciprocalLatticeDirection in \(\mathcal A^*\)

Definition at line 330 of file BiCrystal.cpp.

◆ getReciprocalLatticeDirectionInB()

template<int dim>
ReciprocalLatticeDirection< dim > gbLAB::BiCrystal< dim >::getReciprocalLatticeDirectionInB ( const ReciprocalLatticeVector< dim > &  v) const

Outputs reciprocal lattice direction in the dual lattice \(\mathcal B^*\) that is parallel to the inputted reciprocal vector \(\textbf v\) that belongs to one of the four dual lattices, \(\mathcal A^*\), \(\mathcal B^*\), \(\mathcal C^*\), or \(\mathcal D^*\),

Parameters
v- lattice vector
Returns
ReciprocalLatticeDirection in \(\mathcal B^*\)

Definition at line 356 of file BiCrystal.cpp.

◆ getReciprocalLatticeDirectionInC()

template<int dim>
ReciprocalLatticeDirection< dim > gbLAB::BiCrystal< dim >::getReciprocalLatticeDirectionInC ( const ReciprocalLatticeVector< dim > &  v) const

Outputs reciprocal lattice direction in the dual lattice \(\mathcal C^*\) that is parallel to the inputted reciprocal vector \(\textbf v\) that belongs to one of the four dual lattices, \(\mathcal A^*\), \(\mathcal B^*\), \(\mathcal C^*\), or \(\mathcal D^*\),

Parameters
v- lattice vector
Returns
ReciprocalLatticeDirection in \(\mathcal C^*\)
Examples
testGenerateGBs.cpp.

Definition at line 384 of file BiCrystal.cpp.

◆ getReciprocalLatticeDirectionInD()

template<int dim>
ReciprocalLatticeDirection< dim > gbLAB::BiCrystal< dim >::getReciprocalLatticeDirectionInD ( const ReciprocalLatticeVector< dim > &  v) const

Outputs reciprocal lattice direction in the dual lattice \(\mathcal D^*\) that is parallel to the inputted reciprocal vector \(\textbf v\) that belongs to one of the four dual lattices, \(\mathcal A^*\), \(\mathcal B^*\), \(\mathcal C^*\), or \(\mathcal D^*\),

Parameters
v- lattice vector
Returns
ReciprocalLatticeDirection in \(\mathcal D^*\)

Definition at line 407 of file BiCrystal.cpp.

◆ shiftTensorA()

template<int dim>
LatticeVector< dim > gbLAB::BiCrystal< dim >::shiftTensorA ( const LatticeVector< dim > &  d) const

Definition at line 429 of file BiCrystal.cpp.

◆ shiftTensorB()

template<int dim>
LatticeVector< dim > gbLAB::BiCrystal< dim >::shiftTensorB ( const LatticeVector< dim > &  d) const

Definition at line 437 of file BiCrystal.cpp.

Field Documentation

◆ A

template<int dim>
const Lattice<dim>& gbLAB::BiCrystal< dim >::A
Examples
testGb3d.cpp, and testGenerateGBs.cpp.

Definition at line 56 of file BiCrystal.h.

◆ Ap

template<int dim>
const Lattice<dim> gbLAB::BiCrystal< dim >::Ap

Lattice \(\mathcal A\) with basis \(\textbf A^\|\).

Examples
testMoire.cpp.

Definition at line 94 of file BiCrystal.h.

◆ B

template<int dim>
const Lattice<dim>& gbLAB::BiCrystal< dim >::B

Definition at line 57 of file BiCrystal.h.

◆ Bp

template<int dim>
const Lattice<dim> gbLAB::BiCrystal< dim >::Bp

Lattice \(\mathcal B\) with basis \(\textbf B^\|\).

Examples
testMoire.cpp.

Definition at line 98 of file BiCrystal.h.

◆ csl

template<int dim>
const Lattice<dim> gbLAB::BiCrystal< dim >::csl

CSL lattice \(\mathcal C\).

Examples
testGb.cpp, testGb3d.cpp, testGenerateGBs.cpp, and testMoire.cpp.

Definition at line 86 of file BiCrystal.h.

◆ dscl

template<int dim>
const Lattice<dim> gbLAB::BiCrystal< dim >::dscl

DCSL lattice \(\mathcal D\).

Examples
testGb.cpp, testGenerateGBs.cpp, and testMoire.cpp.

Definition at line 90 of file BiCrystal.h.

◆ LambdaA

template<int dim>
const MatrixDimI gbLAB::BiCrystal< dim >::LambdaA

Shift tensor \(\Lambda_{\mathcal A}:\mathbb Z_{\mathcal D} \to \mathbb Z_{\mathcal D}\) describes the shift in the CSL when lattice \(\mathcal A\) is shifted by a DSCL vector.

Examples
testGenerateGBs.cpp, testMoire.cpp, and testSNF.cpp.

Definition at line 103 of file BiCrystal.h.

◆ LambdaB

template<int dim>
const MatrixDimI gbLAB::BiCrystal< dim >::LambdaB

Shift tensor \(\Lambda_{\mathcal B}:\mathbb Z_{\mathcal D} \to \mathbb Z_{\mathcal D}\) describes the shift in the CSL when lattice \(\mathcal B\) is shifted by a DSCL vector.

Examples
testSNF.cpp.

Definition at line 108 of file BiCrystal.h.

◆ M

template<int dim>
const MatrixDimI gbLAB::BiCrystal< dim >::M

Integer matrix that connects the bases \( \textbf A^{\|} \) and \( \textbf C^{\|} \) of lattices \(\mathcal A\) and the CSL \(\mathcal C\), respectively: \( \textbf C^{\|} = \textbf A^{\|} \textbf M\).

Definition at line 62 of file BiCrystal.h.

◆ N

template<int dim>
const MatrixDimI gbLAB::BiCrystal< dim >::N

Integer matrix that connects the bases \( \textbf B^{\|} \) and \( \textbf C^{\|} \) of lattices \(\mathcal B\) and the CSL \(\mathcal C\), respectively: \( \textbf C^{\|} = \textbf B^{\|} \textbf N\).

Definition at line 67 of file BiCrystal.h.

◆ sigma

template<int dim>
const int gbLAB::BiCrystal< dim >::sigma

\( \Sigma = |\Sigma_{\mathcal A}|\) if \( \Sigma_{\mathcal A} = \Sigma_{\mathcal B}\), else \( \Sigma = 0 \)

Examples
testCoincidentRotations.cpp, testGb3d.cpp, and testGenerateGBs.cpp.

Definition at line 82 of file BiCrystal.h.

◆ sigmaA

template<int dim>
const IntScalarType gbLAB::BiCrystal< dim >::sigmaA

Signed ratio of the unit cell volume of \(\mathcal C\) to that of \(\mathcal A\). \( \Sigma_{\mathcal A} = \det(\textbf M)\).

Examples
testMoire.cpp, and testSNF.cpp.

Definition at line 72 of file BiCrystal.h.

◆ sigmaB

template<int dim>
const IntScalarType gbLAB::BiCrystal< dim >::sigmaB

Signed ratio of the unit cell volume of \(\mathcal C\) to that of \(\mathcal B\): \( \Sigma_{\mathcal B} = \det(\textbf N)\).

Examples
testMoire.cpp, and testSNF.cpp.

Definition at line 77 of file BiCrystal.h.


The documentation for this class was generated from the following files: