Worth adding np.around() to this line?
Closed this issue · 3 comments
Gbowker commented
I would like to add np.around(data, decimal=15) here to ensure quaternion orientations are extracted with machine precision.
damask-parse/damask_parse/utils.py
Line 535 in 2a08ffd
Gbowker commented
This would be to improve feat/multipass in matflow-damask to ensure initialisation of a simulation always goes ahead. Currently material.yaml files look like this:
microstructure:
- homogenization: SX
constituents:
- fraction: 1.0
orientation:
- 0.3946718422645498
- -0.33076098861323006
- -0.0005347737836765269
- 0.8572228527938958
phase: Ti64_alpha
I suggest they look like this (with readability also taken into account):
microstructure:
- homogenization: SX
constituents:
- fraction: 1.0
orientation:
- 0.394671842264549800000000000000
- -0.330760988613230060000000000000
- -0.000534773783676526900000000000
- 0.857222852793895800000000000000
phase: Ti64_alpha
Gbowker commented
Adam's fix Change/machine-precision_quats remedied this.