elasticipy 5.0.0__py3-none-any.whl → 6.0.1__py3-none-any.whl

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 (34) hide show
  1. {Elasticipy → elasticipy}/FourthOrderTensor.py +4 -4
  2. elasticipy/StressStrainTensors.py +16 -0
  3. {Elasticipy → elasticipy}/ThermalExpansion.py +3 -3
  4. elasticipy/gui/__init__.py +3 -0
  5. elasticipy/gui/about.py +49 -0
  6. {Elasticipy → elasticipy/gui}/gui.py +138 -61
  7. elasticipy/gui/rotate_window.py +79 -0
  8. {Elasticipy → elasticipy}/interfaces/FEPX.py +2 -2
  9. {Elasticipy → elasticipy}/interfaces/PRISMS.py +2 -2
  10. {Elasticipy → elasticipy}/plasticity.py +6 -6
  11. elasticipy/resources/favicon.png +0 -0
  12. elasticipy/resources/logo_text.svg +126 -0
  13. {Elasticipy → elasticipy}/spherical_function.py +3 -3
  14. elasticipy/tensors/__init__.py +0 -0
  15. {Elasticipy → elasticipy}/tensors/elasticity.py +22 -22
  16. {Elasticipy → elasticipy}/tensors/fourth_order.py +20 -20
  17. {Elasticipy → elasticipy}/tensors/second_order.py +8 -8
  18. {Elasticipy → elasticipy}/tensors/stress_strain.py +10 -10
  19. {Elasticipy → elasticipy}/tensors/thermal_expansion.py +3 -3
  20. {elasticipy-5.0.0.dist-info → elasticipy-6.0.1.dist-info}/METADATA +11 -11
  21. elasticipy-6.0.1.dist-info/RECORD +30 -0
  22. elasticipy-6.0.1.dist-info/entry_points.txt +2 -0
  23. elasticipy-6.0.1.dist-info/top_level.txt +1 -0
  24. Elasticipy/StressStrainTensors.py +0 -16
  25. elasticipy-5.0.0.dist-info/RECORD +0 -24
  26. elasticipy-5.0.0.dist-info/entry_points.txt +0 -2
  27. elasticipy-5.0.0.dist-info/top_level.txt +0 -1
  28. {Elasticipy → elasticipy}/__init__.py +0 -0
  29. {Elasticipy → elasticipy}/crystal_symmetries.py +0 -0
  30. {Elasticipy/tensors → elasticipy/interfaces}/__init__.py +0 -0
  31. {Elasticipy → elasticipy}/polefigure.py +0 -0
  32. {Elasticipy → elasticipy}/tensors/mapping.py +0 -0
  33. {elasticipy-5.0.0.dist-info → elasticipy-6.0.1.dist-info}/WHEEL +0 -0
  34. {elasticipy-5.0.0.dist-info → elasticipy-6.0.1.dist-info}/licenses/LICENSE +0 -0
@@ -4,7 +4,7 @@ from matplotlib.colors import Normalize
4
4
  from numpy import cos, sin
5
5
  from scipy import integrate as integrate
6
6
  from scipy import optimize
7
- from Elasticipy.polefigure import add_polefigure
7
+ from elasticipy.polefigure import add_polefigure
8
8
 
9
9
 
10
10
  def sph2cart(*args):
@@ -242,7 +242,7 @@ class SphericalFunction:
242
242
  --------
243
243
  As an example of spherical function, we consider the Young modulus estimated from a stiffness tensor:
244
244
 
245
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor
245
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor
246
246
  >>> E = StiffnessTensor.cubic(C11=110, C12=54, C44=60).Young_modulus
247
247
 
248
248
  The Young modulus along x direction is:
@@ -299,7 +299,7 @@ class SphericalFunction:
299
299
 
300
300
  Examples
301
301
  --------
302
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor
302
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor
303
303
  >>> E = StiffnessTensor.cubic(C11=110, C12=54, C44=60).Young_modulus
304
304
 
305
305
  In spherical coordinates, the x direction is defined by theta=90° and phi=0. Therefore, the Young modulus along
File without changes
@@ -1,9 +1,9 @@
1
- from Elasticipy.tensors.fourth_order import SymmetricFourthOrderTensor, kelvin_mapping, _isotropic_matrix
2
- from Elasticipy.spherical_function import SphericalFunction, HyperSphericalFunction
3
- from Elasticipy.crystal_symmetries import SYMMETRIES
4
- from Elasticipy.tensors.second_order import SymmetricSecondOrderTensor
5
- from Elasticipy.tensors.stress_strain import StrainTensor, StressTensor
6
- from Elasticipy.tensors.mapping import VoigtMapping
1
+ from elasticipy.tensors.fourth_order import SymmetricFourthOrderTensor, kelvin_mapping, _isotropic_matrix
2
+ from elasticipy.spherical_function import SphericalFunction, HyperSphericalFunction
3
+ from elasticipy.crystal_symmetries import SYMMETRIES
4
+ from elasticipy.tensors.second_order import SymmetricSecondOrderTensor
5
+ from elasticipy.tensors.stress_strain import StrainTensor, StressTensor
6
+ from elasticipy.tensors.mapping import VoigtMapping
7
7
  from functools import wraps
8
8
  import numpy as np
9
9
  import re
@@ -99,7 +99,7 @@ class StiffnessTensor(SymmetricFourthOrderTensor):
99
99
  ... [0, 0, 0, 20, 0, 0 ],
