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:
Philip Eisenlohr 2023-08-18 13:52:07 +00:00
commit 32c1711b44
3 changed files with 9 additions and 9 deletions

View File

@ -2,11 +2,11 @@ from typing import Optional, Union, Dict, List, Tuple
import numpy as np
from ._typehints import FloatSequence, CrystalFamily, CrystalLattice, CrystalKinematics
from ._typehints import FloatSequence, CrystalFamily, BravaisLattice, CrystalKinematics
from . import util
from . import Rotation
lattice_symmetries: Dict[CrystalLattice, CrystalFamily] = {
lattice_symmetries: Dict[BravaisLattice, CrystalFamily] = {
'aP': 'triclinic',
'mP': 'monoclinic',
@ -27,7 +27,7 @@ lattice_symmetries: Dict[CrystalLattice, CrystalFamily] = {
'cF': 'cubic',
}
orientation_relationships: Dict[str, Dict[CrystalLattice,np.ndarray]] = {
orientation_relationships: Dict[str, Dict[BravaisLattice,np.ndarray]] = {
'KS': {
'cF': np.array([
[[-1, 0, 1],[ 1, 1, 1]],
@ -323,7 +323,7 @@ class Crystal():
def __init__(self, *,
family: Optional[CrystalFamily] = None,
lattice: Optional[CrystalLattice] = None,
lattice: Optional[BravaisLattice] = 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,
degrees: bool = False):
@ -772,7 +772,7 @@ class Crystal():
Directions and planes of deformation mode families.
"""
_kinematics: Dict[CrystalLattice, Dict[CrystalKinematics, List[np.ndarray]]] = {
_kinematics: Dict[BravaisLattice, Dict[CrystalKinematics, List[np.ndarray]]] = {
'cF': {
'slip': [np.array([
[+0,+1,-1, +1,+1,+1],
@ -1015,7 +1015,7 @@ class Crystal():
def relation_operations(self,
model: str) -> Tuple[CrystalLattice, Rotation]:
model: str) -> Tuple[BravaisLattice, Rotation]:
"""
Crystallographic orientation relationships for phase transformations.

View File

@ -3,7 +3,7 @@ from typing import Optional, Union, TypeVar
import numpy as np
from ._typehints import FloatSequence, IntSequence, CrystalFamily, CrystalLattice
from ._typehints import FloatSequence, IntSequence, CrystalFamily, BravaisLattice
from . import Rotation
from . import Crystal
from . import util
@ -73,7 +73,7 @@ class Orientation(Rotation,Crystal):
rotation: Union[FloatSequence, Rotation] = np.array([1.,0.,0.,0.]),
*,
family: Optional[CrystalFamily] = None,
lattice: Optional[CrystalLattice] = None,
lattice: Optional[BravaisLattice] = 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,
degrees: bool = False):

View File

@ -11,7 +11,7 @@ IntSequence = Union[np.ndarray,Sequence[int]]
StrSequence = Union[np.ndarray,Sequence[str]]
FileHandle = Union[TextIO, str, Path]
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']
NumpyRngSeed = Union[int, IntSequence, np.random.SeedSequence, np.random.Generator]
# BitGenerator does not exists in older numpy versions