lab.py 文件源码

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

项目:PorousMediaLab 作者: biogeochemistry 项目源码 文件源码
def solve(self, verbose=True):
        """ solves coupled PDEs

        Keyword Arguments:
            verbose {bool} -- if true verbose output (default: {True})
            with estimation of computational time etc.
        """

        self.reset()
        with np.errstate(invalid='raise'):
            for i in np.arange(1, len(np.linspace(0, self.tend, round(self.tend / self.dt) + 1))):
                # try:
                self.integrate_one_timestep(i)
                if verbose:
                    self.estimate_time_of_computation(i)
                # except FloatingPointError as inst:
                #     print(
                #         '\nABORT!!!: Numerical instability... Please, adjust dt and dx manually...')
                #     traceback.print_exc()
                #     sys.exit()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号