elasticipy 2.8.9__tar.gz → 2.8.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. {elasticipy-2.8.9/src/elasticipy.egg-info → elasticipy-2.8.10}/PKG-INFO +1 -1
  2. {elasticipy-2.8.9 → elasticipy-2.8.10}/src/Elasticipy/SecondOrderTensor.py +2 -1
  3. {elasticipy-2.8.9 → elasticipy-2.8.10/src/elasticipy.egg-info}/PKG-INFO +1 -1
  4. {elasticipy-2.8.9 → elasticipy-2.8.10}/src/elasticipy.egg-info/SOURCES.txt +0 -3
  5. {elasticipy-2.8.9 → elasticipy-2.8.10}/tests/test_StiffnessTensor.py +18 -2
  6. elasticipy-2.8.9/.github/workflows/conda-publish.yml +0 -53
  7. elasticipy-2.8.9/conda/build.sh +0 -3
  8. elasticipy-2.8.9/conda/meta.yaml +0 -15
  9. {elasticipy-2.8.9 → elasticipy-2.8.10}/.github/workflows/Codecov.yml +0 -0
  10. {elasticipy-2.8.9 → elasticipy-2.8.10}/.github/workflows/JOSS build.yml +0 -0
  11. {elasticipy-2.8.9 → elasticipy-2.8.10}/.github/workflows/cloc.yml +0 -0
  12. {elasticipy-2.8.9 → elasticipy-2.8.10}/.github/workflows/python-publish.yml +0 -0
  13. {elasticipy-2.8.9 → elasticipy-2.8.10}/.readthedocs.yaml +0 -0
  14. {elasticipy-2.8.9 → elasticipy-2.8.10}/CODE_OF_CONDUCT.md +0 -0
  15. {elasticipy-2.8.9 → elasticipy-2.8.10}/CONTRIBUTING.md +0 -0
  16. {elasticipy-2.8.9 → elasticipy-2.8.10}/Examples/Elasticipy_vs_pymatgen.py +0 -0
  17. {elasticipy-2.8.9 → elasticipy-2.8.10}/Examples/Elate_vs_Elasticipy.py +0 -0
  18. {elasticipy-2.8.9 → elasticipy-2.8.10}/Examples/Example_Stiffness_tensor.py +0 -0
  19. {elasticipy-2.8.9 → elasticipy-2.8.10}/Examples/Example_StressStrain_arrays.py +0 -0
  20. {elasticipy-2.8.9 → elasticipy-2.8.10}/Examples/Example_WaveVelocity.py +0 -0
  21. {elasticipy-2.8.9 → elasticipy-2.8.10}/Examples/MaterialsProject.json +0 -0
  22. {elasticipy-2.8.9 → elasticipy-2.8.10}/Examples/Multiple_phases.py +0 -0
  23. {elasticipy-2.8.9 → elasticipy-2.8.10}/Examples/example_readwrite.py +0 -0
  24. {elasticipy-2.8.9 → elasticipy-2.8.10}/JOSS/ElasticipyVSpymatgen.png +0 -0
  25. {elasticipy-2.8.9 → elasticipy-2.8.10}/JOSS/Nye.png +0 -0
  26. {elasticipy-2.8.9 → elasticipy-2.8.10}/JOSS/Plot_E.png +0 -0
  27. {elasticipy-2.8.9 → elasticipy-2.8.10}/JOSS/YoungModulus.png +0 -0
  28. {elasticipy-2.8.9 → elasticipy-2.8.10}/JOSS/paper.bib +0 -0
  29. {elasticipy-2.8.9 → elasticipy-2.8.10}/JOSS/paper.md +0 -0
  30. {elasticipy-2.8.9 → elasticipy-2.8.10}/LICENSE +0 -0
  31. {elasticipy-2.8.9 → elasticipy-2.8.10}/README.md +0 -0
  32. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/_static/images/HyperSphericalCoordinates.png +0 -0
  33. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/index.rst +0 -0
  34. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Elasticipy.FourthOrderTensor.rst +0 -0
  35. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Elasticipy.Plasticity.rst +0 -0
  36. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Elasticipy.SecondOrderTensor.rst +0 -0
  37. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Elasticipy.SphericalFunction.rst +0 -0
  38. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Elasticipy.StressStrainTensors.rst +0 -0
  39. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Elasticipy.rst +0 -0
  40. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/GUI.rst +0 -0
  41. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/Tutorial_AveragingMethods.rst +0 -0
  42. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/Tutorial_MultiplePhases.rst +0 -0
  43. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/Tutorial_ReadWriteFiles.rst +0 -0
  44. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/Tutorial_StiffnessTensor.rst +0 -0
  45. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/Tutorial_StressStrain.rst +0 -0
  46. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/Tutorial_ThermalExpansion.rst +0 -0
  47. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/Tutorial_wave-velocities.rst +0 -0
  48. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/images/E_PF.png +0 -0
  49. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/images/E_VRH_sections.png +0 -0
  50. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/images/E_hill_fiber.png +0 -0
  51. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/images/E_plot3D.png +0 -0
  52. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/images/E_xyz_sections.png +0 -0
  53. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/images/GUI.png +0 -0
  54. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/images/G_plot3D.png +0 -0
  55. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/images/G_plot3D_min.png +0 -0
  56. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/images/G_xyz_sections.png +0 -0
  57. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/images/WaveVelocities.png +0 -0
  58. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials/images/plot_volumeFraction.png +0 -0
  59. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/Tutorials.rst +0 -0
  60. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/conf.py +0 -0
  61. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/index.rst +0 -0
  62. {elasticipy-2.8.9 → elasticipy-2.8.10}/docs/source/modules.rst +0 -0
  63. {elasticipy-2.8.9 → elasticipy-2.8.10}/pyproject.toml +0 -0
  64. {elasticipy-2.8.9 → elasticipy-2.8.10}/requirements.txt +0 -0
  65. {elasticipy-2.8.9 → elasticipy-2.8.10}/setup.cfg +0 -0
  66. {elasticipy-2.8.9 → elasticipy-2.8.10}/src/Elasticipy/CrystalSymmetries.py +0 -0
  67. {elasticipy-2.8.9 → elasticipy-2.8.10}/src/Elasticipy/FourthOrderTensor.py +0 -0
  68. {elasticipy-2.8.9 → elasticipy-2.8.10}/src/Elasticipy/Plasticity.py +0 -0
  69. {elasticipy-2.8.9 → elasticipy-2.8.10}/src/Elasticipy/PoleFigure.py +0 -0
  70. {elasticipy-2.8.9 → elasticipy-2.8.10}/src/Elasticipy/SphericalFunction.py +0 -0
  71. {elasticipy-2.8.9 → elasticipy-2.8.10}/src/Elasticipy/StressStrainTensors.py +0 -0
  72. {elasticipy-2.8.9 → elasticipy-2.8.10}/src/Elasticipy/ThermalExpansion.py +0 -0
  73. {elasticipy-2.8.9 → elasticipy-2.8.10}/src/Elasticipy/__init__.py +0 -0
  74. {elasticipy-2.8.9 → elasticipy-2.8.10}/src/Elasticipy/gui.py +0 -0
  75. {elasticipy-2.8.9 → elasticipy-2.8.10}/src/elasticipy.egg-info/dependency_links.txt +0 -0
  76. {elasticipy-2.8.9 → elasticipy-2.8.10}/src/elasticipy.egg-info/requires.txt +0 -0
  77. {elasticipy-2.8.9 → elasticipy-2.8.10}/src/elasticipy.egg-info/top_level.txt +0 -0
  78. {elasticipy-2.8.9 → elasticipy-2.8.10}/tests/MaterialsProject.json +0 -0
  79. {elasticipy-2.8.9 → elasticipy-2.8.10}/tests/__init__.py +0 -0
  80. {elasticipy-2.8.9 → elasticipy-2.8.10}/tests/test_SphericalFunction.py +0 -0
  81. {elasticipy-2.8.9 → elasticipy-2.8.10}/tests/test_StressStrainTensors.py +0 -0
  82. {elasticipy-2.8.9 → elasticipy-2.8.10}/tests/test_ThermalExpansion.py +0 -0
  83. {elasticipy-2.8.9 → elasticipy-2.8.10}/tests/test_plasticity.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: elasticipy
3
- Version: 2.8.9
3
+ Version: 2.8.10
4
4
  Summary: A Python library for elasticity tensor computations
5
5
  Author-email: Dorian Depriester <dorian.dep@gmail.com>
6
6
  License: MIT
@@ -1352,7 +1352,8 @@ def rotation_to_matrix(rotation, return_transpose=False):
1352
1352
  if isinstance(rotation, Rotation):
1353
1353
  matrix = rotation.as_matrix()
1354
1354
  elif is_orix_rotation(rotation):
1355
- matrix = rotation.to_matrix()
1355
+ inv_rotation = ~rotation
1356
+ matrix = inv_rotation.to_matrix()
1356
1357
  else:
1357
1358
  raise TypeError('The input argument must be of class scipy.transform.Rotation or '
1358
1359
  'orix.quaternion.rotation.Rotation')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: elasticipy
3
- Version: 2.8.9
3
+ Version: 2.8.10
4
4
  Summary: A Python library for elasticity tensor computations
5
5
  Author-email: Dorian Depriester <dorian.dep@gmail.com>
6
6
  License: MIT
@@ -8,7 +8,6 @@ requirements.txt
8
8
  .github/workflows/Codecov.yml
9
9
  .github/workflows/JOSS build.yml
10
10
  .github/workflows/cloc.yml
11
- .github/workflows/conda-publish.yml
12
11
  .github/workflows/python-publish.yml
13
12
  Examples/Elasticipy_vs_pymatgen.py
14
13
  Examples/Elate_vs_Elasticipy.py
@@ -24,8 +23,6 @@ JOSS/Plot_E.png
24
23
  JOSS/YoungModulus.png
25
24
  JOSS/paper.bib
26
25
  JOSS/paper.md
27
- conda/build.sh
28
- conda/meta.yaml
29
26
  docs/index.rst
30
27
  docs/_static/images/HyperSphericalCoordinates.png
31
28
  docs/source/Elasticipy.FourthOrderTensor.rst
@@ -398,11 +398,19 @@ class TestStiffnessConstructor(unittest.TestCase):
398
398
 
399
399
  def test_write_read_tensor(self):
400
400
  """Test export and import stiffness tensor to text file"""
401
- C = StiffnessTensor.isotropic(E=210, nu=0.3)
402
401
  filename = 'C_tmp.txt'
402
+ C = StiffnessTensor.isotropic(E=210, nu=0.3)
403
+ C.save_to_txt(filename)
404
+ C2 = StiffnessTensor.from_txt_file(filename)
405
+ np.testing.assert_allclose(C2.matrix, C.matrix, atol=1e-2)
406
+
407
+ # Now the same with phase name
408
+ C = StiffnessTensor.isotropic(E=210, nu=0.3, phase_name='Steel')
403
409
  C.save_to_txt(filename)
404
410
  C2 = StiffnessTensor.from_txt_file(filename)
405
411
  np.testing.assert_allclose(C2.matrix, C.matrix, atol=1e-2)
412
+ assert C2.phase_name == 'Steel'
413
+
406
414
 
407
415
  def test_equality(self):
408
416
  """Test == operator"""
@@ -612,10 +620,18 @@ class TestStiffnessConstructor(unittest.TestCase):
612
620
  C_rotated = C * orix_rotations
613
621
  C_rotated_full = C_rotated.full_tensor()
614
622
  for i in range(n):
615
- rot_mat = orix_rotations.to_matrix()[i]
623
+ inv_rotation = ~orix_rotations
624
+ rot_mat = inv_rotation.to_matrix()[i]
616
625
  tensor_i = np.einsum('im,jn,ko,lp,mnop -> ijkl', rot_mat, rot_mat, rot_mat, rot_mat, C.full_tensor())
617
626
  np.testing.assert_array_almost_equal(C_rotated_full[i], tensor_i)
618
627
 
628
+ # Check that the result is consistent with scipy.Rotation
629
+ euler = orix_rotations.to_euler()
630
+ scipy_rotations = Rotation.from_euler('ZXZ', euler)
631
+ C_rotated_scipy = C * scipy_rotations
632
+ C_rotated_full_scipy = C_rotated_scipy.full_tensor()
633
+ np.testing.assert_array_almost_equal(C_rotated_full_scipy, C_rotated_full)
634
+
619
635
 
620
636
  def test_linear_compressibility(self):
621
637
  E, nu = 210, 0.3
@@ -1,53 +0,0 @@
1
- name: Upload Elasticipy to Conda
2
-
3
- on:
4
- push:
5
- tags:
6
- - "v*" # Runs when a tag starting with "v" (e.g., v1.0.0) is pushed
7
-
8
- jobs:
9
- build-and-upload:
10
- runs-on: ubuntu-latest
11
-
12
- steps:
13
- - name: Checkout repository
14
- uses: actions/checkout@v2
15
-
16
- - name: Copy requirements.txt
17
- run: cp requirements.txt conda/
18
-
19
- - name: Set up Conda
20
- uses: conda-incubator/setup-miniconda@v2
21
- with:
22
- auto-update-conda: true
23
- python-version: "3.10"
24
- channels: conda-forge,defaults
25
- activate-environment: elasticipy
26
-
27
- - name: Install dependencies
28
- run: |
29
- conda create -n elasticipy python=3.10 -y
30
- conda run -n elasticipy conda install anaconda-client conda-build -y
31
- conda run -n elasticipy conda install numpy -y
32
-
33
-
34
- - name: Extract version from tag
35
- id: extract_version
36
- run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
37
-
38
- - name: Build package
39
- run: |
40
- conda run -n elasticipy conda build conda --old-build-string --output-folder build --no-anaconda-upload
41
-
42
- - name: Find built package
43
- id: find-package
44
- run: |
45
- PACKAGE_PATH=$(find build/ -name "*.tar.bz2")
46
- echo "PACKAGE_PATH=$PACKAGE_PATH" >> $GITHUB_ENV
47
-
48
- - name: Upload package
49
- env:
50
- ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
51
- run: |
52
- conda run -n elasticipy anaconda login --token $ANACONDA_API_TOKEN
53
- conda run -n elasticipy anaconda upload ${{ env.PACKAGE_PATH }}
@@ -1,3 +0,0 @@
1
- #!/bin/bash
2
- pip install -r requirements.txt
3
- pip install .
@@ -1,15 +0,0 @@
1
- package:
2
- name: elasticipy
3
- version: {{ environ.get('VERSION', '0.1.0') }}
4
-
5
- source:
6
- path: .
7
-
8
- requirements:
9
- build:
10
- - python
11
- - setuptools
12
- - wheel
13
- run:
14
- - python
15
- - pip
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes