oILAB
Loading...
Searching...
No Matches
example Namespace Reference

Functions

 create (source, frame)
 

Variables

 A
 
 lattice = gb.Lattice3D(A)
 
 lv1 = lattice.latticeVector(np.array([1.0,2.0,2.0]))
 
 cartesianCoordinates = lv1.cartesian()
 
 lv2 = gb.LatticeVector3D(lv1.cartesian(),lattice)
 
int lv3 = 4*(lv1+lv2)
 
 rlv1 = gb.ReciprocalLatticeVector3D(np.array([1,5,6],dtype=np.int64),lattice)
 
 rlv2 = gb.ReciprocalLatticeVector3D(np.array([2.,2.,4.],dtype=np.float64),lattice)
 
 ld = rlv1.cross(rlv2)
 
 bv1 = gb.LatticeVector3D(np.array([1,-1,0]),lattice)
 
 bv2 = gb.LatticeVector3D(np.array([1,1,-2]),lattice)
 
 bv3 = gb.LatticeVector3D(np.array([1,1,1]),lattice)
 
 config = lattice.box([bv1,bv2,bv3],"config.txt")
 
 misorientationAxis = lattice.reciprocalLatticeDirection(np.array([1.0,1.0,1.0]))
 
 rotations = lattice.generateCoincidentLattices(misorientationAxis)
 
 rot = Rotation.from_matrix(rotation)
 
int angle = rot.magnitude() / 2
 
 axis = rot.as_rotvec()
 
int half_rotvec = axis / np.linalg.norm(axis) * angle
 
 positiveR = Rotation.from_rotvec(half_rotvec).as_matrix()
 
 negativeR = Rotation.from_rotvec(-half_rotvec).as_matrix()
 
 lattice1 = gb.Lattice3D(A,positiveR)
 
 lattice2 = gb.Lattice3D(A,negativeR)
 
 bicrystal = gb.BiCrystal3D(lattice1,lattice2,False)
 
 csl = bicrystal.csl
 
 bcslv1 = csl.latticeDirection(misorientationAxis.cartesian()).latticeVector()
 
 bcslv2 = csl.latticeDirection(bcslv1.cross()).cartesian()).latticeVector()
 
 bcslv3 = csl.latticeDirection(bcslv1.cross(bcslv2).cartesian()).latticeVector()
 

Function Documentation

◆ create()

example.create (   source,
  frame 
)

Definition at line 96 of file example.py.

Variable Documentation

◆ A

example.A
Initial value:
1= np.array([[0.5,0.5,0.0],
2 [0.5,0.0,0.5],
3 [0.0,0.5,0.5]])

Definition at line 9 of file example.py.

◆ angle

float example.angle = rot.magnitude() / 2

Definition at line 65 of file example.py.

◆ axis

example.axis = rot.as_rotvec()

Definition at line 66 of file example.py.

◆ bcslv1

example.bcslv1 = csl.latticeDirection(misorientationAxis.cartesian()).latticeVector()

Definition at line 86 of file example.py.

◆ bcslv2

example.bcslv2 = csl.latticeDirection(bcslv1.cross()).cartesian()).latticeVector()

Definition at line 89 of file example.py.

◆ bcslv3

example.bcslv3 = csl.latticeDirection(bcslv1.cross(bcslv2).cartesian()).latticeVector()

Definition at line 91 of file example.py.

◆ bicrystal

example.bicrystal = gb.BiCrystal3D(lattice1,lattice2,False)

Definition at line 81 of file example.py.

◆ bv1

int example.bv1 = gb.LatticeVector3D(np.array([1,-1,0]),lattice)

Definition at line 50 of file example.py.

◆ bv2

int example.bv2 = gb.LatticeVector3D(np.array([1,1,-2]),lattice)

Definition at line 51 of file example.py.

◆ bv3

int example.bv3 = gb.LatticeVector3D(np.array([1,1,1]),lattice)

Definition at line 52 of file example.py.

◆ cartesianCoordinates

example.cartesianCoordinates = lv1.cartesian()

Definition at line 19 of file example.py.

◆ config

example.config = lattice.box([bv1,bv2,bv3],"config.txt")

Definition at line 56 of file example.py.

◆ csl

example.csl = bicrystal.csl

Definition at line 84 of file example.py.

◆ half_rotvec

int example.half_rotvec = axis / np.linalg.norm(axis) * angle

Definition at line 72 of file example.py.

◆ lattice

example.lattice = gb.Lattice3D(A)

Definition at line 12 of file example.py.

◆ lattice1

example.lattice1 = gb.Lattice3D(A,positiveR)

Definition at line 77 of file example.py.

◆ lattice2

example.lattice2 = gb.Lattice3D(A,negativeR)

Definition at line 78 of file example.py.

◆ ld

example.ld = rlv1.cross(rlv2)

Definition at line 45 of file example.py.

◆ lv1

example.lv1 = lattice.latticeVector(np.array([1.0,2.0,2.0]))

Definition at line 15 of file example.py.

◆ lv2

example.lv2 = gb.LatticeVector3D(lv1.cartesian(),lattice)

Definition at line 23 of file example.py.

◆ lv3

int example.lv3 = 4*(lv1+lv2)

Definition at line 35 of file example.py.

◆ misorientationAxis

example.misorientationAxis = lattice.reciprocalLatticeDirection(np.array([1.0,1.0,1.0]))

Definition at line 59 of file example.py.

◆ negativeR

example.negativeR = Rotation.from_rotvec(-half_rotvec).as_matrix()

Definition at line 74 of file example.py.

◆ positiveR

example.positiveR = Rotation.from_rotvec(half_rotvec).as_matrix()

Definition at line 73 of file example.py.

◆ rlv1

example.rlv1 = gb.ReciprocalLatticeVector3D(np.array([1,5,6],dtype=np.int64),lattice)

Definition at line 41 of file example.py.

◆ rlv2

example.rlv2 = gb.ReciprocalLatticeVector3D(np.array([2.,2.,4.],dtype=np.float64),lattice)

Definition at line 42 of file example.py.

◆ rot

example.rot = Rotation.from_matrix(rotation)

Definition at line 64 of file example.py.

◆ rotations

example.rotations = lattice.generateCoincidentLattices(misorientationAxis)

Definition at line 61 of file example.py.