diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle
index 72b46e8ea8..eef94feee5 100644
Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ
diff --git a/.doctrees/projects/Hamiltonian.doctree b/.doctrees/projects/Hamiltonian.doctree
index 56f62c09db..365ea06612 100644
Binary files a/.doctrees/projects/Hamiltonian.doctree and b/.doctrees/projects/Hamiltonian.doctree differ
diff --git a/.doctrees/projects/doc_fput.doctree b/.doctrees/projects/doc_fput.doctree
index d7dfb50ccf..2fdebeb5c8 100644
Binary files a/.doctrees/projects/doc_fput.doctree and b/.doctrees/projects/doc_fput.doctree differ
diff --git a/.doctrees/pySDC/implementations.problem_classes.AllenCahn_1D_FD.doctree b/.doctrees/pySDC/implementations.problem_classes.AllenCahn_1D_FD.doctree
index b3d9b381ea..25ae044fb4 100644
Binary files a/.doctrees/pySDC/implementations.problem_classes.AllenCahn_1D_FD.doctree and b/.doctrees/pySDC/implementations.problem_classes.AllenCahn_1D_FD.doctree differ
diff --git a/.doctrees/tutorial/doc_step_2_C.doctree b/.doctrees/tutorial/doc_step_2_C.doctree
index ee47dac337..3cc673e0c7 100644
Binary files a/.doctrees/tutorial/doc_step_2_C.doctree and b/.doctrees/tutorial/doc_step_2_C.doctree differ
diff --git a/.doctrees/tutorial/doc_step_3_B.doctree b/.doctrees/tutorial/doc_step_3_B.doctree
index a1b6bc2644..cb3b3598f5 100644
Binary files a/.doctrees/tutorial/doc_step_3_B.doctree and b/.doctrees/tutorial/doc_step_3_B.doctree differ
diff --git a/.doctrees/tutorial/doc_step_4_D.doctree b/.doctrees/tutorial/doc_step_4_D.doctree
index 2fed691b0b..5449f51f85 100644
Binary files a/.doctrees/tutorial/doc_step_4_D.doctree and b/.doctrees/tutorial/doc_step_4_D.doctree differ
diff --git a/.doctrees/tutorial/doc_step_7_A.doctree b/.doctrees/tutorial/doc_step_7_A.doctree
index c15661ab0f..6b8c9e46bd 100644
Binary files a/.doctrees/tutorial/doc_step_7_A.doctree and b/.doctrees/tutorial/doc_step_7_A.doctree differ
diff --git a/.doctrees/tutorial/doc_step_7_B.doctree b/.doctrees/tutorial/doc_step_7_B.doctree
index 958a38fe06..f797dda5c9 100644
Binary files a/.doctrees/tutorial/doc_step_7_B.doctree and b/.doctrees/tutorial/doc_step_7_B.doctree differ
diff --git a/.doctrees/tutorial/doc_step_7_C.doctree b/.doctrees/tutorial/doc_step_7_C.doctree
index 4992ae5dad..6f327d4abc 100644
Binary files a/.doctrees/tutorial/doc_step_7_C.doctree and b/.doctrees/tutorial/doc_step_7_C.doctree differ
diff --git a/.doctrees/tutorial/doc_step_8_C.doctree b/.doctrees/tutorial/doc_step_8_C.doctree
index c90510d746..9e9a779773 100644
Binary files a/.doctrees/tutorial/doc_step_8_C.doctree and b/.doctrees/tutorial/doc_step_8_C.doctree differ
diff --git a/.doctrees/tutorial/step_2.doctree b/.doctrees/tutorial/step_2.doctree
index 288b78645e..5743c33a88 100644
Binary files a/.doctrees/tutorial/step_2.doctree and b/.doctrees/tutorial/step_2.doctree differ
diff --git a/.doctrees/tutorial/step_3.doctree b/.doctrees/tutorial/step_3.doctree
index 6aa5107c89..d0f32d7332 100644
Binary files a/.doctrees/tutorial/step_3.doctree and b/.doctrees/tutorial/step_3.doctree differ
diff --git a/.doctrees/tutorial/step_4.doctree b/.doctrees/tutorial/step_4.doctree
index 63421b4427..a76102f86f 100644
Binary files a/.doctrees/tutorial/step_4.doctree and b/.doctrees/tutorial/step_4.doctree differ
diff --git a/.doctrees/tutorial/step_7.doctree b/.doctrees/tutorial/step_7.doctree
index 06919d63d8..a7a7845383 100644
Binary files a/.doctrees/tutorial/step_7.doctree and b/.doctrees/tutorial/step_7.doctree differ
diff --git a/.doctrees/tutorial/step_8.doctree b/.doctrees/tutorial/step_8.doctree
index b2de48534e..538618ba74 100644
Binary files a/.doctrees/tutorial/step_8.doctree and b/.doctrees/tutorial/step_8.doctree differ
diff --git a/_images/timings_SDC_variants_Fisher.png b/_images/timings_SDC_variants_Fisher.png
index efc08bceba..439b182b88 100644
Binary files a/_images/timings_SDC_variants_Fisher.png and b/_images/timings_SDC_variants_Fisher.png differ
diff --git a/_images/timings_SDC_variants_GrayScott.png b/_images/timings_SDC_variants_GrayScott.png
index dab9584e65..d603da128c 100644
Binary files a/_images/timings_SDC_variants_GrayScott.png and b/_images/timings_SDC_variants_GrayScott.png differ
diff --git a/_modules/implementations/problem_classes/AllenCahn_1D_FD.html b/_modules/implementations/problem_classes/AllenCahn_1D_FD.html
index 873206311d..851d23e40d 100644
--- a/_modules/implementations/problem_classes/AllenCahn_1D_FD.html
+++ b/_modules/implementations/problem_classes/AllenCahn_1D_FD.html
@@ -42,7 +42,7 @@
Source code for implementations.problem_classes.AllenCahn_1D_FD
from scipy.sparse.linalgimportspsolvefrompySDC.core.ErrorsimportProblemError
-frompySDC.core.Problemimportptype
+frompySDC.core.Problemimportptype,WorkCounterfrompySDC.helpersimportproblem_helperfrompySDC.implementations.datatype_classes.meshimportmesh,imex_mesh,comp2_mesh
@@ -94,14 +94,9 @@
Source code for implementations.problem_classes.AllenCahn_1D_FD
Spatial grid values.
uext : dtype_u Contains additionally the external values of the boundary.
- newton_itercount : int
- Counter for iterations in Newton solver.
- lin_itercount : int
- Counter for iterations in linear solver.
- newton_ncalls : int
- Number of calls of Newton solver.
- lin_ncalls : int
- Number of calls of linear solver.
+ work_counters : WorkCounter
+ Counter for statistics. Here, number of Newton calls and number of evaluations
+ of right-hand side are counted. """dtype_u=mesh
@@ -142,7 +137,7 @@
Source code for implementations.problem_classes.AllenCahn_1D_FD
Source code for implementations.problem_classes.AllenCahn_1D_FD
# u -= gmres(dg, g, x0=z, tol=self.lin_tol)[0]
# increase iteration countn+=1
+ self.work_counters['newton']()ifnp.isnan(res)andself.stop_at_nan:raiseProblemError('Newton got nan after %i iterations, aborting...'%n)
@@ -236,9 +230,6 @@
Source code for implementations.problem_classes.AllenCahn_1D_FD
if n==self.newton_maxiter:self.logger.warning('Newton did not converge after %i iterations, error is %s'%(n,res))
- self.newton_ncalls+=1
- self.newton_itercount+=n
-
me=self.dtype_u(self.init)me[:]=u[:]
@@ -276,6 +267,7 @@
Source code for implementations.problem_classes.AllenCahn_1D_FD
Source code for implementations.problem_classes.AllenCahn_1D_FD
f =self.dtype_f(self.init)f.impl[:]=self.A.dot(self.uext)[1:-1]f.expl[:]=-2.0/self.eps**2*u*(1.0-u)*(1.0-2*u)-6.0*self.dw*u*(1.0-u)
+ self.work_counters['rhs']()returnf
@@ -466,7 +459,6 @@
Source code for implementations.problem_classes.AllenCahn_1D_FD
n =0res=99whilen<self.newton_maxiter:
- # print(n)# form the function g(u), such that the solution to the nonlinear problem is a root of gself.uext[1:-1]=u[:]gprim=1.0/self.dx**2*((1.0-a2)/(1.0-a2*(2.0*u-1.0)**2)-1.0)*(2.0*u-1.0)
@@ -496,6 +488,7 @@
Source code for implementations.problem_classes.AllenCahn_1D_FD
# u -= cg(dg, g, x0=z, tol=self.lin_tol)[0]
# increase iteration countn+=1
+ self.work_counters['newton']()ifnp.isnan(res)andself.stop_at_nan:raiseProblemError('Newton got nan after %i iterations, aborting...'%n)
@@ -505,9 +498,6 @@
Source code for implementations.problem_classes.AllenCahn_1D_FD
if n==self.newton_maxiter:self.logger.warning('Newton did not converge after %i iterations, error is %s'%(n,res))
- self.newton_ncalls+=1
- self.newton_itercount+=n
-
me=self.dtype_u(self.init)me[:]=u[:]
@@ -543,6 +533,7 @@
Source code for implementations.problem_classes.AllenCahn_1D_FD
Source code for implementations.problem_classes.AllenCahn_1D_FD
Distance between two spatial nodes.
xvalues : np.1darray Spatial grid points.
- newton_itercount : int
- Number of iterations for Newton solver.
- lin_itercount : int
- Number of iterations for linear solver.
- newton_ncalls : int
- Number of calls of Newton solver.
- lin_ncalls : int
- Number of calls of linear solver.
+ work_counters : WorkCounter
+ Counter for statistics. Here, number of Newton calls and number of evaluations
+ of right-hand side are counted. """dtype_u=mesh
@@ -644,17 +630,15 @@
Source code for implementations.problem_classes.AllenCahn_1D_FD
Source code for implementations.problem_classes.AllenCahn_1D_FD
n =0res=99whilen<self.newton_maxiter:
- # print(n)# form the function g(u), such that the solution to the nonlinear problem is a root of gg=(u
@@ -717,6 +700,7 @@
Source code for implementations.problem_classes.AllenCahn_1D_FD
# u -= gmres(dg, g, x0=z, tol=self.lin_tol)[0]
# increase iteration countn+=1
+ self.work_counters['newton']()ifnp.isnan(res)andself.stop_at_nan:raiseProblemError('Newton got nan after %i iterations, aborting...'%n)
@@ -726,9 +710,6 @@
Source code for implementations.problem_classes.AllenCahn_1D_FD
if n==self.newton_maxiter:self.logger.warning('Newton did not converge after %i iterations, error is %s'%(n,res))
- self.newton_ncalls+=1
- self.newton_itercount+=n
-
me=self.dtype_u(self.init)me[:]=u[:]
@@ -755,6 +736,7 @@
Source code for implementations.problem_classes.AllenCahn_1D_FD
Source code for implementations.problem_classes.AllenCahn_1D_FD
n =0res=99whilen<self.newton_maxiter:
- # print(n)# form the function g(u), such that the solution to the nonlinear problem is a root of gg=(u
@@ -1032,6 +1013,7 @@
Source code for implementations.problem_classes.AllenCahn_1D_FD
# u -= gmres(dg, g, x0=z, tol=self.lin_tol)[0]
# increase iteration countn+=1
+ self.work_counters['newton']()ifnp.isnan(res)andself.stop_at_nan:raiseProblemError('Newton got nan after %i iterations, aborting...'%n)
@@ -1041,9 +1023,6 @@
Source code for implementations.problem_classes.AllenCahn_1D_FD
if n==self.newton_maxiter:self.logger.warning('Newton did not converge after %i iterations, error is %s'%(n,res))
- self.newton_ncalls+=1
- self.newton_itercount+=n
-
me=self.dtype_u(self.init)me[:]=u[:]
diff --git a/coverage/coverage-badge.svg b/coverage/coverage-badge.svg
index 19e2fbdf29..7d6195a358 100644
--- a/coverage/coverage-badge.svg
+++ b/coverage/coverage-badge.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/coverage/d_020efe120a771d8a_fput_py.html b/coverage/d_020efe120a771d8a_fput_py.html
index 704bd53f40..1fb9ada8e9 100644
--- a/coverage/d_020efe120a771d8a_fput_py.html
+++ b/coverage/d_020efe120a771d8a_fput_py.html
@@ -65,7 +65,7 @@
» nextcoverage.py v7.3.2,
- created at 2023-10-26 16:00 +0000
+ created at 2023-10-27 10:38 +0000