cuda_methods.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:fbpic 作者: fbpic 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号