diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index 37855e0c9c..7a81fe2ea9 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 36e1664fd2..d8bc740cc7 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 e32aace2f3..89e2dac6c7 100644 Binary files a/.doctrees/projects/doc_fput.doctree and b/.doctrees/projects/doc_fput.doctree differ diff --git a/.doctrees/tutorial/doc_step_2_C.doctree b/.doctrees/tutorial/doc_step_2_C.doctree index ae3c421932..609a09e071 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 ce44045ea3..ed8fd5dc6c 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 7b77681193..213659456f 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 d60de93529..829293c406 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 e02640d97d..e2133a444f 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 a912610a0f..d42543990e 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_7_D.doctree b/.doctrees/tutorial/doc_step_7_D.doctree index 6dce5cf8f2..1b28ea3252 100644 Binary files a/.doctrees/tutorial/doc_step_7_D.doctree and b/.doctrees/tutorial/doc_step_7_D.doctree differ diff --git a/.doctrees/tutorial/doc_step_8_C.doctree b/.doctrees/tutorial/doc_step_8_C.doctree index 830f01f36c..8b11c251c2 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 3c3aa148ef..31a2f83463 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 333422df17..89ab64c96c 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 5e515eeade..3a548727ec 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 2a1850eb03..262dea3ecf 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 b325bbb49d..99fbeb575a 100644 Binary files a/.doctrees/tutorial/step_8.doctree and b/.doctrees/tutorial/step_8.doctree differ diff --git a/_images/coverage-badge.svg b/_images/coverage-badge.svg index 3830e2928a..1a2e9f0ce7 100644 --- a/_images/coverage-badge.svg +++ b/_images/coverage-badge.svg @@ -1 +1 @@ -coverage: 78.01%coverage78.01% \ No newline at end of file +coverage: 78.03%coverage78.03% \ No newline at end of file diff --git a/_images/timings_SDC_variants_Fisher.png b/_images/timings_SDC_variants_Fisher.png index 7878a52475..362a3ad2bc 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 159ec1cee6..f54968eb60 100644 Binary files a/_images/timings_SDC_variants_GrayScott.png and b/_images/timings_SDC_variants_GrayScott.png differ diff --git a/_modules/implementations/datatype_classes/cupy_mesh.html b/_modules/implementations/datatype_classes/cupy_mesh.html index fed3f5bd23..4c592f9841 100644 --- a/_modules/implementations/datatype_classes/cupy_mesh.html +++ b/_modules/implementations/datatype_classes/cupy_mesh.html @@ -38,7 +38,6 @@

Navigation

Source code for implementations.datatype_classes.cupy_mesh

 import cupy as cp
-from pySDC.core.errors import DataError
 
 try:
     from mpi4py import MPI
@@ -78,6 +77,7 @@ 

Source code for implementations.datatype_classes.cupy_mesh

): obj = cp.ndarray.__new__(cls, init[0], dtype=init[2], **kwargs) obj.fill(val) + cls.comm = init[1] else: raise NotImplementedError(type(init)) return obj diff --git a/_modules/implementations/sweeper_classes/Runge_Kutta.html b/_modules/implementations/sweeper_classes/Runge_Kutta.html index acc2b62565..f47b58234e 100644 --- a/_modules/implementations/sweeper_classes/Runge_Kutta.html +++ b/_modules/implementations/sweeper_classes/Runge_Kutta.html @@ -78,17 +78,24 @@

Source code for implementations.sweeper_classes.Runge_Kutta

elif len(nodes) != matrix.shape[0]: raise ParameterError(f'Incompatible number of nodes! Need {matrix.shape[0]}, got {len(nodes)}') - # Set number of nodes, left and right interval boundaries - self.num_solution_stages = 1 - self.num_nodes = matrix.shape[0] + self.num_solution_stages + self.globally_stiffly_accurate = np.allclose(matrix[-1], weights) + self.tleft = 0.0 self.tright = 1.0 - - self.nodes = np.append(np.append([0], nodes), [1]) + self.num_solution_stages = 0 if self.globally_stiffly_accurate else 1 + self.num_nodes = matrix.shape[0] + self.num_solution_stages self.weights = weights - self.Qmat = np.zeros([self.num_nodes + 1, self.num_nodes + 1]) - self.Qmat[1:-1, 1:-1] = matrix - self.Qmat[-1, 1:-1] = weights # this is for computing the solution to the step from the previous stages + + if self.globally_stiffly_accurate: + # For globally stiffly accurate methods, the last row of the Butcher tableau is the same as the weights. + self.nodes = np.append([0], nodes) + self.Qmat = np.zeros([self.num_nodes + 1, self.num_nodes + 1]) + self.Qmat[1:, 1:] = matrix + else: + self.nodes = np.append(np.append([0], nodes), [1]) + self.Qmat = np.zeros([self.num_nodes + 1, self.num_nodes + 1]) + self.Qmat[1:-1, 1:-1] = matrix + self.Qmat[-1, 1:-1] = weights # this is for computing the solution to the step from the previous stages self.left_is_node = True self.right_is_node = self.nodes[-1] == self.tright @@ -341,7 +348,7 @@

Source code for implementations.sweeper_classes.Runge_Kutta

rhs += lvl.dt * self.QI[m + 1, j] * self.get_full_f(lvl.f[j]) # implicit solve with prefactor stemming from the diagonal of Qd, use previous stage as initial guess - if self.coll.implicit: + if self.QI[m + 1, m + 1] != 0: lvl.u[m + 1][:] = prob.solve_system( rhs, lvl.dt * self.QI[m + 1, m + 1], lvl.u[m], lvl.time + lvl.dt * self.coll.nodes[m + 1] ) diff --git a/coverage/class_index.html b/coverage/class_index.html index 46c40dc514..7b644d92d7 100644 --- a/coverage/class_index.html +++ b/coverage/class_index.html @@ -55,7 +55,7 @@

coverage.py v7.6.1, - created at 2024-09-09 14:59 +0000 + created at 2024-09-13 11:13 +0000

@@ -889,12 +889,12 @@

100% - pySDC/implementations/datatype_classes/cupy_mesh.py - cupy_mesh - 26 - 8 + pySDC/implementations/datatype_classes/cupy_mesh.py + cupy_mesh + 27 + 6 1 - 69% + 78% pySDC/implementations/datatype_classes/cupy_mesh.py @@ -907,10 +907,10 @@

pySDC/implementations/datatype_classes/cupy_mesh.py (no class) - 23 + 22 2 0 - 91% + 91% pySDC/implementations/datatype_classes/fenics_mesh.py @@ -2475,102 +2475,102 @@

pySDC/implementations/sweeper_classes/Runge_Kutta.py ButcherTableau - 24 - 1 + 29 + 0 8 - 96% + 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - ButcherTableauEmbedded + pySDC/implementations/sweeper_classes/Runge_Kutta.py + ButcherTableauEmbedded 25 1 8 96% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKutta + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKutta 60 9 2 85% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKuttaIMEX + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKuttaIMEX 33 8 0 76% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - Heun_Euler + pySDC/implementations/sweeper_classes/Runge_Kutta.py + Heun_Euler 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - Cash_Karp + pySDC/implementations/sweeper_classes/Runge_Kutta.py + Cash_Karp 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - DIRK43 + pySDC/implementations/sweeper_classes/Runge_Kutta.py + DIRK43 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - ESDIRK53 + pySDC/implementations/sweeper_classes/Runge_Kutta.py + ESDIRK53 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - ESDIRK43 + pySDC/implementations/sweeper_classes/Runge_Kutta.py + ESDIRK43 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - ARK548L2SAERK + pySDC/implementations/sweeper_classes/Runge_Kutta.py + ARK548L2SAERK 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - ARK54 + pySDC/implementations/sweeper_classes/Runge_Kutta.py + ARK54 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - ARK548L2SAESDIRK2 + pySDC/implementations/sweeper_classes/Runge_Kutta.py + ARK548L2SAESDIRK2 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - ARK548L2SA + pySDC/implementations/sweeper_classes/Runge_Kutta.py + ARK548L2SA 1 0 0 @@ -5365,10 +5365,10 @@

Total   - 25981 - 5713 + 25986 + 5710 4994 - 78% + 78% @@ -5381,7 +5381,7 @@

coverage.py v7.6.1, - created at 2024-09-09 14:59 +0000 + created at 2024-09-13 11:13 +0000

@@ -2961,12 +2961,12 @@

100% - pySDC/implementations/datatype_classes/cupy_mesh.py - cupy_mesh.__new__ - 7 + pySDC/implementations/datatype_classes/cupy_mesh.py + cupy_mesh.__new__ + 8 0 1 - 100% + 100% pySDC/implementations/datatype_classes/cupy_mesh.py @@ -2980,9 +2980,9 @@

pySDC/implementations/datatype_classes/cupy_mesh.py cupy_mesh.__abs__ 8 - 4 + 2 0 - 50% + 75% pySDC/implementations/datatype_classes/cupy_mesh.py @@ -3027,10 +3027,10 @@

pySDC/implementations/datatype_classes/cupy_mesh.py (no function) - 23 + 22 2 0 - 91% + 91% pySDC/implementations/datatype_classes/fenics_mesh.py @@ -7803,206 +7803,206 @@

