1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
--- a/python/demo/demo_stokes.py
+++ b/python/demo/demo_stokes.py
@@ -118,10 +118,6 @@
from dolfinx.mesh import CellType, create_rectangle, locate_entities_boundary
from ufl import div, dx, grad, inner
-opts = PETSc.Options()
-opts["mat_superlu_dist_iterrefine"] = True
-
-
# We create a {py:class}`Mesh <dolfinx.mesh.Mesh>`, define functions for
# locating geometrically subsets of the boundary, and define a function
# for the velocity on the lid:
@@ -442,7 +438,7 @@
# handle pressure nullspace
pc = ksp.getPC()
pc.setType("lu")
- pc.setFactorSolverType("superlu_dist")
+ pc.setFactorSolverType("mumps")
try:
pc.setFactorSetUpSolverType()
except PETSc.Error as e:
@@ -452,8 +448,8 @@
exit(0)
else:
raise e
- # pc.getFactorMatrix().setMumpsIcntl(icntl=24, ival=1) # For pressure nullspace
- # pc.getFactorMatrix().setMumpsIcntl(icntl=25, ival=0) # For pressure nullspace
+ pc.getFactorMatrix().setMumpsIcntl(icntl=24, ival=1) # For pressure nullspace
+ pc.getFactorMatrix().setMumpsIcntl(icntl=25, ival=0) # For pressure nullspace
# Create a block vector (x) to store the full solution, and solve
x = A.createVecLeft()
@@ -532,12 +528,10 @@
# Configure MUMPS to handle pressure nullspace
pc = ksp.getPC()
pc.setType("lu")
- # pc.setFactorSolverType("mumps")
- # pc.setFactorSetUpSolverType()
- # pc.getFactorMatrix().setMumpsIcntl(icntl=24, ival=1)
- # pc.getFactorMatrix().setMumpsIcntl(icntl=25, ival=0)
-
- pc.setFactorSolverType("superlu_dist")
+ pc.setFactorSolverType("mumps")
+ pc.setFactorSetUpSolverType()
+ pc.getFactorMatrix().setMumpsIcntl(icntl=24, ival=1)
+ pc.getFactorMatrix().setMumpsIcntl(icntl=25, ival=0)
# Compute the solution
U = Function(W)
|