elasticipy 4.0.0__tar.gz → 4.1.0__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 (133) hide show
  1. {elasticipy-4.0.0 → elasticipy-4.1.0}/.github/workflows/Codecov.yml +1 -1
  2. {elasticipy-4.0.0 → elasticipy-4.1.0}/.readthedocs.yaml +1 -1
  3. elasticipy-4.1.0/CITATION.bib +17 -0
  4. elasticipy-4.1.0/CITATION.cff +11 -0
  5. {elasticipy-4.0.0 → elasticipy-4.1.0}/CONTRIBUTING.md +1 -1
  6. {elasticipy-4.0.0 → elasticipy-4.1.0}/Examples/Elate_vs_Elasticipy.py +1 -1
  7. {elasticipy-4.0.0 → elasticipy-4.1.0}/Examples/Example_Stiffness_tensor.py +32 -10
  8. {elasticipy-4.0.0 → elasticipy-4.1.0}/Examples/Example_StressStrain_arrays.py +2 -2
  9. {elasticipy-4.0.0 → elasticipy-4.1.0}/Examples/Example_WaveVelocity.py +7 -8
  10. {elasticipy-4.0.0 → elasticipy-4.1.0}/Examples/SelfConsistent.py +7 -10
  11. {elasticipy-4.0.0 → elasticipy-4.1.0}/Examples/essai_plasticity.py +2 -3
  12. elasticipy-4.1.0/JOSS/YoungModulus.png +0 -0
  13. {elasticipy-4.0.0 → elasticipy-4.1.0}/JOSS/paper.md +10 -9
  14. {elasticipy-4.0.0 → elasticipy-4.1.0}/PKG-INFO +22 -4
  15. {elasticipy-4.0.0 → elasticipy-4.1.0}/README.md +18 -2
  16. elasticipy-4.1.0/docs/source/Elasticipy.interfaces.FEPX.rst +7 -0
  17. elasticipy-4.1.0/docs/source/Elasticipy.interfaces.PRISMS.rst +7 -0
  18. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Elasticipy.rst +2 -1
  19. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/Plasticity.rst +7 -35
  20. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/Tutorial_StiffnessTensor.rst +12 -0
  21. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/Tutorial_StressStrain.rst +42 -5
  22. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/Tutorial_wave-velocities.rst +8 -10
  23. elasticipy-4.1.0/docs/source/Tutorials/images/Mohr.png +0 -0
  24. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/conf.py +5 -1
  25. {elasticipy-4.0.0 → elasticipy-4.1.0}/pyproject.toml +5 -3
  26. {elasticipy-4.0.0 → elasticipy-4.1.0}/requirements.txt +2 -1
  27. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/Elasticipy/gui.py +1 -1
  28. elasticipy-4.1.0/src/Elasticipy/interfaces/FEPX.py +119 -0
  29. elasticipy-4.1.0/src/Elasticipy/interfaces/PRISMS.py +103 -0
  30. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/Elasticipy/plasticity.py +34 -1
  31. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/Elasticipy/polefigure.py +21 -0
  32. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/Elasticipy/spherical_function.py +2 -14
  33. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/Elasticipy/tensors/elasticity.py +171 -79
  34. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/Elasticipy/tensors/fourth_order.py +126 -55
  35. elasticipy-4.1.0/src/Elasticipy/tensors/mapping.py +44 -0
  36. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/Elasticipy/tensors/second_order.py +107 -3
  37. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/Elasticipy/tensors/stress_strain.py +20 -4
  38. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/elasticipy.egg-info/PKG-INFO +22 -4
  39. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/elasticipy.egg-info/SOURCES.txt +32 -1
  40. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/elasticipy.egg-info/requires.txt +3 -1
  41. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/.sim +23 -0
  42. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/defrate/defrate.step0 +2453 -0
  43. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/defrate/defrate.step1 +2453 -0
  44. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/defrate/defrate.step2 +2453 -0
  45. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/ori/ori.step0 +2453 -0
  46. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/ori/ori.step1 +2453 -0
  47. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/ori/ori.step2 +2453 -0
  48. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/spinrate/spinrate.step0 +2453 -0
  49. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/spinrate/spinrate.step1 +2453 -0
  50. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/spinrate/spinrate.step2 +2453 -0
  51. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/strain/strain.step0 +2453 -0
  52. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/strain/strain.step1 +2453 -0
  53. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/strain/strain.step2 +2453 -0
  54. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/stress/stress.step0 +2453 -0
  55. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/stress/stress.step1 +2453 -0
  56. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/stress/stress.step2 +2453 -0
  57. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/velgrad/velgrad.step0 +2453 -0
  58. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/velgrad/velgrad.step1 +2453 -0
  59. elasticipy-4.1.0/tests/interfaces/FEPX/simulation.sim/results/elts/velgrad/velgrad.step2 +2453 -0
  60. elasticipy-4.1.0/tests/interfaces/PRISMS/QuadratureOutputs.csv +64 -0
  61. elasticipy-4.1.0/tests/interfaces/PRISMS/stressstrain.txt +101 -0
  62. {elasticipy-4.0.0 → elasticipy-4.1.0}/tests/test_FourthOrderTensors.py +4 -4
  63. {elasticipy-4.0.0 → elasticipy-4.1.0}/tests/test_SphericalFunction.py +1 -1
  64. {elasticipy-4.0.0 → elasticipy-4.1.0}/tests/test_StiffnessTensor.py +64 -29
  65. {elasticipy-4.0.0 → elasticipy-4.1.0}/tests/test_StressStrainTensors.py +36 -6
  66. {elasticipy-4.0.0 → elasticipy-4.1.0}/tests/test_ThermalExpansion.py +2 -2
  67. elasticipy-4.1.0/tests/test_interfaces_FEPX.py +51 -0
  68. elasticipy-4.1.0/tests/test_interfaces_prisms.py +66 -0
  69. {elasticipy-4.0.0 → elasticipy-4.1.0}/tests/test_plasticity.py +22 -1
  70. elasticipy-4.0.0/JOSS/YoungModulus.png +0 -0
  71. {elasticipy-4.0.0 → elasticipy-4.1.0}/.github/workflows/JOSS build.yml +0 -0
  72. {elasticipy-4.0.0 → elasticipy-4.1.0}/.github/workflows/cloc.yml +0 -0
  73. {elasticipy-4.0.0 → elasticipy-4.1.0}/.github/workflows/python-publish.yml +0 -0
  74. {elasticipy-4.0.0 → elasticipy-4.1.0}/CODE_OF_CONDUCT.md +0 -0
  75. {elasticipy-4.0.0 → elasticipy-4.1.0}/Examples/Elasticipy_vs_pymatgen.py +0 -0
  76. {elasticipy-4.0.0 → elasticipy-4.1.0}/Examples/MaterialsProject.json +0 -0
  77. {elasticipy-4.0.0 → elasticipy-4.1.0}/Examples/Multiple_phases.py +0 -0
  78. {elasticipy-4.0.0 → elasticipy-4.1.0}/Examples/example_readwrite.py +0 -0
  79. {elasticipy-4.0.0 → elasticipy-4.1.0}/JOSS/ElasticipyVSpymatgen.png +0 -0
  80. {elasticipy-4.0.0 → elasticipy-4.1.0}/JOSS/Nye.png +0 -0
  81. {elasticipy-4.0.0 → elasticipy-4.1.0}/JOSS/Plot_E.png +0 -0
  82. {elasticipy-4.0.0 → elasticipy-4.1.0}/JOSS/paper.bib +0 -0
  83. {elasticipy-4.0.0 → elasticipy-4.1.0}/LICENSE +0 -0
  84. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/_static/images/HyperSphericalCoordinates.png +0 -0
  85. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/index.rst +0 -0
  86. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Elasticipy.plasticity.rst +0 -0
  87. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Elasticipy.spherical_function.rst +0 -0
  88. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Elasticipy.tensors.elasticity.rst +0 -0
  89. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Elasticipy.tensors.fourth_order.rst +0 -0
  90. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Elasticipy.tensors.second_order.rst +0 -0
  91. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Elasticipy.tensors.stress_strain.rst +0 -0
  92. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/GUI.rst +0 -0
  93. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/Tutorial_AveragingMethods.rst +0 -0
  94. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/Tutorial_MultiplePhases.rst +0 -0
  95. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/Tutorial_ReadWriteFiles.rst +0 -0
  96. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/Tutorial_ThermalExpansion.rst +0 -0
  97. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/Cyclic.png +0 -0
  98. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/E_PF.png +0 -0
  99. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/E_VRH_sections.png +0 -0
  100. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/E_hill_fiber.png +0 -0
  101. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/E_plot3D.png +0 -0
  102. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/E_xyz_sections.png +0 -0
  103. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/GUI.png +0 -0
  104. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/G_plot3D.png +0 -0
  105. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/G_plot3D_min.png +0 -0
  106. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/G_xyz_sections.png +0 -0
  107. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/Incremental.png +0 -0
  108. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/Shear.png +0 -0
  109. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/Stress-controlled.png +0 -0
  110. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/StressStrain-controlled.png +0 -0
  111. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/WaveVelocities.png +0 -0
  112. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials/images/plot_volumeFraction.png +0 -0
  113. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/Tutorials.rst +0 -0
  114. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/index.rst +0 -0
  115. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/logo/favicon.png +0 -0
  116. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/logo/logo.png +0 -0
  117. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/logo/logo.svg +0 -0
  118. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/logo/logo_text.png +0 -0
  119. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/logo/logo_text.svg +0 -0
  120. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/logo/logo_text_whitebg.png +0 -0
  121. {elasticipy-4.0.0 → elasticipy-4.1.0}/docs/source/modules.rst +0 -0
  122. {elasticipy-4.0.0 → elasticipy-4.1.0}/setup.cfg +0 -0
  123. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/Elasticipy/FourthOrderTensor.py +0 -0
  124. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/Elasticipy/StressStrainTensors.py +0 -0
  125. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/Elasticipy/ThermalExpansion.py +0 -0
  126. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/Elasticipy/__init__.py +0 -0
  127. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/Elasticipy/crystal_symmetries.py +0 -0
  128. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/Elasticipy/tensors/__init__.py +0 -0
  129. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/Elasticipy/tensors/thermal_expansion.py +0 -0
  130. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/elasticipy.egg-info/dependency_links.txt +0 -0
  131. {elasticipy-4.0.0 → elasticipy-4.1.0}/src/elasticipy.egg-info/top_level.txt +0 -0
  132. {elasticipy-4.0.0 → elasticipy-4.1.0}/tests/MaterialsProject.json +0 -0
  133. {elasticipy-4.0.0 → elasticipy-4.1.0}/tests/__init__.py +0 -0
