def z_shape_cubic(cell_position, index):
iz = int64(math.floor(cell_position)) - 1
if index == 0:
return (-1./6.)*((cell_position-iz)-2)**3
if index == 1:
return (1./6.)*(3*((cell_position-(iz+1))**3)-6*((cell_position-(iz+1))**2)+4)
if index == 2:
return (1./6.)*(3*(((iz+2)-cell_position)**3)-6*(((iz+2)-cell_position)**2)+4)
if index == 3:
return (-1./6.)*(((iz+3)-cell_position)-2)**3
评论列表
文章目录