Merge branch 'development' into YAML_parser
This commit is contained in:
commit
729fd32adf
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
|||
Subproject commit 72d526e5750366a9efe4d1fd9d92e0d1ecd2cd38
|
||||
Subproject commit 8dde2a68538b7cffbe9d370e2b60be90a31627ab
|
|
@ -1,4 +1,4 @@
|
|||
"""Main aggregator."""
|
||||
"""Tools for pre and post processing of DAMASK simulations."""
|
||||
import os as _os
|
||||
import re as _re
|
||||
|
||||
|
|
|
@ -229,19 +229,20 @@ class Symmetry:
|
|||
Return inverse pole figure color if requested.
|
||||
Bases are computed from
|
||||
|
||||
basis = {'cubic' : np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
||||
[1.,0.,1.]/np.sqrt(2.), # direction of green
|
||||
[1.,1.,1.]/np.sqrt(3.)]).T), # direction of blue
|
||||
'hexagonal' : np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
||||
[1.,0.,0.], # direction of green
|
||||
[np.sqrt(3.),1.,0.]/np.sqrt(4.)]).T), # direction of blue
|
||||
'tetragonal' : np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
||||
[1.,0.,0.], # direction of green
|
||||
[1.,1.,0.]/np.sqrt(2.)]).T), # direction of blue
|
||||
'orthorhombic' : np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
||||
[1.,0.,0.], # direction of green
|
||||
[0.,1.,0.]]).T), # direction of blue
|
||||
}
|
||||
>>> basis = {'cubic' : np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
||||
... [1.,0.,1.]/np.sqrt(2.), # direction of green
|
||||
... [1.,1.,1.]/np.sqrt(3.)]).T), # direction of blue
|
||||
... 'hexagonal' : np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
||||
... [1.,0.,0.], # direction of green
|
||||
... [np.sqrt(3.),1.,0.]/np.sqrt(4.)]).T), # direction of blue
|
||||
... 'tetragonal' : np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
||||
... [1.,0.,0.], # direction of green
|
||||
... [1.,1.,0.]/np.sqrt(2.)]).T), # direction of blue
|
||||
... 'orthorhombic': np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
||||
... [1.,0.,0.], # direction of green
|
||||
... [0.,1.,0.]]).T), # direction of blue
|
||||
... }
|
||||
|
||||
"""
|
||||
if self.lattice == 'cubic':
|
||||
basis = {'improper':np.array([ [-1. , 0. , 1. ],
|
||||
|
|
|
@ -8,6 +8,7 @@ class Orientation:
|
|||
Crystallographic orientation.
|
||||
|
||||
A crystallographic orientation contains a rotation and a lattice.
|
||||
|
||||
"""
|
||||
|
||||
__slots__ = ['rotation','lattice']
|
||||
|
@ -49,8 +50,10 @@ class Orientation:
|
|||
Disorientation between myself and given other orientation.
|
||||
|
||||
Rotation axis falls into SST if SST == True.
|
||||
(Currently requires same symmetry for both orientations.
|
||||
Look into A. Heinz and P. Neumann 1991 for cases with differing sym.)
|
||||
|
||||
Currently requires same symmetry for both orientations.
|
||||
Look into A. Heinz and P. Neumann 1991 for cases with differing sym.
|
||||
|
||||
"""
|
||||
if self.lattice.symmetry != other.lattice.symmetry:
|
||||
raise NotImplementedError('disorientation between different symmetry classes not supported yet.')
|
||||
|
|
|
@ -322,9 +322,10 @@ class Result:
|
|||
Return groups that contain all requested datasets.
|
||||
|
||||
Only groups within
|
||||
- inc?????/constituent/*_*/*
|
||||
- inc?????/materialpoint/*_*/*
|
||||
- inc?????/geometry/*
|
||||
- inc*/constituent/*/*
|
||||
- inc*/materialpoint/*/*
|
||||
- inc*/geometry/*
|
||||
|
||||
are considered as they contain user-relevant data.
|
||||
Single strings will be treated as list with one entry.
|
||||
|
||||
|
|
|
@ -17,30 +17,31 @@ class Rotation:
|
|||
u"""
|
||||
Orientation stored with functionality for conversion to different representations.
|
||||
|
||||
The following conventions apply:
|
||||
|
||||
- coordinate frames are right-handed.
|
||||
- a rotation angle ω is taken to be positive for a counterclockwise rotation
|
||||
when viewing from the end point of the rotation axis towards the origin.
|
||||
- rotations will be interpreted in the passive sense.
|
||||
- Euler angle triplets are implemented using the Bunge convention,
|
||||
with the angular ranges as [0, 2π],[0, π],[0, 2π].
|
||||
- the rotation angle ω is limited to the interval [0, π].
|
||||
- the real part of a quaternion is positive, Re(q) > 0
|
||||
- P = -1 (as default).
|
||||
|
||||
Examples
|
||||
--------
|
||||
Rotate vector "a" (defined in coordinate system "A") to
|
||||
coordinates "b" expressed in system "B":
|
||||
|
||||
- b = Q * a
|
||||
- b = np.dot(Q.asMatrix(),a)
|
||||
|
||||
References
|
||||
----------
|
||||
D. Rowenhorst et al., Modelling and Simulation in Materials Science and Engineering 23:083501, 2015
|
||||
https://doi.org/10.1088/0965-0393/23/8/083501
|
||||
|
||||
Conventions
|
||||
-----------
|
||||
Convention 1: Coordinate frames are right-handed.
|
||||
Convention 2: A rotation angle ω is taken to be positive for a counterclockwise rotation
|
||||
when viewing from the end point of the rotation axis towards the origin.
|
||||
Convention 3: Rotations will be interpreted in the passive sense.
|
||||
Convention 4: Euler angle triplets are implemented using the Bunge convention,
|
||||
with the angular ranges as [0, 2π],[0, π],[0, 2π].
|
||||
Convention 5: The rotation angle ω is limited to the interval [0, π].
|
||||
Convention 6: the real part of a quaternion is positive, Re(q) > 0
|
||||
Convention 7: P = -1 (as default).
|
||||
|
||||
Usage
|
||||
-----
|
||||
Vector "a" (defined in coordinate system "A") is passively rotated
|
||||
resulting in new coordinates "b" when expressed in system "B".
|
||||
b = Q * a
|
||||
b = np.dot(Q.asMatrix(),a)
|
||||
|
||||
"""
|
||||
|
||||
__slots__ = ['quaternion']
|
||||
|
|
|
@ -120,9 +120,9 @@ class VTK:
|
|||
Parameters
|
||||
----------
|
||||
fname : str
|
||||
Filename for reading. Valid extensions are *.vtr, *.vtu, *.vtp, and *.vtk.
|
||||
Filename for reading. Valid extensions are .vtr, .vtu, .vtp, and .vtk.
|
||||
dataset_type : str, optional
|
||||
Name of the vtk.vtkDataSet subclass when opening an *.vtk file. Valid types are vtkRectilinearGrid,
|
||||
Name of the vtk.vtkDataSet subclass when opening an .vtk file. Valid types are vtkRectilinearGrid,
|
||||
vtkUnstructuredGrid, and vtkPolyData.
|
||||
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue