Merge branch 'lattice-naming' into 'development'
there is no "crystal lattice", what we define are the 14 Bravais lattices See merge request damask/DAMASK!802
This commit is contained in:
commit
32c1711b44
|
@ -2,11 +2,11 @@ from typing import Optional, Union, Dict, List, Tuple
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from ._typehints import FloatSequence, CrystalFamily, CrystalLattice, CrystalKinematics
|
from ._typehints import FloatSequence, CrystalFamily, BravaisLattice, CrystalKinematics
|
||||||
from . import util
|
from . import util
|
||||||
from . import Rotation
|
from . import Rotation
|
||||||
|
|
||||||
lattice_symmetries: Dict[CrystalLattice, CrystalFamily] = {
|
lattice_symmetries: Dict[BravaisLattice, CrystalFamily] = {
|
||||||
'aP': 'triclinic',
|
'aP': 'triclinic',
|
||||||
|
|
||||||
'mP': 'monoclinic',
|
'mP': 'monoclinic',
|
||||||
|
@ -27,7 +27,7 @@ lattice_symmetries: Dict[CrystalLattice, CrystalFamily] = {
|
||||||
'cF': 'cubic',
|
'cF': 'cubic',
|
||||||
}
|
}
|
||||||
|
|
||||||
orientation_relationships: Dict[str, Dict[CrystalLattice,np.ndarray]] = {
|
orientation_relationships: Dict[str, Dict[BravaisLattice,np.ndarray]] = {
|
||||||
'KS': {
|
'KS': {
|
||||||
'cF': np.array([
|
'cF': np.array([
|
||||||
[[-1, 0, 1],[ 1, 1, 1]],
|
[[-1, 0, 1],[ 1, 1, 1]],
|
||||||
|
@ -323,7 +323,7 @@ class Crystal():
|
||||||
|
|
||||||
def __init__(self, *,
|
def __init__(self, *,
|
||||||
family: Optional[CrystalFamily] = None,
|
family: Optional[CrystalFamily] = None,
|
||||||
lattice: Optional[CrystalLattice] = None,
|
lattice: Optional[BravaisLattice] = None,
|
||||||
a: Optional[float] = None, b: Optional[float] = None, c: Optional[float] = None,
|
a: Optional[float] = None, b: Optional[float] = None, c: Optional[float] = None,
|
||||||
alpha: Optional[float] = None, beta: Optional[float] = None, gamma: Optional[float] = None,
|
alpha: Optional[float] = None, beta: Optional[float] = None, gamma: Optional[float] = None,
|
||||||
degrees: bool = False):
|
degrees: bool = False):
|
||||||
|
@ -772,7 +772,7 @@ class Crystal():
|
||||||
Directions and planes of deformation mode families.
|
Directions and planes of deformation mode families.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
_kinematics: Dict[CrystalLattice, Dict[CrystalKinematics, List[np.ndarray]]] = {
|
_kinematics: Dict[BravaisLattice, Dict[CrystalKinematics, List[np.ndarray]]] = {
|
||||||
'cF': {
|
'cF': {
|
||||||
'slip': [np.array([
|
'slip': [np.array([
|
||||||
[+0,+1,-1, +1,+1,+1],
|
[+0,+1,-1, +1,+1,+1],
|
||||||
|
@ -1015,7 +1015,7 @@ class Crystal():
|
||||||
|
|
||||||
|
|
||||||
def relation_operations(self,
|
def relation_operations(self,
|
||||||
model: str) -> Tuple[CrystalLattice, Rotation]:
|
model: str) -> Tuple[BravaisLattice, Rotation]:
|
||||||
"""
|
"""
|
||||||
Crystallographic orientation relationships for phase transformations.
|
Crystallographic orientation relationships for phase transformations.
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ from typing import Optional, Union, TypeVar
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from ._typehints import FloatSequence, IntSequence, CrystalFamily, CrystalLattice
|
from ._typehints import FloatSequence, IntSequence, CrystalFamily, BravaisLattice
|
||||||
from . import Rotation
|
from . import Rotation
|
||||||
from . import Crystal
|
from . import Crystal
|
||||||
from . import util
|
from . import util
|
||||||
|
@ -73,7 +73,7 @@ class Orientation(Rotation,Crystal):
|
||||||
rotation: Union[FloatSequence, Rotation] = np.array([1.,0.,0.,0.]),
|
rotation: Union[FloatSequence, Rotation] = np.array([1.,0.,0.,0.]),
|
||||||
*,
|
*,
|
||||||
family: Optional[CrystalFamily] = None,
|
family: Optional[CrystalFamily] = None,
|
||||||
lattice: Optional[CrystalLattice] = None,
|
lattice: Optional[BravaisLattice] = None,
|
||||||
a: Optional[float] = None, b: Optional[float] = None, c: Optional[float] = None,
|
a: Optional[float] = None, b: Optional[float] = None, c: Optional[float] = None,
|
||||||
alpha: Optional[float] = None, beta: Optional[float] = None, gamma: Optional[float] = None,
|
alpha: Optional[float] = None, beta: Optional[float] = None, gamma: Optional[float] = None,
|
||||||
degrees: bool = False):
|
degrees: bool = False):
|
||||||
|
|
|
@ -11,7 +11,7 @@ IntSequence = Union[np.ndarray,Sequence[int]]
|
||||||
StrSequence = Union[np.ndarray,Sequence[str]]
|
StrSequence = Union[np.ndarray,Sequence[str]]
|
||||||
FileHandle = Union[TextIO, str, Path]
|
FileHandle = Union[TextIO, str, Path]
|
||||||
CrystalFamily = Union[None,Literal['triclinic', 'monoclinic', 'orthorhombic', 'tetragonal', 'hexagonal', 'cubic']]
|
CrystalFamily = Union[None,Literal['triclinic', 'monoclinic', 'orthorhombic', 'tetragonal', 'hexagonal', 'cubic']]
|
||||||
CrystalLattice = Union[None,Literal['aP', 'mP', 'mS', 'oP', 'oS', 'oI', 'oF', 'tP', 'tI', 'hP', 'cP', 'cI', 'cF']]
|
BravaisLattice = Union[None,Literal['aP', 'mP', 'mS', 'oP', 'oS', 'oI', 'oF', 'tP', 'tI', 'hP', 'cP', 'cI', 'cF']]
|
||||||
CrystalKinematics = Literal['slip', 'twin']
|
CrystalKinematics = Literal['slip', 'twin']
|
||||||
NumpyRngSeed = Union[int, IntSequence, np.random.SeedSequence, np.random.Generator]
|
NumpyRngSeed = Union[int, IntSequence, np.random.SeedSequence, np.random.Generator]
|
||||||
# BitGenerator does not exists in older numpy versions
|
# BitGenerator does not exists in older numpy versions
|
||||||
|
|
Loading…
Reference in New Issue