Skip to content

Commit b9690ac

Browse files
committed
Merge pull request #39 from danielru/resilience/minor_tweaks
minor tweaks and parameter changes
2 parents 1bc13f9 + a6da7c7 commit b9690ac

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

examples/boussinesq_2d_imex/HookClass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(self):
2020

2121
# add figure object for further use
2222
# self.fig = plt.figure(figsize=(18,6))
23-
self.fig = plt.figure(figsize=(15,5))
23+
#self.fig = plt.figure(figsize=(15,5))
2424
self.counter = 0
2525

2626
def dump_step(self,status):

examples/boussinesq_2d_imex/ProblemClass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def solve_system(self,rhs,factor,u0,t):
107107
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)
108108
# If this is a dummy call with factor==0.0, do not log because it should not be counted as a solver call
109109
if factor!=0.0:
110-
print("Number of GMRES iterations: %3i --- Final residual: %6.3e" % ( cb.getcounter(), cb.getresidual() ))
110+
#print("Number of GMRES iterations: %3i --- Final residual: %6.3e" % ( cb.getcounter(), cb.getresidual() ))
111111
self.logger.add(cb.getcounter())
112112
me = mesh(self.nvars)
113113
me.values = unflatten(sol, 4, self.N[0], self.N[1])

examples/boussinesq_2d_imex/playground.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,24 @@
2424
# set global logger (remove this if you do not want the output at all)
2525
logger = Log.setup_custom_logger('root')
2626

27-
num_procs = 8
27+
num_procs = 16
2828

2929
# This comes as read-in for the level class
3030
lparams = {}
31-
lparams['restol'] = 1E-8
31+
lparams['restol'] = 5E-6
3232

3333
swparams = {}
3434
swparams['collocation_class'] = collclass.CollGaussLobatto
3535
swparams['num_nodes'] = 3
3636
swparams['do_LU'] = True
3737

3838
sparams = {}
39-
sparams['maxiter'] = 12
39+
sparams['maxiter'] = 16
4040

4141
# setup parameters "in time"
4242
t0 = 0
43-
Tend = 3000
44-
Nsteps = 500
43+
Tend = 384
44+
Nsteps = 128
4545
#Tend = 30
4646
#Nsteps = 5
4747
dt = Tend/float(Nsteps)
@@ -57,8 +57,8 @@
5757
pparams['order'] = [4, 2] # [fine_level, coarse_level]
5858
pparams['order_upw'] = [5, 1]
5959
pparams['gmres_maxiter'] = [50, 50]
60-
pparams['gmres_restart'] = [20, 20]
61-
pparams['gmres_tol'] = [1e-8, 1e-8]
60+
pparams['gmres_restart'] = [10, 10]
61+
pparams['gmres_tol'] = [1e-10, 1e-10]
6262

6363
# This comes as read-in for the transfer operations
6464
tparams = {}

0 commit comments

Comments
 (0)