level.py 文件源码

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

项目:Fluid2d 作者: pvthinker 项目源码 文件源码
def smooth(self,x,b,nite):
        for l in range(self.nbsmooth):
            for k in range(nite):
                t0 = time()
#                MPI.COMM_WORLD.Barrier()
                # we apply the smoothing twice
                smoothtwicewitha(self.msk,self.A,x,b,self.omega,self.yo)
#                smoothoncewitha(self.msk,self.A,x,b,self.omega,self.yo)
#                smoothoncewitha(self.msk,self.A,x,b,self.omega,self.yo)
                t1 = time()
                self.time['smooth']+=t1-t0
                self.ncalls['smooth']+=1

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

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


问题


面经


文章

微信
公众号

扫码关注公众号