following python convention
This commit is contained in:
parent
e390982be7
commit
4d4f321872
|
@ -59,7 +59,7 @@ def cube_to_ball(cube):
|
||||||
ball = np.zeros(3)
|
ball = np.zeros(3)
|
||||||
else:
|
else:
|
||||||
# get pyramide and scale by grid parameter ratio
|
# get pyramide and scale by grid parameter ratio
|
||||||
p = get_order(cube)
|
p = _get_order(cube)
|
||||||
XYZ = cube[p] * sc
|
XYZ = cube[p] * sc
|
||||||
|
|
||||||
# intercept all the points along the z-axis
|
# intercept all the points along the z-axis
|
||||||
|
@ -109,7 +109,7 @@ def ball_to_cube(ball):
|
||||||
if np.allclose(ball,0.0,rtol=0.0,atol=1.0e-300):
|
if np.allclose(ball,0.0,rtol=0.0,atol=1.0e-300):
|
||||||
cube = np.zeros(3)
|
cube = np.zeros(3)
|
||||||
else:
|
else:
|
||||||
p = get_order(ball)
|
p = _get_order(ball)
|
||||||
xyz3 = ball[p]
|
xyz3 = ball[p]
|
||||||
|
|
||||||
# inverse M_3
|
# inverse M_3
|
||||||
|
@ -137,7 +137,7 @@ def ball_to_cube(ball):
|
||||||
return cube
|
return cube
|
||||||
|
|
||||||
|
|
||||||
def get_order(xyz):
|
def _get_order(xyz):
|
||||||
"""
|
"""
|
||||||
Get order of the coordinates.
|
Get order of the coordinates.
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ def left_stretch(T):
|
||||||
Tensor of which the left stretch is computed.
|
Tensor of which the left stretch is computed.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return __polar_decomposition(T,'V')[0]
|
return _polar_decomposition(T,'V')[0]
|
||||||
|
|
||||||
|
|
||||||
def maximum_shear(T_sym):
|
def maximum_shear(T_sym):
|
||||||
|
@ -113,7 +113,7 @@ def Mises_strain(epsilon):
|
||||||
Symmetric strain tensor of which the von Mises equivalent is computed.
|
Symmetric strain tensor of which the von Mises equivalent is computed.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return __Mises(epsilon,2.0/3.0)
|
return _Mises(epsilon,2.0/3.0)
|
||||||
|
|
||||||
|
|
||||||
def Mises_stress(sigma):
|
def Mises_stress(sigma):
|
||||||
|
@ -126,7 +126,7 @@ def Mises_stress(sigma):
|
||||||
Symmetric stress tensor of which the von Mises equivalent is computed.
|
Symmetric stress tensor of which the von Mises equivalent is computed.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return __Mises(sigma,3.0/2.0)
|
return _Mises(sigma,3.0/2.0)
|
||||||
|
|
||||||
|
|
||||||
def PK2(P,F):
|
def PK2(P,F):
|
||||||
|
@ -158,7 +158,7 @@ def right_stretch(T):
|
||||||
Tensor of which the right stretch is computed.
|
Tensor of which the right stretch is computed.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return __polar_decomposition(T,'U')[0]
|
return _polar_decomposition(T,'U')[0]
|
||||||
|
|
||||||
|
|
||||||
def rotational_part(T):
|
def rotational_part(T):
|
||||||
|
@ -171,7 +171,7 @@ def rotational_part(T):
|
||||||
Tensor of which the rotational part is computed.
|
Tensor of which the rotational part is computed.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return __polar_decomposition(T,'R')[0]
|
return _polar_decomposition(T,'R')[0]
|
||||||
|
|
||||||
|
|
||||||
def spherical_part(T,tensor=False):
|
def spherical_part(T,tensor=False):
|
||||||
|
@ -262,7 +262,7 @@ def transpose(T):
|
||||||
np.transpose(T,(0,2,1))
|
np.transpose(T,(0,2,1))
|
||||||
|
|
||||||
|
|
||||||
def __polar_decomposition(T,requested):
|
def _polar_decomposition(T,requested):
|
||||||
"""
|
"""
|
||||||
Singular value decomposition.
|
Singular value decomposition.
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ def __polar_decomposition(T,requested):
|
||||||
return tuple(output)
|
return tuple(output)
|
||||||
|
|
||||||
|
|
||||||
def __Mises(T_sym,s):
|
def _Mises(T_sym,s):
|
||||||
"""
|
"""
|
||||||
Base equation for Mises equivalent of a stres or strain tensor.
|
Base equation for Mises equivalent of a stres or strain tensor.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue