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()
评论列表
文章目录