@@ -180,7 +180,7 @@ Finally, at each mesh size, we print out the number of cells in the
180180mesh and the number of iterations the solver took to converge ::
181181
182182 #
183- print(w.function_space().mesh().num_cells(), solver.snes.ksp.getIterationNumber())
183+ print(w.function_space().mesh().unique(). num_cells(), solver.snes.ksp.getIterationNumber())
184184
185185The resulting convergence is unimpressive:
186186
@@ -282,7 +282,7 @@ applying the action of blocks, so we can use a block matrix format. ::
282282 for n in range(8):
283283 solver, w = build_problem(n, parameters, block_matrix=True)
284284 solver.solve()
285- print(w.function_space().mesh().num_cells(), solver.snes.ksp.getIterationNumber())
285+ print(w.function_space().mesh().unique(). num_cells(), solver.snes.ksp.getIterationNumber())
286286
287287The resulting convergence is algorithmically good, however, the larger
288288problems still take a long time.
@@ -367,7 +367,7 @@ Let's see what happens. ::
367367 for n in range(8):
368368 solver, w = build_problem(n, parameters, block_matrix=True)
369369 solver.solve()
370- print(w.function_space().mesh().num_cells(), solver.snes.ksp.getIterationNumber())
370+ print(w.function_space().mesh().unique(). num_cells(), solver.snes.ksp.getIterationNumber())
371371
372372This is much better, the problem takes much less time to solve and
373373when observing the iteration counts for inverting :math: `S` we can see
@@ -422,7 +422,7 @@ and so we no longer need a flexible Krylov method. ::
422422 for n in range(8):
423423 solver, w = build_problem(n, parameters, block_matrix=True)
424424 solver.solve()
425- print(w.function_space().mesh().num_cells(), solver.snes.ksp.getIterationNumber())
425+ print(w.function_space().mesh().unique(). num_cells(), solver.snes.ksp.getIterationNumber())
426426
427427This results in the following GMRES iteration counts
428428
@@ -487,7 +487,7 @@ variable. We can provide it as an :class:`~.AuxiliaryOperatorPC` via a python pr
487487 for n in range(8):
488488 solver, w = build_problem(n, parameters, aP=None, block_matrix=False)
489489 solver.solve()
490- print(w.function_space().mesh().num_cells(), solver.snes.ksp.getIterationNumber())
490+ print(w.function_space().mesh().unique(). num_cells(), solver.snes.ksp.getIterationNumber())
491491
492492This actually results in slightly worse convergence than the diagonal
493493approximation we used above.
@@ -571,7 +571,7 @@ Let's see what the iteration count looks like now. ::
571571 for n in range(8):
572572 solver, w = build_problem(n, parameters, aP=riesz, block_matrix=True)
573573 solver.solve()
574- print(w.function_space().mesh().num_cells(), solver.snes.ksp.getIterationNumber())
574+ print(w.function_space().mesh().unique(). num_cells(), solver.snes.ksp.getIterationNumber())
575575
576576============== ==================
577577 Mesh elements GMRES iterations
0 commit comments