@@ -9,7 +9,7 @@ jobs:
9
9
  runs-on: ubuntu-latest
10
10
  strategy:
11
11
  matrix:
12
- python-version: ["3.10", "3.11", "3.12"]
12
+ python-version: ["3.11", "3.12"]
13
13
 
14
14
  steps:
15
15
  - name: Checkout
@@ -15,7 +15,7 @@ build:
15
15
  # golang: "1.20"
16
16
  jobs:
17
17
  post_create_environment:
18
- - python -m pip install sphinx_rtd_theme mp_api
18
+ - python -m pip install sphinx_rtd_theme mp_api sphinx_copybutton
19
19
 
20
20
  # Build documentation in the "docs/" directory with Sphinx
21
21
  sphinx:
@@ -0,0 +1,17 @@
1
+ @software{dorian_depriester_2025_15188346,
2
+ author = {Dorian Depriester},
3
+ title = {DorianDepriester/Elasticipy: v4.0.0},
4
+ month = apr,
5
+ year = 2025,
6
+ publisher = {Zenodo},
7
+ version = {v4.0.0},
8
+ doi = {10.5281/zenodo.15188346},
9
+ url = {https://doi.org/10.5281/zenodo.15188346},
10
+ swhid = {swh:1:dir:f9538575fb87ee10510bd51906012987986fc36a
11
+ ;origin=https://doi.org/10.5281/zenodo.14501849;vi
12
+ sit=swh:1:snp:20bf603cb1ae305b4d37a4567557ac860e09
13
+ d3e5;anchor=swh:1:rel:6dad2d91dcebe09e35d44f82a0c8
14
+ a46c77f0d057;path=DorianDepriester-
15
+ Elasticipy-c8bfc05
16
+ },
17
+ }
@@ -0,0 +1,11 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it as below."
3
+ authors:
4
+ - family-names: "Depriester"
5
+ given-names: "Dorian"
6
+ orcid: "https://orcid.org/0000-0002-2881-8942"
7
+ title: "Elasticipy"
8
+ version: 4.0.0
9
+ doi: 10.5281/zenodo.15188346
10
+ date-released: 2025-04-10
11
+ url: "https://github.com/DorianDepriester/Elasticipy"
@@ -25,7 +25,7 @@ All types of contributions are encouraged and valued. See the [Table of Contents
25
25
  ## Code of Conduct
26
26
 
27
27
  This project and everyone participating in it is governed by the
28
- [Elasticipy Code of Conduct](https://github.com/DorianDepriester/Elasticipy/blob//CODE_OF_CONDUCT.md).
28
+ [Elasticipy Code of Conduct](https://github.com/DorianDepriester/Elasticipy/blob/main/CODE_OF_CONDUCT.md).
29
29
  By participating, you are expected to uphold this code. Please report unacceptable behavior
30
30
  to <dorian.dep@gmail.com>.
31
31
 
@@ -13,7 +13,7 @@ C = StiffnessTensor.monoclinic(phase_name='TiNi',
13
13
  C22=240, C23=131, C33=175,
14
14
  C44=81, C55=11, C66=85,
15
15
  C15=-18, C25=1, C35=-3, C46=3)
16
- Celate = Elastic(list(C.matrix))
16
+ Celate = Elastic(list(C._matrix))
17
17
 
18
18
  # Plotting with Elate
19
19
  start_time=time.perf_counter()
@@ -1,7 +1,14 @@
1
1
  from Elasticipy.tensors.elasticity import StiffnessTensor
2
2
  from scipy.spatial.transform import Rotation
3
+
4
+ ################################################
5
+ # The lines below are only required in PyCharm
6
+ ################################################
3
7
  import matplotlib as mpl
4
- mpl.use('Qt5Agg') # Ensure interactive plot
8
+ mpl.use('Qt5Agg')
9
+ from qtpy import QtWidgets
10
+ app = QtWidgets.QApplication.instance() or QtWidgets.QApplication([])
11
+ ################################################
5
12
 
6
13
  # First, let consider the NiTi material:
7
14
  C = StiffnessTensor.fromCrystalSymmetry(symmetry='monoclinic', diad='y', phase_name='TiNi',
@@ -15,29 +22,43 @@ print(C)
15
22
  E = C.Young_modulus
16
23
  # See min/max values
17
24
  print(E)
25
+
18
26
  # Now illustrate the spatial dependence
19
- E.plot_xyz_sections() # As 2D sections...
20
- E.plot3D() # ...or in 3D
21
- E.plot_as_pole_figure() # or even with PF
27
+ fig,_ = E.plot_xyz_sections() # As 2D sections...
28
+ fig.show()
29
+ fig,_ = E.plot3D() # ...or in 3D
30
+ fig.show()
31
+ fig,_ =E.plot_as_pole_figure() # or even with PF
32
+ fig.show()
33
+
34
+ # Print out the maximum value for the Young modulus
22
35
  print(E.max())
23
36
 
24
37
  # Apply a random rotation on stiffness tensor
25
38
  rotation = Rotation.from_euler('ZXZ', [90, 45, 0], degrees=True)
26
39
  Crot = C*rotation
27
40
  # Check that the Young modulus has changed as well
28
- Crot.Young_modulus.plot3D()
41
+ fig, _ = Crot.Young_modulus.plot3D()
42
+ fig.show()
29
43
 
30
44
  # Now let's consider the shear modulus
31
45
  G = C.shear_modulus
32
- G.plot_xyz_sections() # Plot sections with min, max and mean
33
- G.plot3D() # And plot it in 3D
46
+ fig,_ = G.plot_xyz_sections() # Plot sections with min, max and mean
47
+ fig.show()
48
+
49
+ fig,_ = G.plot3D() # And plot it in 3D
50
+ fig.show()
34
51
  print(G.min())
35
52
  print(G.max())
36
53
 
37
54
  # Finally, let's have a look on the Poisson ratio
38
55
  nu = C.Poisson_ratio
39
- nu.plot_xyz_sections()
40
- nu.plot3D(which='max')
56
+ fig,_ = nu.plot_xyz_sections()
57
+ fig.show()
58
+ fig,_ = nu.plot3D(which='max')
59
+ fig.show()
60
+
61
+ # Check out the maximum and minimum values
41
62
  print(nu.min())
42
63
  print(nu.max())
43
64
 
@@ -45,7 +66,8 @@ print(nu.max())
45
66
  oris = Rotation.random(1000)
46
67
  Crotated = C*oris # Compute the Voigt average
47
68
  Cvoigt = Crotated.Voigt_average()
48
- print(Cvoigt.Young_modulus) # Look at the corresponding Young modulis
69
+ print(Cvoigt.Young_modulus) # Look at the corresponding Young moduli
49
70
  print(C.Voigt_average().Young_modulus) # Compare with infinite number of orientations
50
71
 
51
72
 
73
+ app.exec() # Only required in PyCharm (see lines 7-10)
@@ -61,7 +61,7 @@ from scipy.spatial.transform import Rotation
61
61
  n_ori = 1000
62
62
  rotations = Rotation.random(n_ori)
63
63
 
64
- eps_rotated = eps.matmul(rotations)
64
+ eps_rotated = eps.rotate(rotations, mode='cross')
65
65
  print(eps_rotated.shape) # Just to check how it looks like
66
66
 
67
67
  sigma_rotated = C * eps_rotated
@@ -72,7 +72,7 @@ sigma_mean = sigma.mean(axis=1) # Compute the mean over all orientations
72
72
  print(sigma_mean[-1])
73
73
 
74
74
  C_rotated = C * rotations
75
- C_Voigt = C_rotated.Voigt_average()
75
+ C_Voigt = C_rotated.Voigt_average() # Now check that the previous result is consistent with Voigt average
76
76
  sigma_Voigt = C_Voigt * eps
77
77
  print(sigma_Voigt[-1])
78
78
 
@@ -1,15 +1,14 @@
1
1
  from Elasticipy.tensors.elasticity import StiffnessTensor
2
- import matplotlib as mpl
3
- mpl.use('Qt5Agg') # Ensure interactive plot
2
+ from matplotlib import pyplot as plt
4
3
 
5
- C = StiffnessTensor.fromCrystalSymmetry(symmetry='orthorombic', phase_name='forsterite',
4
+ C = StiffnessTensor.fromCrystalSymmetry(symmetry='orthorhombic', phase_name='forsterite',
6
5
  C11=320, C12=68.2, C13=71.6,
7
6
  C22=196.5, C23=76.8, C33=233.5, C44=64, C55=77, C66=78.7)
8
7
  rho = 3.355
9
8
 
10
9
  cp, cs_fast, cs_slow = C.wave_velocity(rho)
11
- print(cp)
12
-
13
- fig, _ =cp.plot_as_pole_figure(subplot_args=(131,), title='p wave', show=False)
14
- cs_fast.plot_as_pole_figure(subplot_args=(132,), title='s wave (fast)', fig=fig, show=False)
15
- cs_slow.plot_as_pole_figure(subplot_args=(133,), title='s wave (slow)', fig=fig, show=True)
10
+ fig = plt.figure(figsize=(12,4))
11
+ cp.plot_as_pole_figure(subplot_args=(131,), title='p wave', fig=fig)
12
+ cs_fast.plot_as_pole_figure(subplot_args=(132,), title='s wave (fast)', fig=fig)
13
+ cs_slow.plot_as_pole_figure(subplot_args=(133,), title='s wave (slow)', fig=fig)
14
+ fig.show()
@@ -27,7 +27,7 @@ def polarization_tensor(C_macro_local, a1, a2, a3, n_phi, n_theta):
27
27
 
28
28
  def localization_tensor(C_macro_local, C_incl, n_phi, n_theta, a1, a2, a3):
29
29
  E = polarization_tensor(C_macro_local, a1, a2, a3, n_phi, n_theta)
30
- delta = FourthOrderTensor(C_incl.matrix - C_macro_local.matrix)
30
+ delta = FourthOrderTensor(C_incl._matrix - C_macro_local._matrix)
31
31
  Ainv = E.ddot(delta) + I
32
32
  return Ainv.inv()
33
33
 
@@ -53,13 +53,13 @@ def Kroner_Eshelby(Ci, g, method='strain', max_iter=5, atol=1e-3, rtol=1e-3, dis
53
53
  Q = Ci_rotated.ddot(A)
54
54
  if method=='stress':
55
55
  CiAi_mean = Q.mean()
56
- C_macro = StiffnessTensor.from_Kelvin(CiAi_mean.matrix, force_symmetries=True)
56
+ C_macro = StiffnessTensor.from_Kelvin(CiAi_mean._matrix, force_symmetries=True)
57
57
  err = A.mean() - FourthOrderTensor.identity()
58
58
  else:
59
59
  B = Q.ddot(C_macro.inv())
60
60
  R = Ci_rotated.inv().ddot(B)
61
61
  R_mean = R.mean()
62
- C_macro = StiffnessTensor.from_Kelvin(R_mean.inv().matrix, force_symmetries=True)
62
+ C_macro = StiffnessTensor.from_Kelvin(R_mean.inv()._matrix, force_symmetries=True)
63
63
  err = B.mean() - FourthOrderTensor.identity()
64
64
 
65
65
  # Stopping criteria
@@ -77,13 +77,10 @@ def Kroner_Eshelby(Ci, g, method='strain', max_iter=5, atol=1e-3, rtol=1e-3, dis
77
77
  if k == max_iter:
78
78
  keep_on = False
79
79
  if display:
80
- err = np.max(np.abs(err.matrix))
80
+ err = np.max(np.abs(err._matrix))
81
81
  print('Iter #{}: abs. change={:0.5f}; rel. change={:0.5f}; error={:0.5f}'.format(k, max_abs_change, rel_change,err))
82
82
  return C_macro, message
83
83
 
84
- Cstrip = StiffnessTensor.transverse_isotropic(Ex= 10.2, Ez=146.8, nu_zx=0.274, nu_yx=0.355, Gxz=7)
85
- Cstrip = Cstrip * Rotation.from_euler('Y', 90, degrees=True)
86
- #orientations = Rotation.from_euler('Z', np.linspace(0, 180, 10, endpoint=False), degrees=True)
87
- orientations = Rotation.random(100, random_state=1234)
88
- Cstrip = StiffnessTensor.cubic(C11=186, C12=134, C44=77)
89
- C_stress, reason = Kroner_Eshelby(Cstrip, orientations, display=True, method='strain')
84
+ C=StiffnessTensor.cubic(C11=108, C44=28.3, C12=62)
85
+ orientations = Rotation.random(1000)
86
+ Cmacro, msg = Kroner_Eshelby(C, orientations, method='stress', display=True)
@@ -3,8 +3,6 @@ from Elasticipy.tensors.stress_strain import StressTensor, StrainTensor
3
3
  from Elasticipy.tensors.elasticity import StiffnessTensor
4
4
  import numpy as np
5
5
  from matplotlib import pyplot as plt
6
- import matplotlib as mpl
7
- mpl.use('Qt5Agg') # Ensure interactive plot
8
6
 
9
7
 
10
8
  JC = JohnsonCook(A=363, B=792.7122, n=0.5756) # https://doi.org/10.1016/j.matpr.2020.05.213
@@ -70,4 +68,5 @@ for j, model in enumerate(models):
70
68
  ax.plot(eps_xy, stress_mag, label=labels[j])
71
69
  ax.set_xlabel(r'$\varepsilon_{xy}$')
72
70
  ax.set_ylabel('Shear stress (MPa)')
73
- ax.legend()
71
+ ax.legend()
72
+ fig.show()
Binary file
@@ -112,7 +112,7 @@ orthogonal sections.
112
112
 
113
113
  ![Young modulus (GPa) of Cu single crystal as a 3D surface (a) or a pole figure (b);
114
114
  Young modulus of Cu polycrystal with $[001]$ fiber texture, plotted in three orthogonal sections, depending on the
115
- averaging method. \label{fig:Young}](YoungModulus.png)
115
+ averaging method (c). \label{fig:Young}](YoungModulus.png)
116
116
 
117
117
  Elasticipy also introduces the concept of *tensor arrays*, in a similar way as in MTEX [@MTEX], allowing to
118
118
  process several tensors at once with simple and highly efficient commands. In order to highlight the performances
@@ -136,19 +136,20 @@ to other averaging methods (e.g. self-consistent models), possibly beyond linear
136
136
  with ease. It already implements thermal expansion.
137
137
 
138
138
  # Usage
139
+ This section presents the syntaxes of few basic operations performed with Elasticipy v4.0.0.
139
140
 
140
141
  ## Plot directional engineering constants
141
142
 
142
143
  \autoref{fig:Young}.a) and b) were rendered with the following syntax:
143
144
 
144
145
  ````python
145
-
146
146
  from Elasticipy.tensors.elasticity import StiffnessTensor
147
-
148
147
  C = StiffnessTensor.cubic(C11=186, C12=134, C44=77)
149
148
  E = C.Young_modulus
150
- E.plot3D(n_phi=500, n_theta=500)
151
- E.plot_as_pole_figure()
149
+ fig, _ = E.plot3D(n_phi=500, n_theta=500)
150
+ fig.show()
151
+ fig, _ = E.plot_as_pole_figure()
152
+ fig.show()
152
153
  ````
153
154
 
154
155
  ## Create an array of rotated stiffness tensors and compute average
@@ -162,7 +163,7 @@ n = 10000
162
163
  phi1 = np.random.random(n)*2*np.pi # Random sampling from 0 to 2pi
163
164
  Euler_angles = np.array([phi1, np.zeros(n), np.zeros(n)]).T # Fibre texture
164
165
  rotations = Rotation.from_euler('ZXZ', Euler_angles) # Bunge-Euler angles
165
- C_rotated = C * rotations # n-lenght tensor array
166
+ C_rotated = C * rotations # n-length tensor array
166
167
  ````
167
168
 
168
169
  Then, the Voigt--Reuss--Hill average [@hill] can be computed from the tensor array:
@@ -174,7 +175,8 @@ C_VRH = C_rotated.Hill_average()
174
175
  Finally, the corresponding Young moduli can be plotted in orthogonal sections, as shown in \autoref{fig:Young}.c), with:
175
176
 
176
177
  ````python
177
- C_VRH.Young_modulus.plot_xyz_sections()
178
+ fig, ax = C_VRH.Young_modulus.plot_xyz_sections()
179
+ fig.show()
178
180
  ````
179
181
 
180
182
  ## Arrays of stress/strain tensor
@@ -184,7 +186,6 @@ will create a tensor array corresponding to evenly-spaced strain along $[1,0,0]$
184
186
 
185
187
  ````python
186
188
  from Elasticipy.tensors.stress_strain import StrainTensor
187
-
188
189
  m = 1000 # length of tensor array
189
190
  mag = np.linspace(0, 0.1, m) # Strain magnitude
190
191
  strain = StrainTensor.tensile([1, 0, 0], mag)
@@ -194,7 +195,7 @@ Given the stiffness tensor ``C`` (see above), one can compute the corresponding
194
195
  ````python
195
196
  stress = C * strain
196
197
  ````
197
- Finally, ``stress.von_Mises()`` returns an array of length ``n`` and data type ``float64``, providing all the
198
+ Finally, ``stress.vonMises()`` returns an array of length ``n`` and data type ``float64``, providing all the
198
199
  corresponding von Mises equivalent stresses.
199
200
 
200
201
  # References
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: elasticipy
3
- Version: 4.0.0
3
+ Version: 4.1.0
4
4
  Summary: A Python library for elasticity tensor computations
5
5
  Author-email: Dorian Depriester <dorian.dep@gmail.com>
6
6
  License: MIT
@@ -15,18 +15,20 @@ Classifier: Programming Language :: Python
15
15
  Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
- Requires-Python: >=3.10
18
+ Requires-Python: >=3.11
19
19
  Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
21
  Requires-Dist: numpy
22
22
  Requires-Dist: scipy
23
23
  Requires-Dist: matplotlib
24
+ Requires-Dist: qtpy
25
+ Requires-Dist: pandas
24
26
  Provides-Extra: dev
25
27
  Requires-Dist: pytest; extra == "dev"
26
28
  Requires-Dist: pytest-cov; extra == "dev"
27
29
  Requires-Dist: pymatgen; extra == "dev"
28
30
  Requires-Dist: orix; extra == "dev"
29
- Requires-Dist: mp_api; extra == "dev"
31
+ Requires-Dist: mp_api==0.45.9; extra == "dev"
30
32
  Dynamic: license-file
31
33
 
32
34
  [![PyPI - Version](https://img.shields.io/pypi/v/Elasticipy?link=https%3A%2F%2Fpypi.org%2Fproject%2FElasticipy%2F)](https://pypi.org/project/elasticipy/)
@@ -48,7 +50,7 @@ Among other features, this package implements:
48
50
 
49
51
  - Computation of elasticity tensors,
50
52
  - Analysis of elastic anisotropy and wave propagation,
51
- - Working with multidimensional arrays of strain and stress tensors,
53
+ - Working with multidimensional arrays of tensors,
52
54
  - Thermal expansion tensors,
53
55
  - Rotation of tensors,
54
56
  - Integration with crystal symmetry groups,
@@ -79,3 +81,19 @@ Certain parts of the code, particularly those related to graphical user interfac
79
81
  **excluded from code coverage analysis**. This includes the following file:
80
82
 
81
83
  - **`src/Elasticipy/gui.py`**
84
+
85
+ ## Cite this package
86
+ If you use Elasticipy, please cite [![DOI](https://zenodo.org/badge/876162900.svg)](https://doi.org/10.5281/zenodo.14501849)
87
+
88
+ You can use the following BibTeX entry:
89
+ ````bibtex
90
+ @software{Elasticipy,
91
+ author = {Depriester, Dorian},
92
+ doi = {10.5281/zenodo.15188346},
93
+ month = apr,
94
+ title = {{Elasticipy}},
95
+ url = {https://github.com/DorianDepriester/Elasticipy},
96
+ version = {4.0.0},
97
+ year = {2025}
98
+ }
99
+ ````
@@ -17,7 +17,7 @@ Among other features, this package implements:
17
17
 
18
18
  - Computation of elasticity tensors,
19
19
  - Analysis of elastic anisotropy and wave propagation,
20
- - Working with multidimensional arrays of strain and stress tensors,
20
+ - Working with multidimensional arrays of tensors,
21
21
  - Thermal expansion tensors,
22
22
  - Rotation of tensors,
23
23
  - Integration with crystal symmetry groups,
@@ -47,4 +47,20 @@ The project uses unit tests with `pytest` and coverage reports generated using `
47
47
  Certain parts of the code, particularly those related to graphical user interfaces (GUIs) or visual plotting, are
48
48
  **excluded from code coverage analysis**. This includes the following file:
49
49
 
50
- - **`src/Elasticipy/gui.py`**
50
+ - **`src/Elasticipy/gui.py`**
51
+
52
+ ## Cite this package
53
+ If you use Elasticipy, please cite [![DOI](https://zenodo.org/badge/876162900.svg)](https://doi.org/10.5281/zenodo.14501849)
54
+
55
+ You can use the following BibTeX entry:
56
+ ````bibtex
57
+ @software{Elasticipy,
58
+ author = {Depriester, Dorian},
59
+ doi = {10.5281/zenodo.15188346},
60
+ month = apr,
61
+ title = {{Elasticipy}},
62
+ url = {https://github.com/DorianDepriester/Elasticipy},
63
+ version = {4.0.0},
64
+ year = {2025}
65
+ }
66
+ ````
@@ -0,0 +1,7 @@
1
+ Elasticipy.interfaces.FEPX module
2
+ ====================================
3
+
4
+ .. automodule:: Elasticipy.interfaces.FEPX
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ Elasticipy.interfaces.PRISMS module
2
+ ====================================
3
+
4
+ .. automodule:: Elasticipy.interfaces.PRISMS
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -13,7 +13,8 @@ Submodules
13
13
  Elasticipy.tensors.stress_strain
14
14
  Elasticipy.spherical_function
15
15
  Elasticipy.plasticity
16
-
16
+ Elasticipy.interfaces.PRISMS
17
+ Elasticipy.interfaces.FEPX
17
18
 
18
19
  Module contents
19
20
  ---------------
@@ -75,33 +75,6 @@ That's all. Finally, let us plot the applied stress as a function of the overall
75
75
  >>> ax.set_xlabel(r'$\varepsilon_{xx}$') # doctest: +SKIP
76
76
  >>> ax.set_ylabel('Tensile stress (MPa)') # doctest: +SKIP
77
77
 
78
- Now, let say that we want to investigate the material's response for the tensile stress ranging from 0 to 725 MPa:
79
-
80
- >>> import numpy as np
81
- >>> n_step = 100
82
- >>> stress_mag = np.linspace(0, 725, n_step)
83
- >>> stress = StressTensor.tensile([1,0,0], stress_mag)
84
-
85
- At least, we can directly compute the elastic strain for each step:
86
-
87
- >>> elastic_strain = C.inv() * stress
88
-
89
- So now, the plastic strain can be computed using an iterative approach:
90
-
91
- >>> plastic_strain = StrainTensor.zeros(n_step)
92
- >>> for i in range(1, n_step):
93
- ... strain_increment = JC.compute_strain_increment(stress[i])
94
- ... plastic_strain[i] = plastic_strain[i-1] + strain_increment
95
-
96
- That's all. Finally, let us plot the applied stress as a function of the overall elongation:
97
-
98
- >>> from matplotlib import pyplot as plt
99
- >>> elong = elastic_strain.C[0,0]+plastic_strain.C[0,0]
100
- >>> fig, ax = plt.subplots()
101
- >>> ax.plot(elong, stress_mag, label='Stress-controlled') # doctest: +SKIP
102
- >>> ax.set_xlabel(r'$\varepsilon_{xx}$') # doctest: +SKIP
103
- >>> ax.set_ylabel('Tensile stress (MPa)') # doctest: +SKIP
104
-
105
78
  .. image:: images/Stress-controlled.png
106
79
 
107
80
 
@@ -179,12 +152,11 @@ Tresca's plasticity criterion
179
152
  Above, we have used the von Mises plasticity criterion (a.k.a J2 criterion). This can be switched to Tresca by passing
180
153
  the plasticity criterion to the model constructor:
181
154
 
182
- >>> JC = JohnsonCook(A=363, B=792.7122, n=0.5756, criterion='Tresca')
155
+ >>> JC_tresca = JohnsonCook(A=363, B=792.7122, n=0.5756, criterion='Tresca')
183
156
 
184
157
  For instance, one can highlight the difference between the J2 and Tresca plasticity in shear:
185
158
 
186
159
  >>> JC.reset_strain()
187
- >>> JC_tresca = JohnsonCook(A=363, B=792.7122, n=0.5756, criterion='Tresca')
188
160
  >>> stress_mag = np.linspace(0, 500, n_step)
189
161
  >>> stress = StressTensor.shear([1,0,0], [0,1,0],stress_mag)
190
162
  >>> models = (JC, JC_tresca)
@@ -193,12 +165,12 @@ For instance, one can highlight the difference between the J2 and Tresca plastic
193
165
  >>> elastic_strain = C.inv() * stress
194
166
  >>> fig, ax = plt.subplots()
195
167
  >>> for j, model in enumerate(models):
196
- ... plastic_strain = StrainTensor.zeros(n_step)
197
- ... for i in range(1, n_step):
198
- ... strain_increment = model.compute_strain_increment(stress[i])
199
- ... plastic_strain[i] = plastic_strain[i-1] + strain_increment
200
- ... eps_xy = elastic_strain.C[0,1]+plastic_strain.C[0,1]
201
- ... ax.plot(eps_xy, stress_mag, label=labels[j])
168
+ ... plastic_strain = StrainTensor.zeros(n_step)
169
+ ... for i in range(1, n_step):
170
+ ... strain_increment = model.compute_strain_increment(stress[i])
171
+ ... plastic_strain[i] = plastic_strain[i-1] + strain_increment
172
+ ... eps_xy = elastic_strain.C[0,1]+plastic_strain.C[0,1]
173
+ ... ax.plot(eps_xy, stress_mag, label=labels[j]) # doctest: +SKIP
202
174
  >>> ax.set_xlabel(r'$\varepsilon_{xy}$') # doctest: +SKIP
203
175
  >>> ax.set_ylabel('Shear stress (MPa)') # doctest: +SKIP
204
176
  >>> ax.legend() # doctest: +SKIP
@@ -32,6 +32,11 @@ let's see its value along the x, y and z directions:
32
32
  >>> print((Ex, Ey, Ez))
33
33
  (124.52232440357189, 120.92120854784433, 96.13750721721384)
34
34
 
35
+ .. note::
36
+
37
+ As the components for the stiffness tensor were provided in GPa, the values for the Young modulus are given in GPa
38
+ as well.
39
+
35
40
  Actually, a more compact syntax, and a faster way to do that, is to use:
36
41
 
37
42
  >>> import numpy as np
@@ -87,7 +92,9 @@ Spherical functions
87
92
  ~~~~~~~~~~~~~~~~~~~
88
93
  In order to fully evidence the directional dependence of the Young moduli, we can plot them as 3D surface:
89
94
 
95
+ >>> from matplotlib import pyplot as plt
90
96
  >>> E.plot3D() # doctest: +SKIP
97
+ >>> plt.show()
91
98
 
92
99
  .. image:: images/E_plot3D.png
93
100
  :width: 400
@@ -96,6 +103,7 @@ It is advised to use interactive plot to be able to zoom/rotate the surface. For
96
103
  document/articles), we can plot the values as a Pole Figure (PF):
97
104
 
98
105
  >>> E.plot_as_pole_figure() # doctest: +SKIP
106
+ >>> plt.show()
99
107
 
100
108
  .. image:: images/E_PF.png
101
109
  :width: 400
@@ -103,6 +111,7 @@ document/articles), we can plot the values as a Pole Figure (PF):
103
111
  Alternatively, we can plot the Young moduli on X-Y, X-Z and Y-Z sections only:
104
112
 
105
113
  >>> E.plot_xyz_sections() # doctest: +SKIP
114
+ >>> plt.show()
106
115
 
107
116
  .. image:: images/E_xyz_sections.png
108
117
  :width: 600
@@ -114,6 +123,7 @@ But at least, for a each direction **u**, we can consider the mean value for all
114
123
  plotting:
115
124
 
116
125
  >>> G.plot3D() # doctest: +SKIP
126
+ >>> plt.show()
117
127
 
118
128
  .. image:: images/G_plot3D.png
119
129
  :width: 400
@@ -121,6 +131,7 @@ plotting:
121
131
  Instead of the mean value, we can consider other statistics, e.g.:
122
132
 
123
133
  >>> G.plot3D(which='min') # doctest: +SKIP
134
+ >>> plt.show()
124
135
 
125
136
  .. image:: images/G_plot3D_min.png
126
137
  :width: 400
@@ -130,6 +141,7 @@ This also works for ``max`` and ``std``. These parameters also apply for pole fi
130
141
  When plotting the X-Y, X-Z and Y-Z sections, the min, max and mean values are plotted at once:
131
142
 
132
143
  >>> G.plot_xyz_sections() # doctest: +SKIP
144
+ >>> plt.show()
133
145
 
134
146
  .. image:: images/G_xyz_sections.png
135
147
  :width: 600
@@ -12,9 +12,9 @@ equivalent stresses:
12
12
  .. doctest::
13
13
 
14
14
  >>> from Elasticipy.tensors.stress_strain import StressTensor, StrainTensor
15
- >>> stress = StressTensor.shear([1, 0, 0], [0, 1, 0], 1.0) # Unit XY shear stress
16
- >>> print(stress.vonMises(), stress.Tresca())
17
- 1.7320508075688772 2.0
15
+ >>> stress = StressTensor.shear([1, 0, 0], [0, 1, 0], 1.0) # Unit XY shear stress
16
+ >>> print(stress.vonMises(), stress.Tresca())
17
+ 1.7320508075688772 2.0
18
18
 
19
19
  So now, let's have a look on the strain tensor, and compute the principal strains and the volumetric change:
20
20
 
@@ -60,6 +60,10 @@ Considering the previous strain, evaluate the corresponding stress:
60
60
  [164.0625 0. 0. ]
61
61
  [ 0. 0. 0. ]]
62
62
 
63
+ .. note::
64
+
65
+ As the components for the stiffness tensor were provided in MPa, the computed stress is given in MPa as well.
66
+
63
67
  Conversely, one can compute the compliance tensor:
64
68
 
65
69
  >>> S = C.inv()
@@ -87,6 +91,39 @@ and check that we retrieve the correct (initial) strain:
87
91
  [0.001 0. 0. ]
88
92
  [0. 0. 0. ]]
89
93
 
94
+ The Mohr circles
95
+ ----------------
96
+ Let's consider a random stress tensor:
97
+
98
+ >>> s = StressTensor.rand(seed=123) # Use seed to ensure reproducibility
99
+ >>> s
100
+ Stress tensor
101
+ [[0.68235186 0.11909641 0.57185244]
102
+ [0.11909641 0.1759059 0.54433445]
103
+ [0.57185244 0.54433445 0.81975456]]
104
+
105
+ A practical way to visualize its principal stresses and the possible shear stresses is to draw the
106
+ `Mohr circles <https://en.wikipedia.org/wiki/Mohr%27s_circle>`_:
107
+
108
+ >>> fig, ax = s.draw_Mohr_circles()
109
+ >>> fig.show()
110
+
111
+ .. image:: images/Mohr.png
112
+ :width: 600
113
+
114
+ In this figure, one can see that the principal stresses are around 1.512, 0.352 and -0.186 (in decreasing order); and
115
+ that the maximum shear stress is around 0.849. Those can be checked by:
116
+
117
+ >>> s.principal_stresses()
118
+ array([ 1.51167769, 0.3519979 , -0.18566326])
119
+ >>> s.Tresca() / 2
120
+ 0.848670477704235
121
+
122
+
123
+ .. note::
124
+
125
+ As a recall, the Tresca's equivalent stress is defined as half the maximum shear stress.
126
+
90
127
  .. _multidimensional-arrays:
91
128
 
92
129
  Multidimensional tensor arrays
@@ -161,8 +198,8 @@ for details) or not. For instance, if we want to compute the divergence of ``sig
161
198
  [ 0. , 11.11111111, 0. ]])
162
199
 
163
200
  Here, the *i*-th row provides the divergence vector for the *i*-th stress tensor.
164
- See `the full documentation <../Elasticipy.SecondOrderTensor.html#Elasticipy.SecondOrderTensor.SecondOrderTensor.div>`_ for
165
- details about this function.
201
+ See `the full documentation <../Elasticipy.tensors.second_order.html#Elasticipy.tensors.second_order.SecondOrderTensor.div>`_
202
+ for details about this function.
166
203
 
167
204
  .. _strain_rotations:
168
205