100
100
  ... [0, 0, 0, 0, 20, 0 ],
101
101
  ... [0, 0, 0, 0, 0, 20]]
102
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor
102
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor
103
103
  >>> C = StiffnessTensor(matrix)
104
104
  >>> print(C)
105
105
  Stiffness tensor (in Voigt mapping):
@@ -437,7 +437,7 @@ class StiffnessTensor(SymmetricFourthOrderTensor):
437
437
 
438
438
  Examples
439
439
  --------
440
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor\n
440
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor\n
441
441
  >>> StiffnessTensor.fromCrystalSymmetry(symmetry='monoclinic', diad='y', phase_name='TiNi',
442
442
  ... C11=231, C12=127, C13=104,
443
443
  ... C22=240, C23=131, C33=175,
@@ -452,7 +452,7 @@ class StiffnessTensor(SymmetricFourthOrderTensor):
452
452
  [ 0. 0. 0. 3. 0. 85.]]
453
453
  Phase: TiNi
454
454
 
455
- >>> from Elasticipy.tensors.elasticity import ComplianceTensor\n
455
+ >>> from elasticipy.tensors.elasticity import ComplianceTensor\n
456
456
  >>> ComplianceTensor.fromCrystalSymmetry(symmetry='monoclinic', diad='y', phase_name='TiNi',
457
457
  ... S11=8, S12=-3, S13=-2,
458
458
  ... S22=8, S23=-5, S33=10,
@@ -877,7 +877,7 @@ class StiffnessTensor(SymmetricFourthOrderTensor):
877
877
  --------
878
878
  Let us consider the stiffness of pure copper:
879
879
 
880
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor
880
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor
881
881
  >>> C = StiffnessTensor.cubic(C11=186, C12=134, C44=77)
882
882
 
883
883
  If we assume that an aggregate is composed of an infinite set grains whose orientations are uniformly
@@ -954,7 +954,7 @@ class StiffnessTensor(SymmetricFourthOrderTensor):
954
954
  --------
955
955
  Let us consider the stiffness of pure copper:
956
956
 
957
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor
957
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor
958
958
  >>> C = StiffnessTensor.cubic(C11=186, C12=134, C44=77)
959
959
 
960
960
  If we assume that an aggregate is composed of an infinite set grains whose orientations are uniformly
@@ -1034,7 +1034,7 @@ class StiffnessTensor(SymmetricFourthOrderTensor):
1034
1034
  --------
1035
1035
  Let us consider the stiffness of pure copper:
1036
1036
 
1037
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor
1037
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor
1038
1038
  >>> C = StiffnessTensor.cubic(C11=186, C12=134, C44=77)
1039
1039
 
1040
1040
  If we assume that an aggregate is composed of an infinite set grains whose orientations are uniformly
@@ -1163,7 +1163,7 @@ class StiffnessTensor(SymmetricFourthOrderTensor):
1163
1163
  --------
1164
1164
  On can check that the shear modulus for steel is around 82 GPa:
1165
1165
 
1166
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor
1166
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor
1167
1167
  >>> C=StiffnessTensor.isotropic(E=210e3, nu=0.28)
1168
1168
  >>> C.shear_modulus
1169
1169
  Hyperspherical function
@@ -1339,7 +1339,7 @@ class StiffnessTensor(SymmetricFourthOrderTensor):
1339
1339
 
1340
1340
  Examples
1341
1341
  --------
1342
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor
1342
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor
1343
1343
  >>> C = StiffnessTensor.cubic(C11=186, C12=134, C44=77) # Cubic Cu
1344
1344
  >>> C.Christoffel_tensor([0, 0, 1])
1345
1345
  Symmetric second-order tensor
@@ -1610,7 +1610,7 @@ class StiffnessTensor(SymmetricFourthOrderTensor):
1610
1610
 
1611
1611
  Examples
1612
1612
  --------
1613
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor
1613
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor
1614
1614
  >>> C = StiffnessTensor.cubic(C11=200, C12=40, C44=20)
1615
1615
  >>> C.Zener_ratio()
1616
1616
  0.25
@@ -1653,7 +1653,7 @@ class StiffnessTensor(SymmetricFourthOrderTensor):
1653
1653
 
1654
1654
  def to_pymatgen(self):
1655
1655
  """
1656
- Convert the stiffness tensor (from Elasticipy) to Python Materials Genomics (Pymatgen) format.
1656
+ Convert the stiffness tensor (from elasticipy) to Python Materials Genomics (Pymatgen) format.
1657
1657
 
1658
1658
  Returns
1659
1659
  -------
@@ -1705,7 +1705,7 @@ class StiffnessTensor(SymmetricFourthOrderTensor):
1705
1705
 
1706
1706
  Examples
1707
1707
  --------
1708
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor
1708
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor
1709
1709
  >>> C = StiffnessTensor.cubic(C11=200, C12=40, C44=20)
1710
1710
  >>> print(C)
1711
1711
  Stiffness tensor (in Voigt mapping):
@@ -1772,7 +1772,7 @@ class StiffnessTensor(SymmetricFourthOrderTensor):
1772
1772
 
1773
1773
  Examples
1774
1774
  --------
1775
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor
1775
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor
1776
1776
  >>> C = StiffnessTensor.cubic(C11=200, C12=40, C44=20)
1777
1777
  >>> C.eig_stiffnesses
1778
1778
  array([ 40., 40., 40., 160., 160., 280.])
@@ -1861,7 +1861,7 @@ class StiffnessTensor(SymmetricFourthOrderTensor):
1861
1861
 
1862
1862
  Examples
1863
1863
  --------
1864
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor
1864
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor
1865
1865
  >>> C = StiffnessTensor.cubic(C11=186, C12=134, C44=77)
1866
1866
  >>> C.eig_stiffnesses
1867
1867
  array([ 52., 52., 154., 154., 154., 454.])
@@ -1938,7 +1938,7 @@ class StiffnessTensor(SymmetricFourthOrderTensor):
1938
1938
 
1939
1939
  Examples
1940
1940
  --------
1941
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor
1941
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor
1942
1942
  >>> from scipy.spatial.transform import Rotation
1943
1943
  >>> C = StiffnessTensor.cubic(C11=186, C12=134, C44=77)
1944
1944
  >>> C_rotated = C * Rotation.random(random_state=123)
@@ -2041,7 +2041,7 @@ class ComplianceTensor(StiffnessTensor):
2041
2041
  ... [0, 0, 0, 20, 0, 0 ],
2042
2042
  ... [0, 0, 0, 0, 20, 0 ],
2043
2043
  ... [0, 0, 0, 0, 0, 20]]
2044
- >>> from Elasticipy.tensors.elasticity import ComplianceTensor
2044
+ >>> from elasticipy.tensors.elasticity import ComplianceTensor
2045
2045
  >>> S = ComplianceTensor(matrix)
2046
2046
  >>> print(S)
2047
2047
  Compliance tensor (in Voigt mapping):
@@ -2261,7 +2261,7 @@ class ComplianceTensor(StiffnessTensor):
2261
2261
 
2262
2262
  def to_pymatgen(self):
2263
2263
  """
2264
- Convert the compliance tensor (from Elasticipy) to Python Materials Genomics (Pymatgen) format.
2264
+ Convert the compliance tensor (from elasticipy) to Python Materials Genomics (Pymatgen) format.
2265
2265
 
2266
2266
  Returns
2267
2267
  -------
@@ -1,9 +1,9 @@
1
1
  import numpy as np
2
- from Elasticipy.tensors.second_order import SymmetricSecondOrderTensor, rotation_to_matrix, is_orix_rotation, \
2
+ from elasticipy.tensors.second_order import SymmetricSecondOrderTensor, rotation_to_matrix, is_orix_rotation, \
3
3
  SecondOrderTensor, ALPHABET
4
4
  from scipy.spatial.transform import Rotation
5
5
  from copy import deepcopy
6
- from Elasticipy.tensors.mapping import KelvinMapping, VoigtMapping
6
+ from elasticipy.tensors.mapping import KelvinMapping, VoigtMapping
7
7
 
8
8
  kelvin_mapping = KelvinMapping()
9
9
 
@@ -119,7 +119,7 @@ class FourthOrderTensor:
119
119
  --------
120
120
  Consider a Fourth-order tensor, whose Kelvin matrix is:
121
121
 
122
- >>> from Elasticipy.tensors.fourth_order import FourthOrderTensor
122
+ >>> from elasticipy.tensors.fourth_order import FourthOrderTensor
123
123
  >>> import numpy as np
124
124
  >>> mat = np.array([[100, 200, 300, 0, 0, 0],
125
125
  ... [-200, 100, 50, 0, 0, 0],
@@ -154,7 +154,7 @@ class FourthOrderTensor:
154
154
  The half factor comes from the Kelvin mapping convention (see Notes). One can also use the Voigt mapping to
155
155
  avoid this:
156
156
 
157
- >>> from Elasticipy.tensors.mapping import VoigtMapping
157
+ >>> from elasticipy.tensors.mapping import VoigtMapping
158
158
  >>> T_voigt = FourthOrderTensor(mat, mapping=VoigtMapping())
159
159
  >>> print(T_voigt)
160
160
  4th-order tensor (in Voigt mapping):
@@ -283,7 +283,7 @@ class FourthOrderTensor:
283
283
 
284
284
  Examples
285
285
  --------
286
- >>> from Elasticipy.tensors.fourth_order import FourthOrderTensor
286
+ >>> from elasticipy.tensors.fourth_order import FourthOrderTensor
287
287
  >>> I = FourthOrderTensor.eye() # 4th order identity tensor
288
288
  >>> print(I)
289
289
  4th-order tensor (in Kelvin mapping):
@@ -326,7 +326,7 @@ class FourthOrderTensor:
326
326
 
327
327
  Examples
328
328
  --------
329
- >>> from Elasticipy.tensors.fourth_order import FourthOrderTensor
329
+ >>> from elasticipy.tensors.fourth_order import FourthOrderTensor
330
330
  >>> T = FourthOrderTensor.rand(shape=(5,6))
331
331
  >>> T
332
332
  4th-order tensor array of shape (5, 6)
@@ -366,7 +366,7 @@ class FourthOrderTensor:
366
366
  --------
367
367
  Let start from a given tensor, (say ones):
368
368
 
369
- >>> from Elasticipy.tensors.fourth_order import FourthOrderTensor
369
+ >>> from elasticipy.tensors.fourth_order import FourthOrderTensor
370
370
  >>> T = FourthOrderTensor.ones()
371
371
  >>> T
372
372
  4th-order tensor (in Kelvin mapping):
@@ -464,7 +464,7 @@ class FourthOrderTensor:
464
464
  --------
465
465
  Create a random tensor array of shape (5,6):
466
466
 
467
- >>> from Elasticipy.tensors.fourth_order import FourthOrderTensor
467
+ >>> from elasticipy.tensors.fourth_order import FourthOrderTensor
468
468
  >>> T = FourthOrderTensor.rand(shape=(5,6))
469
469
  >>> Overall_mean = T.mean()
470
470
  >>> Overall_mean.shape
@@ -539,7 +539,7 @@ class FourthOrderTensor:
539
539
  --------
540
540
  First, let consider two random arrays of Fourth-order tensors:
541
541
 
542
- >>> from Elasticipy.tensors.fourth_order import FourthOrderTensor
542
+ >>> from elasticipy.tensors.fourth_order import FourthOrderTensor
543
543
  >>> T1 = FourthOrderTensor.rand(shape=(2,3))
544
544
  >>> T2 = FourthOrderTensor.rand(shape=3)
545
545
  >>> T1T2_pair = T1.ddot(T2)
@@ -666,7 +666,7 @@ class FourthOrderTensor:
666
666
 
667
667
  Examples
668
668
  --------
669
- >>> from Elasticipy.tensors.fourth_order import FourthOrderTensor
669
+ >>> from elasticipy.tensors.fourth_order import FourthOrderTensor
670
670
  >>> A = FourthOrderTensor.rand(shape=(3,4))
671
671
  >>> A.transpose_array()
672
672
  4th-order tensor array of shape (4, 3)
@@ -785,7 +785,7 @@ class FourthOrderTensor:
785
785
  --------
786
786
  Create a (single) identity tensor:
787
787
 
788
- >>> from Elasticipy.tensors.fourth_order import FourthOrderTensor
788
+ >>> from elasticipy.tensors.fourth_order import FourthOrderTensor
789
789
  >>> I = FourthOrderTensor.eye()
790
790
  >>> print(I)
791
791
  4th-order tensor (in Kelvin mapping):
@@ -798,7 +798,7 @@ class FourthOrderTensor:
798
798
 
799
799
  Alternatively, one can use another mapping convention, e.g. Voigt:
800
800
 
801
- >>> from Elasticipy.tensors.mapping import VoigtMapping
801
+ >>> from elasticipy.tensors.mapping import VoigtMapping
802
802
  >>> Iv = FourthOrderTensor.eye(mapping=VoigtMapping())
803
803
  >>> print(Iv)
804
804
  4th-order tensor (in Voigt mapping):
@@ -859,7 +859,7 @@ class FourthOrderTensor:
859
859
 
860
860
  Alternatively, the Voigt mapping convention may help figuring it out:
861
861
 
862
- >>> from Elasticipy.tensors.mapping import VoigtMapping
862
+ >>> from elasticipy.tensors.mapping import VoigtMapping
863
863
  >>> tensor_of_ones_voigt = FourthOrderTensor.ones(mapping=VoigtMapping())
864
864
  >>> tensor_of_ones_voigt
865
865
  4th-order tensor (in Voigt mapping):
@@ -910,7 +910,7 @@ class FourthOrderTensor:
910
910
 
911
911
  Examples
912
912
  --------
913
- >>> from Elasticipy.tensors.fourth_order import FourthOrderTensor
913
+ >>> from elasticipy.tensors.fourth_order import FourthOrderTensor
914
914
  >>> J = FourthOrderTensor.identity_spherical_part()
915
915
  >>> print(J)
916
916
  4th-order tensor (in Kelvin mapping):
@@ -975,7 +975,7 @@ class FourthOrderTensor:
975
975
 
976
976
  Examples
977
977
  --------
978
- >>> from Elasticipy.tensors.fourth_order import FourthOrderTensor
978
+ >>> from elasticipy.tensors.fourth_order import FourthOrderTensor
979
979
  >>> K = FourthOrderTensor.identity_deviatoric_part()
980
980
  >>> print(K)
981
981
  4th-order tensor (in Kelvin mapping):
@@ -1054,7 +1054,7 @@ class FourthOrderTensor:
1054
1054
  --------
1055
1055
  Let consider a random Fourth-order tensor:
1056
1056
 
1057
- >>> from Elasticipy.tensors.fourth_order import FourthOrderTensor
1057
+ >>> from elasticipy.tensors.fourth_order import FourthOrderTensor
1058
1058
  >>> T = FourthOrderTensor.rand()
1059
1059
  >>> print(T) # doctest: +SKIP
1060
1060
 
@@ -1133,7 +1133,7 @@ class FourthOrderTensor:
1133
1133
  --------
1134
1134
  The single-valued null 4th order tensor is just:
1135
1135
 
1136
- >>> from Elasticipy.tensors.fourth_order import FourthOrderTensor
1136
+ >>> from elasticipy.tensors.fourth_order import FourthOrderTensor
1137
1137
  >>> FourthOrderTensor.zeros()
1138
1138
  4th-order tensor (in Kelvin mapping):
1139
1139
  [[0. 0. 0. 0. 0. 0.]
@@ -1177,7 +1177,7 @@ class FourthOrderTensor:
1177
1177
  --------
1178
1178
  Create an identity 4th-order tensor:
1179
1179
 
1180
- >>> from Elasticipy.tensors.fourth_order import FourthOrderTensor
1180
+ >>> from elasticipy.tensors.fourth_order import FourthOrderTensor
1181
1181
  >>> t = FourthOrderTensor.eye()
1182
1182
 
1183
1183
  Its matrix with respect to Kelvin mapping is:
@@ -1192,7 +1192,7 @@ class FourthOrderTensor:
1192
1192
 
1193
1193
  whereas, when using the Voigt mapping, we have:
1194
1194
 
1195
- >>> from Elasticipy.tensors.mapping import VoigtMapping
1195
+ >>> from elasticipy.tensors.mapping import VoigtMapping
1196
1196
  >>> t.matrix(mapping_convention=VoigtMapping())
1197
1197
  array([[1. , 0. , 0. , 0. , 0. , 0. ],
1198
1198
  [0. , 1. , 0. , 0. , 0. , 0. ],
@@ -1203,7 +1203,7 @@ class FourthOrderTensor:
1203
1203
 
1204
1204
  For stiffness tensors, the default mapping convention is Voigt, so that:
1205
1205
 
1206
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor, ComplianceTensor
1206
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor, ComplianceTensor
1207
1207
  >>> StiffnessTensor.eye().matrix()
1208
1208
  array([[1. , 0. , 0. , 0. , 0. , 0. ],
1209
1209
  [0. , 1. , 0. , 0. , 0. , 0. ],
@@ -559,7 +559,7 @@ class SecondOrderTensor:
559
559
 
560
560
  Examples
561
561
  --------
562
- >>> from Elasticipy.tensors.second_order import SecondOrderTensor
562
+ >>> from elasticipy.tensors.second_order import SecondOrderTensor
563
563
  >>> A=SecondOrderTensor.rand(10)
564
564
  >>> B=SecondOrderTensor.rand(10)
565
565
  >>> AB_pair = A.dot(B)
@@ -1085,7 +1085,7 @@ class SecondOrderTensor:
1085
1085
  --------
1086
1086
  Generate a single random tensor:
1087
1087
 
1088
- >>> from Elasticipy.tensors.second_order import SecondOrderTensor as tensor
1088
+ >>> from elasticipy.tensors.second_order import SecondOrderTensor as tensor
1089
1089
  >>> tensor.rand(seed=123)
1090
1090
  Second-order tensor
1091
1091
  [[0.68235186 0.05382102 0.22035987]
@@ -1219,7 +1219,7 @@ class SecondOrderTensor:
1219
1219
  --------
1220
1220
  First, we build an array of tensile stress with evenly spaced magnitude:
1221
1221
 
1222
- >>> from Elasticipy.tensors.stress_strain import StressTensor
1222
+ >>> from elasticipy.tensors.stress_strain import StressTensor
1223
1223
  >>> magnitude = [0,1,2,3,4]
1224
1224
  >>> s = StressTensor.tensile([1,0,0],magnitude)
1225
1225
  >>> s.div()
@@ -1415,7 +1415,7 @@ class SecondOrderTensor:
1415
1415
  flatten : Converts a tensor array to 1D tensor array
1416
1416
  """
1417
1417
  try:
1418
- from Elasticipy.tensors.stress_strain import StrainTensor, StressTensor
1418
+ from elasticipy.tensors.stress_strain import StrainTensor, StressTensor
1419
1419
  if isinstance(self, StrainTensor):
1420
1420
  from pymatgen.analysis.elasticity import Strain as Constructor
1421
1421
  elif isinstance(self, StressTensor):
@@ -1450,7 +1450,7 @@ class SecondOrderTensor:
1450
1450
 
1451
1451
  Examples
1452
1452
  --------
1453
- >>> from Elasticipy.tensors.second_order import SecondOrderTensor
1453
+ >>> from elasticipy.tensors.second_order import SecondOrderTensor
1454
1454
  >>> import numpy as np
1455
1455
  >>> a = SecondOrderTensor.rand(shape=3)
1456
1456
  >>> b = SecondOrderTensor.rand(shape=3)
@@ -1501,7 +1501,7 @@ class SymmetricSecondOrderTensor(SecondOrderTensor):
1501
1501
  --------
1502
1502
  We can create a symmetric tensor by privoding the full matrix, as long it is symmetric:
1503
1503
 
1504
- >>> from Elasticipy.tensors.second_order import SymmetricSecondOrderTensor
1504
+ >>> from elasticipy.tensors.second_order import SymmetricSecondOrderTensor
1505
1505
  >>> a = SymmetricSecondOrderTensor([[11, 12, 13],[12, 22, 23],[13, 23, 33]])
1506
1506
  >>> print(a)
1507
1507
  Symmetric second-order tensor
@@ -1564,7 +1564,7 @@ class SymmetricSecondOrderTensor(SecondOrderTensor):
1564
1564
 
1565
1565
  Examples
1566
1566
  --------
1567
- >>> from Elasticipy.tensors.second_order import SymmetricSecondOrderTensor
1567
+ >>> from elasticipy.tensors.second_order import SymmetricSecondOrderTensor
1568
1568
  >>> SymmetricSecondOrderTensor.from_Voigt([11, 22, 33, 23, 13, 12])
1569
1569
  Symmetric second-order tensor
1570
1570
  [[11. 12. 13.]
@@ -1719,7 +1719,7 @@ class SkewSymmetricSecondOrderTensor(SecondOrderTensor):
1719
1719
  --------
1720
1720
  One can construct a skew-symmetric tensor by providing the full skew-symmetric matrix:
1721
1721
 
1722
- >>> from Elasticipy.tensors.second_order import SkewSymmetricSecondOrderTensor
1722
+ >>> from elasticipy.tensors.second_order import SkewSymmetricSecondOrderTensor
1723
1723
  >>> a = SkewSymmetricSecondOrderTensor([[0, 12, 13],[-12, 0, 23],[-13, -23, 0]])
1724
1724
  >>> print(a)
1725
1725
  Skew-symmetric second-order tensor
@@ -1,5 +1,5 @@
1
1
  import numpy as np
2
- from Elasticipy.tensors.second_order import SymmetricSecondOrderTensor
2
+ from elasticipy.tensors.second_order import SymmetricSecondOrderTensor
3
3
 
4
4
 
5
5
  class StrainTensor(SymmetricSecondOrderTensor):
@@ -25,7 +25,7 @@ class StrainTensor(SymmetricSecondOrderTensor):
25
25
  --------
26
26
  For a single strain value, the principal strain values are composed of 3 float. E.g.:
27
27
 
28
- >>> from Elasticipy.tensors.stress_strain import StrainTensor
28
+ >>> from elasticipy.tensors.stress_strain import StrainTensor
29
29
  >>> eps = StrainTensor.shear([1,0,0],[0,1,0],1e-3)
30
30
  >>> eps.principal_strains()
31
31
  array([ 0.001, 0. , -0.001])
@@ -55,7 +55,7 @@ class StrainTensor(SymmetricSecondOrderTensor):
55
55
  --------
56
56
  At first, try with pure shear:
57
57
 
58
- >>> from Elasticipy.tensors.stress_strain import StrainTensor
58
+ >>> from elasticipy.tensors.stress_strain import StrainTensor
59
59
  >>> eps = StrainTensor.shear([1,0,0],[0,1,0],1e-3)
60
60
  >>> eps.volumetric_strain()
61
61
  0.0
@@ -92,7 +92,7 @@ class StrainTensor(SymmetricSecondOrderTensor):
92
92
 
93
93
  Examples
94
94
  --------
95
- >>> from Elasticipy.tensors.stress_strain import StrainTensor
95
+ >>> from elasticipy.tensors.stress_strain import StrainTensor
96
96
  >>> StrainTensor.tensile([1,0,0], 1e-3).eq_strain()
97
97
  0.000816496580927726
98
98
  >>> StrainTensor.shear([1,0,0],[0,1,0], 1e-3).eq_strain()
@@ -122,8 +122,8 @@ class StrainTensor(SymmetricSecondOrderTensor):
122
122
  Let consider an isotropic material (e.g. steel), undergoing tensile strain. In order to compute the volumetric
123
123
  elastic energy, one can do the following:
124
124
 
125
- >>> from Elasticipy.tensors.stress_strain import StrainTensor
126
- >>> from Elasticipy.tensors.elasticity import StiffnessTensor
125
+ >>> from elasticipy.tensors.stress_strain import StrainTensor
126
+ >>> from elasticipy.tensors.elasticity import StiffnessTensor
127
127
  >>> C = StiffnessTensor.isotropic(E=210e3, nu=0.28)
128
128
  >>> eps = StrainTensor.tensile([1,0,0],1e-3) # Define the strain
129
129
  >>> sigma = C * eps # Compute the stress
@@ -183,7 +183,7 @@ class StressTensor(SymmetricSecondOrderTensor):
183
183
  --------
184
184
  For (single-valued) tensile stress:
185
185
 
186
- >>> from Elasticipy.tensors.stress_strain import StressTensor
186
+ >>> from elasticipy.tensors.stress_strain import StressTensor
187
187
  >>> sigma = StressTensor.tensile([1,0,0],1)
188
188
  >>> sigma.vonMises()
189
189
  1.0
@@ -222,7 +222,7 @@ class StressTensor(SymmetricSecondOrderTensor):
222
222
  --------
223
223
  For (single-valued) tensile stress:
224
224
 
225
- >>> from Elasticipy.tensors.stress_strain import StressTensor
225
+ >>> from elasticipy.tensors.stress_strain import StressTensor
226
226
  >>> sigma = StressTensor.tensile([1,0,0],1)
227
227
  >>> sigma.Tresca()
228
228
  1.0
@@ -295,7 +295,7 @@ class StressTensor(SymmetricSecondOrderTensor):
295
295
  --------
296
296
  In order to illustrate this function, we consider a triaxial tensile stress:
297
297
 
298
- >>> from Elasticipy.tensors.stress_strain import StressTensor
298
+ >>> from elasticipy.tensors.stress_strain import StressTensor
299
299
  >>> sigma = StressTensor.tensile([1,0,0],1) + StressTensor.tensile([0,1,0],3)
300
300
 
301
301
  The princiapl stresses are obviously 0, 1 and 2:
@@ -346,7 +346,7 @@ class StressTensor(SymmetricSecondOrderTensor):
346
346
  --------
347
347
  One can check that the stress triaxiality is for simple tensile is 1/3:
348
348
 
349
- >>> from Elasticipy.tensors.stress_strain import StressTensor
349
+ >>> from elasticipy.tensors.stress_strain import StressTensor
350
350
  >>> s1 = StressTensor.tensile([1,0,0],1.)
351
351
  >>> s1.triaxiality()
352
352
  0.3333333333333333
@@ -1,7 +1,7 @@
1
1
  import warnings
2
2
 
3
- from Elasticipy.tensors.second_order import SymmetricSecondOrderTensor, ALPHABET, is_orix_rotation
4
- from Elasticipy.tensors.stress_strain import StrainTensor
3
+ from elasticipy.tensors.second_order import SymmetricSecondOrderTensor, ALPHABET, is_orix_rotation
4
+ from elasticipy.tensors.stress_strain import StrainTensor
5
5
  import numpy as np
6
6
  from scipy.spatial.transform import Rotation
7
7
 
@@ -41,7 +41,7 @@ class ThermalExpansionTensor(SymmetricSecondOrderTensor):
41
41
  --------
42
42
  Let consider a transverse isotropic case (e.g. carbon fibers):
43
43
 
44
- >>> from Elasticipy.tensors.thermal_expansion import ThermalExpansionTensor as ThEx
44
+ >>> from elasticipy.tensors.thermal_expansion import ThermalExpansionTensor as ThEx
45
45
  >>> alpha = ThEx.transverse_isotropic(alpha_11=5.6e-6, alpha_33=-0.4e-6)
46
46
 
47
47
  Now apply temperature increases:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: elasticipy
3
- Version: 5.0.0
3
+ Version: 6.0.1
4
4
  Summary: A Python library for elasticity tensor computations
5
5
  Author-email: Dorian Depriester <dorian.dep@gmail.com>
6
6
  License: MIT
@@ -47,12 +47,12 @@ Dynamic: license-file
47
47
  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/DorianDepriester/Elasticipy/HEAD?urlpath=%2Fdoc%2Ftree%2FElasticipy_for_the_Impatient.ipynb)
48
48
 
49
49
 
50
- # ![Elasticipy](docs/source/logo/logo_text.png)
50
+ # ![Elasticipy](https://raw.githubusercontent.com/DorianDepriester/Elasticipy/refs/heads/main/docs/source/logo/logo_text.svg)
51
51
 
52
52
  A python toolkit to manipulate stress and strain tensors, and other linear elasticity-related tensors (e.g. stiffness).
53
53
  This package also provides a collection of easy-to-use and very fast tools to work on stress and strain tensors.
54
54
 
55
- ## :rocket: Main features
55
+ ## 🚀 Main features
56
56
  Among other features, this package implements:
57
57
 
58
58
  - Computation of elasticity tensors,
@@ -66,10 +66,10 @@ Among other features, this package implements:
66
66
  - Compatibility with the [Materials Project](https://next-gen.materialsproject.org/) API, [pymatgen](https://pymatgen.org/) and
67
67
  [orix](https://orix.readthedocs.io/).
68
68
 
69
- ## :snake: Installation
69
+ ## 🐍 Installation
70
70
  Elasticipy can be installed with PIP:
71
71
  ````
72
- pip install Elasticipy
72
+ pip install elasticipy
73
73
  ````
74
74
 
75
75
  On anaconda, one can also use:
@@ -77,18 +77,18 @@ On anaconda, one can also use:
77
77
  conda install conda-forge::elasticipy
78
78
  ````
79
79
 
80
- ## :books: Documentation
80
+ ## 📚 Documentation
81
81
  Tutorials and full documentation are available on [ReadTheDoc](https://elasticipy.readthedocs.io/).
82
82
 
83
- ## :hourglass_flowing_sand: Elasticipy in a nutshell
83
+ ## ⏱️ Elasticipy in a nutshell
84
84
  Take a 5-minute tour through Elasticipy's main features by running the online Jupyter Notebook, hosted on
85
85
  [Binder](https://mybinder.org/v2/gh/DorianDepriester/Elasticipy/HEAD?urlpath=%2Fdoc%2Ftree%2FElasticipy_for_the_Impatient.ipynb).
86
86
 
87
87
 
88
- ## :mag: Sources
88
+ ## 🔍 Sources
89
89
  The source code is available on [GitHub](https://github.com/DorianDepriester/Elasticipy) under the [MIT licence](https://github.com/DorianDepriester/Elasticipy/blob/c6c3d441a2d290ab8f4939992d5d753a1ad3bdb0/LICENSE).
90
90
 
91
- ## :umbrella: Tests and Code Coverage
91
+ ## Tests and Code Coverage
92
92
 
93
93
  The project uses unit tests with `pytest` and coverage reports generated using `coverage`. These reports are hosted on
94
94
  [codecov](https://app.codecov.io/gh/DorianDepriester/Elasticipy).
@@ -99,7 +99,7 @@ Certain parts of the code, particularly those related to graphical user interfac
99
99
 
100
100
  - **`src/Elasticipy/gui.py`**
101
101
 
102
- ## :mortar_board: Cite this package
102
+ ## 🎓 Cite this package
103
103
  If you use Elasticipy, please cite [![DOI](https://joss.theoj.org/papers/10.21105/joss.07940/status.svg)](https://doi.org/10.21105/joss.07940)
104
104
 
105
105
  You can use the following BibTeX entry:
@@ -113,7 +113,7 @@ You can use the following BibTeX entry:
113
113
  number = {115},
114
114
  pages = {7940},
115
115
  author = {Depriester, Dorian and Kubler, Régis},
116
- title = {Elasticipy: A Python package for linear elasticity and tensor analysis},
116
+ title = {elasticipy: A Python package for linear elasticity and tensor analysis},
117
117
  journal = {Journal of Open Source Software}
118
118
  }
119
119
  ````
@@ -0,0 +1,30 @@
1
+ elasticipy/FourthOrderTensor.py,sha256=tfrR2UMDXAOncViyvbjzExKEiA1AvwzKhgeYD71op2o,508
2
+ elasticipy/StressStrainTensors.py,sha256=qf1hCDtX2N_WlInaav0Ewkqc1J_opKbpO-07i-GRPoQ,491
3
+ elasticipy/ThermalExpansion.py,sha256=hn4MPBaex_LQLjmyfKyYLwTKKYPIOFeOMATlhfq_ROg,411
4
+ elasticipy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ elasticipy/crystal_symmetries.py,sha256=DAX-XPgYqI2nFvf6anCVvZ5fLM0CNSDJ7r2h15l3Hoc,3958
6
+ elasticipy/plasticity.py,sha256=I0XeRbNRJ_95Y8QllL_lrWVQjAgvjlBRAh6izzoBB0E,16756
7
+ elasticipy/polefigure.py,sha256=-Qrf5B4_m8HSlwXfOntie75EUqKnFsl7ZeXx9lNPUsY,4119
8
+ elasticipy/spherical_function.py,sha256=e3iAKuYsi8KPiuSGa5mzSihrZwd86fCUnCUyZky8okU,42380
9
+ elasticipy/gui/__init__.py,sha256=nABRj-Vx3Fhxnvd5ag9_TlwCqveXy6A_BX00jKpCzsE,79
10
+ elasticipy/gui/about.py,sha256=XnGWZABk_Wz5v44KcWLTaMQLXwdfhMEK9zIex8RooMM,1424
11
+ elasticipy/gui/gui.py,sha256=GfPmAiyHLfMLrllNtPw0PRflU5RQkg145beP5d5e6xI,18541
12
+ elasticipy/gui/rotate_window.py,sha256=xzNx9fzCRXFBxq2DqPxIeXS817vcR1K6jQyBGX4b_eg,2398
13
+ elasticipy/interfaces/FEPX.py,sha256=sLn-M572rEInhAFBp1wklaOSVYw84PueHmzVvCP57mA,4233
14
+ elasticipy/interfaces/PRISMS.py,sha256=QpOBa3Q9ly10zq13oBgVMIsGkFz2Mzh-bTymF6m8YZE,3835
15
+ elasticipy/interfaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
+ elasticipy/resources/favicon.png,sha256=sUmEetdu_fDc7JFSiEn6c7DTU7Y6ZYgRUgaC6RoB4PQ,1492
17
+ elasticipy/resources/logo_text.svg,sha256=3xF_PQJrYzgup-PHYEgb5yRPWBUUL-AXLwUSpM5EOF0,10578
18
+ elasticipy/tensors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ elasticipy/tensors/elasticity.py,sha256=ailNf4n_09U73scNBZ9kJTHJWuQ77AIs49rI_1vdHSU,98391
20
+ elasticipy/tensors/fourth_order.py,sha256=O0oXPXbVayXJD_dIUqadeKe2L8SFbG18Nblb6gG2SKE,49577
21
+ elasticipy/tensors/mapping.py,sha256=K9SQDLgg3jW3rpDYzdpwcOJQRf04iSw7xjj8N3fHwT8,3178
22
+ elasticipy/tensors/second_order.py,sha256=WSVhtFe6O5W9dIBlbqRCtWrumUl2o56leX_nCDWgBoY,57073
23
+ elasticipy/tensors/stress_strain.py,sha256=9475JsQs6yiDF7bwkoMZlHBF_mK3SZy3vasc5xdtZ6M,10566
24
+ elasticipy/tensors/thermal_expansion.py,sha256=i0Pld_1VlrfEp-9nhWK1VRm0H2yqcDQ3V9_8vDKpCiA,8648
25
+ elasticipy-6.0.1.dist-info/licenses/LICENSE,sha256=qNthTMSjVkIDM1_BREgVFQHdn1wVNQi9pwWVfTIazMA,1074
26
+ elasticipy-6.0.1.dist-info/METADATA,sha256=fpSa5w4aSF8zUv-97cIE5DzXFnGCHeyE7BLEJ7kNjrc,5673
27
+ elasticipy-6.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
+ elasticipy-6.0.1.dist-info/entry_points.txt,sha256=FzF1VdnQui3zO3oM49U0s-3efK_n9tTRCxwSi79uEIU,70
29
+ elasticipy-6.0.1.dist-info/top_level.txt,sha256=EkWNSvs2L7F2nB0tvSJcxv6P3E9OYrIKhczEWu4SetI,11
30
+ elasticipy-6.0.1.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ [gui_scripts]
2
+ elasticipy-gui = elasticipy.gui:crystal_elastic_plotter
@@ -0,0 +1 @@
1
+ elasticipy
@@ -1,16 +0,0 @@
1
- import warnings
2
- from Elasticipy.tensors.stress_strain import StressTensor as NewStressTensor
3
- from Elasticipy.tensors.stress_strain import StrainTensor as NewStrainTensor
4
-
5
- warnings.warn(
6
- "The module 'Elasticipy.StressStrainTensors' is deprecated and will be removed in a future release. "
7
- "Please use 'Elasticipy.tensors.stress_strain' instead.",
8
- DeprecationWarning,
9
- stacklevel=2
10
- )
11
-
12
- class StressTensor(NewStressTensor):
13
- pass
14
-
15
- class StrainTensor(NewStrainTensor):
16
- pass