level.py 文件源码

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

项目:Fluid2d 作者: pvthinker 项目源码 文件源码
def residual(self,x,b,r):
        for l in range(self.nbresidual):
            t0 = time()
#            MPI.COMM_WORLD.Barrier()
            computeresidualwitha(self.msk,self.A,x,b,r)
            t1 = time()
            self.time['res']+=t1-t0
            self.ncalls['res']+=1

#            MPI.COMM_WORLD.Barrier()
            t0 = time()
            self.time['barrier']+=t0-t1
            self.ncalls['barrier']+=1

            self.halo.fill(r)
            t1 = time()
            self.time['halo']+=t1-t0
            self.ncalls['halo']+=1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号