pySDC/implementations/sweeper_classes/Runge_Kutta.py ButcherTableau.__init__ - 24 - 1 + 29 + 0 8 - 96% + 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - ButcherTableauEmbedded.__init__ + pySDC/implementations/sweeper_classes/Runge_Kutta.py + ButcherTableauEmbedded.__init__ 25 1 8 96% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKutta.__init__ + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKutta.__init__ 14 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKutta.get_Q_matrix + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKutta.get_Q_matrix 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKutta.get_Butcher_tableau + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKutta.get_Butcher_tableau 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKutta.get_full_f + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKutta.get_full_f 7 1 1 86% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKutta.integrate + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKutta.integrate 8 8 0 0% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKutta.update_nodes + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKutta.update_nodes 16 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKutta.compute_end_point + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKutta.compute_end_point 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKutta.level + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKutta.level 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKutta.level + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKutta.level 5 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKutta.predict + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKutta.predict 6 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKuttaIMEX.__init__ + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKuttaIMEX.__init__ 3 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKuttaIMEX.predict + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKuttaIMEX.predict 7 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKuttaIMEX.get_Butcher_tableau_explicit + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKuttaIMEX.get_Butcher_tableau_explicit 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKuttaIMEX.integrate + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKuttaIMEX.integrate 8 8 0 0% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - RungeKuttaIMEX.update_nodes + pySDC/implementations/sweeper_classes/Runge_Kutta.py + RungeKuttaIMEX.update_nodes 14 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - Heun_Euler.get_update_order + pySDC/implementations/sweeper_classes/Runge_Kutta.py + Heun_Euler.get_update_order 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - Cash_Karp.get_update_order + pySDC/implementations/sweeper_classes/Runge_Kutta.py + Cash_Karp.get_update_order 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - DIRK43.get_update_order + pySDC/implementations/sweeper_classes/Runge_Kutta.py + DIRK43.get_update_order 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - ESDIRK53.get_update_order + pySDC/implementations/sweeper_classes/Runge_Kutta.py + ESDIRK53.get_update_order 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - ESDIRK43.get_update_order + pySDC/implementations/sweeper_classes/Runge_Kutta.py + ESDIRK43.get_update_order 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - ARK548L2SAERK.get_update_order + pySDC/implementations/sweeper_classes/Runge_Kutta.py + ARK548L2SAERK.get_update_order 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - ARK54.get_update_order + pySDC/implementations/sweeper_classes/Runge_Kutta.py + ARK54.get_update_order 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - ARK548L2SAESDIRK2.get_update_order + pySDC/implementations/sweeper_classes/Runge_Kutta.py + ARK548L2SAESDIRK2.get_update_order 1 0 0 100% - pySDC/implementations/sweeper_classes/Runge_Kutta.py - ARK548L2SA.get_update_order + pySDC/implementations/sweeper_classes/Runge_Kutta.py + ARK548L2SA.get_update_order 1 0 0 @@ -16589,10 +16589,10 @@

Total   - 25981 - 5713 + 25986 + 5710 4994 - 78% + 78% @@ -16605,7 +16605,7 @@

coverage.py v7.6.1, - created at 2024-09-09 14:59 +0000 + created at 2024-09-13 11:13 +0000

@@ -346,9 +346,9 @@

pySDC/implementations/datatype_classes/cupy_mesh.py 57 - 10 + 8 3 - 82% + 86% pySDC/implementations/datatype_classes/fenics_mesh.py @@ -828,10 +828,10 @@

pySDC/implementations/sweeper_classes/Runge_Kutta.py - 281 - 19 + 286 + 18 18 - 93% + 94% pySDC/implementations/sweeper_classes/Runge_Kutta_Nystrom.py @@ -2398,10 +2398,10 @@

Total - 25981 - 5713 + 25986 + 5710 4997 - 78% + 78% @@ -2414,7 +2414,7 @@

coverage.py v7.6.1, - created at 2024-09-09 14:59 +0000 + created at 2024-09-13 11:13 +0000

diff --git a/coverage/z_020efe120a771d8a_hamiltonian_and_energy_output_py.html b/coverage/z_020efe120a771d8a_hamiltonian_and_energy_output_py.html index fed72a8744..904c38a2f9 100644 --- a/coverage/z_020efe120a771d8a_hamiltonian_and_energy_output_py.html +++ b/coverage/z_020efe120a771d8a_hamiltonian_and_energy_output_py.html @@ -65,7 +65,7 @@

» next       coverage.py v7.6.1, - created at 2024-09-09 14:59 +0000 + created at 2024-09-13 11:13 +0000