|
def | sDF (r, xc, yc, zc, x, y, z) |
|
def | gradSdf (xc, yc, zc, x, y, z) |
|
def | hessSdf (xc, yc, zc, x, y, z) |
|
◆ gradSdf()
def sdf_hertz_2d_axisymm_sphere.Sphere.gradSdf |
( |
|
xc, |
|
|
|
yc, |
|
|
|
zc, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 24 of file sdf_hertz_2d_axisymm_sphere.py.
24 def gradSdf(xc, yc, zc, x, y, z):
25 c_val_A = 1./np.sqrt((x-xc)**2 + (y-yc)**2 + (z-zc)**2)
26 return np.hstack([(c_val_A * (x-xc)).reshape((-1,1)), (c_val_A * (y-yc)).reshape((-1,1)), (c_val_A * (z-zc)).reshape((-1,1))])
◆ hessSdf()
def sdf_hertz_2d_axisymm_sphere.Sphere.hessSdf |
( |
|
xc, |
|
|
|
yc, |
|
|
|
zc, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 28 of file sdf_hertz_2d_axisymm_sphere.py.
28 def hessSdf(xc, yc, zc, x, y, z):
29 x, y, z = x-xc, y-yc, z-zc
30 denom = (x**2 + y**2 + z**2)**(3/2)
31 sqrt_denom = np.sqrt(x**2 + y**2 + z**2)
32 Hxx = -x**2/denom + 1/sqrt_denom
35 Hyy = -y**2/denom + 1/sqrt_denom
37 Hzz = -z**2/denom + 1/sqrt_denom
39 return np.hstack([Hxx.reshape((-1,1)), Hxy.reshape((-1,1)), Hzx.reshape((-1,1)), Hyy.reshape((-1,1)), Hzy.reshape((-1,1)), Hzz.reshape((-1,1))])
◆ sDF()
def sdf_hertz_2d_axisymm_sphere.Sphere.sDF |
( |
|
r, |
|
|
|
xc, |
|
|
|
yc, |
|
|
|
zc, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 21 of file sdf_hertz_2d_axisymm_sphere.py.
21 def sDF(r, xc, yc, zc, x, y, z):
22 return np.sqrt((x - xc)**2 + (y - yc)**2 + (z - zc)**2) - r
The documentation for this class was generated from the following file: