diff --git a/python/ch13/output/fish.py.test2 b/python/ch13/output/fish.py.test2 index 09f535c8..98f1a58c 100644 --- a/python/ch13/output/fish.py.test2 +++ b/python/ch13/output/fish.py.test2 @@ -1,6 +1,6 @@ -DM Object: DM_0x84000004_2 2 MPI processes +DM Object: DM_0xc4000003_2 2 MPI processes type: plex -DM_0x84000004_2 in 2 dimensions: +DM_0xc4000003_2 in 2 dimensions: Number of 0-cells per rank: 53 53 Number of 1-cells per rank: 124 124 Number of 2-cells per rank: 72 72 diff --git a/python/ch14/makefile b/python/ch14/makefile index 1e82f19c..8437dc07 100644 --- a/python/ch14/makefile +++ b/python/ch14/makefile @@ -15,7 +15,7 @@ runstokes_2: runstokes_3: -@./lidbox.py -quiet -cl 0.4 -cornerrefine 4 coarse.geo -@${GMSH} -v 0 -2 coarse.geo - -@../../c/testit.sh stokes.py "-mesh coarse.msh -refine 1 -dm_view -s_ksp_type fgmres -s_ksp_converged_reason -schurgmg lower -schurpre selfp" 1 3 + -@../../c/testit.sh stokes.py "-mesh coarse.msh -refine 1 -s_ksp_type fgmres -s_ksp_converged_reason -schurgmg lower -schurpre selfp" 1 3 runstokes_4: -@../../c/testit.sh stokes.py "-pdegree 0 -dp -refine 1 -s_ksp_type minres -s_ksp_converged_reason -schurgmg diag -schurpre mass" 1 4 diff --git a/python/ch14/output/stokes.py.test3 b/python/ch14/output/stokes.py.test3 index 55d3e016..2c50518d 100644 --- a/python/ch14/output/stokes.py.test3 +++ b/python/ch14/output/stokes.py.test3 @@ -1,19 +1,3 @@ reading mesh from coarse.msh ... -DM Object: DM_0x84000000_1 1 MPI process - type: plex -DM_0x84000000_1 in 2 dimensions: - Number of 0-cells per rank: 157 - Number of 1-cells per rank: 428 - Number of 2-cells per rank: 272 -Labels: - celltype: 3 strata with value/size (1 (428), 3 (272), 0 (157)) - depth: 3 strata with value/size (0 (157), 1 (428), 2 (272)) - Cell Sets: 1 strata with value/size (50 (476)) - Face Sets: 2 strata with value/size (41 (69), 40 (13)) - exterior_facets: 1 strata with value/size (1 (80)) - interior_facets: 1 strata with value/size (1 (545)) - pyop2_core: 1 strata with value/size (1 (857)) - pyop2_owned: 0 strata with value/size () - pyop2_ghost: 0 strata with value/size () solving on mesh (1 levels refinement) with P_2 x P_1 Taylor-Hood elements ... Linear s_ solve converged due to CONVERGED_RTOL iterations 14 diff --git a/python/ch14/output/stokes.py.test5 b/python/ch14/output/stokes.py.test5 index 39d54493..437b9a27 100644 --- a/python/ch14/output/stokes.py.test5 +++ b/python/ch14/output/stokes.py.test5 @@ -1,6 +1,6 @@ -DM Object: DM_0x84000004_1 2 MPI processes +DM Object: DM_0xc4000003_1 2 MPI processes type: plex -DM_0x84000004_1 in 2 dimensions: +DM_0xc4000003_1 in 2 dimensions: Number of 0-cells per rank: 19 19 Number of 1-cells per rank: 38 38 Number of 2-cells per rank: 20 20 diff --git a/python/ch14/stokes.py b/python/ch14/stokes.py index dc9e7a9e..52ecc6b6 100755 --- a/python/ch14/stokes.py +++ b/python/ch14/stokes.py @@ -129,7 +129,7 @@ if args.nobase: ns = None else: - ns = MixedVectorSpaceBasis(Z, [Z.sub(0), VectorSpaceBasis(constant=True)]) + ns = MixedVectorSpaceBasis(Z, [Z.sub(0), VectorSpaceBasis(constant=True, comm=COMM_WORLD)]) # define weak form up = Function(Z) @@ -240,7 +240,8 @@ def form(self, pc, test, trial): # actually solve solve(F == 0, up, bcs=bcs, nullspace=ns, options_prefix='s', solver_parameters=sparams) -u,p = up.split() +u = up.subfunctions[0] +p = up.subfunctions[1] # numerical error for -analytical case ONLY if args.analytical: @@ -274,4 +275,3 @@ def form(self, pc, test, trial): u.rename('velocity') p.rename('pressure') File(args.o).write(u,p) -