v0.14.0
Public Member Functions | Public Attributes | List of all members
sdf_ydirection.CylinderZ Class Reference

Public Member Functions

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)
 

Public Attributes

 t
 
 Xc
 
 Yc
 
 Zc
 
 xc
 
 yc
 
 zc
 
 radius
 
 depth
 

Detailed Description

Definition at line 60 of file sdf_ydirection.py.

Constructor & Destructor Documentation

◆ __init__()

def sdf_ydirection.CylinderZ.__init__ (   self,
  Xc,
  Yc,
  Zc,
  diameter,
  indentationDepth 
)

Definition at line 61 of file sdf_ydirection.py.

61  def __init__(self, Xc, Yc, Zc, diameter, indentationDepth):
62  # Initial time
63  self.t = 0
64 
65  # Initial Centroid
66  self.Xc = Xc
67  self.Yc = Yc
68  self.Zc = Zc
69 
70  # Current Centroid
71  self.xc = Xc
72  self.yc = Yc
73  self.zc = Zc
74 
75  # Indenter Dimensions
76  self.radius = diameter/2
77  self.depth = indentationDepth
78 

Member Function Documentation

◆ gradSdf()

def sdf_ydirection.CylinderZ.gradSdf (   self,
  x,
  y,
  z 
)

Definition at line 82 of file sdf_ydirection.py.

82  def gradSdf(self, x, y, z):
83  a = (x-self.xc)**2 + (y-self.yc)**2
84  c_val_A = 1./np.sqrt(a)
85  c_val_dx = c_val_A * (x-self.xc)
86  c_val_dy = c_val_A * (y-self.yc)
87  c_val_dz = np.zeros_like(c_val_dy)
88  # x, y, z
89  return np.hstack([c_val_dx.reshape((-1,1)), c_val_dy.reshape((-1,1)), c_val_dz.reshape((-1,1))])
90 

◆ hessSdf()

def sdf_ydirection.CylinderZ.hessSdf (   self,
  x,
  y,
  z 
)

Definition at line 91 of file sdf_ydirection.py.

91  def hessSdf(self, x, y, z):
92  a = (x-self.xc)**2 + (y-self.yc)**2
93  c_val_A = 1./np.sqrt(a)
94  c_val_B = 1./(a**(3./2.))
95  Hxx = c_val_A - c_val_B * (x-self.xc)**2
96  Hxy = -c_val_B * (x-self.xc)*(y-self.yc)
97  Hyy = c_val_A - c_val_B * (y-self.yc)**2
98  zeros = np.zeros_like(Hxx).reshape((-1,1))
99  # Hxx, Hxy, Hzx, Hyy, Hzy, Hzz
100  return np.hstack([Hxx.reshape((-1,1)), Hxy.reshape((-1,1)), zeros, Hyy.reshape((-1,1)), zeros, zeros])
101 
102  return hess_array
103 

◆ sDF()

def sdf_ydirection.CylinderZ.sDF (   self,
  x,
  y,
  z 
)

Definition at line 79 of file sdf_ydirection.py.

79  def sDF(self, x, y, z):
80  return np.sqrt((x - self.xc)**2 + (y - self.yc)**2) - self.radius
81 

Member Data Documentation

◆ depth

sdf_ydirection.CylinderZ.depth

Definition at line 77 of file sdf_ydirection.py.

◆ radius

sdf_ydirection.CylinderZ.radius

Definition at line 76 of file sdf_ydirection.py.

◆ t

sdf_ydirection.CylinderZ.t

Definition at line 63 of file sdf_ydirection.py.

◆ Xc

sdf_ydirection.CylinderZ.Xc

Definition at line 66 of file sdf_ydirection.py.

◆ xc

sdf_ydirection.CylinderZ.xc

Definition at line 71 of file sdf_ydirection.py.

◆ Yc

sdf_ydirection.CylinderZ.Yc

Definition at line 67 of file sdf_ydirection.py.

◆ yc

sdf_ydirection.CylinderZ.yc

Definition at line 72 of file sdf_ydirection.py.

◆ Zc

sdf_ydirection.CylinderZ.Zc

Definition at line 68 of file sdf_ydirection.py.

◆ zc

sdf_ydirection.CylinderZ.zc

Definition at line 73 of file sdf_ydirection.py.


The documentation for this class was generated from the following file: