From a6da7c76850494d992484e326807a12e47233ffb Mon Sep 17 00:00:00 2001 From: Daniel Ruprecht Date: Wed, 14 Oct 2015 16:18:54 +0100 Subject: [PATCH] minor tweaks and parameter changes --- examples/boussinesq_2d_imex/HookClass.py | 2 +- examples/boussinesq_2d_imex/ProblemClass.py | 2 +- examples/boussinesq_2d_imex/playground.py | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/boussinesq_2d_imex/HookClass.py b/examples/boussinesq_2d_imex/HookClass.py index d435988c94..e243bf305a 100644 --- a/examples/boussinesq_2d_imex/HookClass.py +++ b/examples/boussinesq_2d_imex/HookClass.py @@ -20,7 +20,7 @@ def __init__(self): # add figure object for further use # self.fig = plt.figure(figsize=(18,6)) - self.fig = plt.figure(figsize=(15,5)) + #self.fig = plt.figure(figsize=(15,5)) self.counter = 0 def dump_step(self,status): diff --git a/examples/boussinesq_2d_imex/ProblemClass.py b/examples/boussinesq_2d_imex/ProblemClass.py index ad826ebfb8..c951a9514d 100644 --- a/examples/boussinesq_2d_imex/ProblemClass.py +++ b/examples/boussinesq_2d_imex/ProblemClass.py @@ -107,7 +107,7 @@ def solve_system(self,rhs,factor,u0,t): sol, info = LA.gmres( self.Id - factor*self.M, b, x0=u0.values.flatten(), tol=self.gmres_tol, restart=self.gmres_restart, maxiter=self.gmres_maxiter, callback=cb) # If this is a dummy call with factor==0.0, do not log because it should not be counted as a solver call if factor!=0.0: - print("Number of GMRES iterations: %3i --- Final residual: %6.3e" % ( cb.getcounter(), cb.getresidual() )) + #print("Number of GMRES iterations: %3i --- Final residual: %6.3e" % ( cb.getcounter(), cb.getresidual() )) self.logger.add(cb.getcounter()) me = mesh(self.nvars) me.values = unflatten(sol, 4, self.N[0], self.N[1]) diff --git a/examples/boussinesq_2d_imex/playground.py b/examples/boussinesq_2d_imex/playground.py index f75816e03b..5b8540d589 100644 --- a/examples/boussinesq_2d_imex/playground.py +++ b/examples/boussinesq_2d_imex/playground.py @@ -24,11 +24,11 @@ # set global logger (remove this if you do not want the output at all) logger = Log.setup_custom_logger('root') - num_procs = 8 + num_procs = 16 # This comes as read-in for the level class lparams = {} - lparams['restol'] = 1E-8 + lparams['restol'] = 5E-6 swparams = {} swparams['collocation_class'] = collclass.CollGaussLobatto @@ -36,12 +36,12 @@ swparams['do_LU'] = True sparams = {} - sparams['maxiter'] = 12 + sparams['maxiter'] = 16 # setup parameters "in time" t0 = 0 - Tend = 3000 - Nsteps = 500 + Tend = 384 + Nsteps = 128 #Tend = 30 #Nsteps = 5 dt = Tend/float(Nsteps) @@ -57,8 +57,8 @@ pparams['order'] = [4, 2] # [fine_level, coarse_level] pparams['order_upw'] = [5, 1] pparams['gmres_maxiter'] = [50, 50] - pparams['gmres_restart'] = [20, 20] - pparams['gmres_tol'] = [1e-8, 1e-8] + pparams['gmres_restart'] = [10, 10] + pparams['gmres_tol'] = [1e-10, 1e-10] # This comes as read-in for the transfer operations tparams = {}