Skip to content

Commit

Permalink
maintenance: update to latest firedrake
Browse files Browse the repository at this point in the history
  • Loading branch information
bueler committed Mar 5, 2023
1 parent 678b5f5 commit 5954640
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 24 deletions.
4 changes: 2 additions & 2 deletions python/ch13/output/fish.py.test2
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/ch14/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 0 additions & 16 deletions python/ch14/output/stokes.py.test3
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions python/ch14/output/stokes.py.test5
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions python/ch14/stokes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -274,4 +275,3 @@ def form(self, pc, test, trial):
u.rename('velocity')
p.rename('pressure')
File(args.o).write(u,p)

0 comments on commit 5954640

Please sign in to comment.