|
def | __init__ (self, Xc, Yc, Zc, diameter, indentationDepth) |
|
def | sDF (self, x, y, z) |
|
def | gradSdf (self, x, y, z) |
|
def | hessSdf (self, x, y, z) |
|
Definition at line 104 of file sdf_ydirection.py.
◆ __init__()
def sdf_ydirection.Sphere.__init__ |
( |
|
self, |
|
|
|
Xc, |
|
|
|
Yc, |
|
|
|
Zc, |
|
|
|
diameter, |
|
|
|
indentationDepth |
|
) |
| |
Definition at line 105 of file sdf_ydirection.py.
105 def __init__(self, Xc, Yc, Zc, diameter, indentationDepth):
120 self.radius = diameter/2
◆ gradSdf()
def sdf_ydirection.Sphere.gradSdf |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 125 of file sdf_ydirection.py.
125 def gradSdf(self, x, y, z):
126 a = (x-self.xc)**2 + (y-self.yc)**2 + (z-self.zc)**2
127 c_val_A = 1./np.sqrt(a)
128 c_val_dx = c_val_A * (x-self.xc)
129 c_val_dy = c_val_A * (y-self.yc)
130 c_val_dz = c_val_A * (z-self.zc)
132 return np.hstack([c_val_dx.reshape((-1,1)), c_val_dy.reshape((-1,1)), c_val_dz.reshape((-1,1))])
◆ hessSdf()
def sdf_ydirection.Sphere.hessSdf |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 134 of file sdf_ydirection.py.
134 def hessSdf(self, x, y, z):
135 x, y, z = x-self.xc, y-self.yc, z-self.zc
136 denom = (x**2 + y**2 + z**2)**(3/2)
137 sqrt_denom = np.sqrt(x**2 + y**2 + z**2)
138 Hxx = -x**2/denom + 1/sqrt_denom
141 Hyy = -y**2/denom + 1/sqrt_denom
143 Hzz = -z**2/denom + 1/sqrt_denom
145 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_ydirection.Sphere.sDF |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 122 of file sdf_ydirection.py.
122 def sDF(self, x, y, z):
123 return np.sqrt((x - self.xc)**2 + (y - self.yc)**2 + (z - self.zc)**2) - self.radius
◆ radius
sdf_ydirection.Sphere.radius |
◆ Xc
◆ xc
◆ Yc
◆ yc
◆ Zc
◆ zc
The documentation for this class was generated from the following file: