I'm using the same fieldsplit solver options as the test_poisson_mixed_strong_bcs.py test:
solve(F == 0, self.solution, bcs=bcs, solver_parameters={'ksp_monitor': True,
'ksp_view': False,
'pc_view': False,
'pc_type': 'fieldsplit',
'pc_fieldsplit_type': 'schur',
'ksp_type': 'gmres',
'pc_fieldsplit_schur_fact_type': 'FULL',
'fieldsplit_0_ksp_type': 'cg',
'fieldsplit_1_ksp_type': 'cg',
'ksp_rtol': 1.0e-7,
'snes_type': 'ksponly'})
but I get the following PETSc error when running my MMS test in the shallow water code:
christian@elevate /data/firedrake-fluids/tests/swe_mms_p2p1 $ make run
python ../../models/shallow_water.py MMS_A.swml
Initialising simulation...
Setting up a new Continuous Lagrange function space of degree 2 called VelocityFunctionSpace
Setting up a new Continuous Lagrange function space of degree 1 called FreeSurfaceFunctionSpace
pyop2:WARNING *** Projecting output function to CG1
pyop2:INFO Solving linear variational problem...
pyop2:INFO Solving linear variational problem...done
t = 0.01
Adding mass term...
Adding advection term...
Adding stress term...
Adding momentum source...
Adding continuity source...
Applying Velocity BC #0
Applying FreeSurfacePerturbation BC #0
pyop2:INFO Solving nonlinear variational problem...
Traceback (most recent call last):
File "../../models/shallow_water.py", line 512, in <module>
sw.run()
File "../../models/shallow_water.py", line 465, in run
'snes_type': 'ksponly'})
File "/home/christian/firedrake/firedrake/solving.py", line 855, in solve
_solve_varproblem(*args, **kwargs)
File "/home/christian/firedrake/firedrake/solving.py", line 898, in _solve_varproblem
solver.solve()
File "/home/christian/firedrake/firedrake/solving.py", line 271, in solve
self.snes.solve(None, v)
File "SNES.pyx", line 413, in petsc4py.PETSc.SNES.solve (src/petsc4py.PETSc.c:143714)
petsc4py.PETSc.Error: error code 75
[0] SNESSolve() line 3794 in /tmp/pip-Ko7tMZ-build/src/snes/interface/snes.c
[0] SNESSolve_KSPONLY() line 43 in /tmp/pip-Ko7tMZ-build/src/snes/impls/ksponly/ksponly.c
[0] KSPSolve() line 416 in /tmp/pip-Ko7tMZ-build/src/ksp/ksp/interface/itfunc.c
[0] KSPSetUp() line 304 in /tmp/pip-Ko7tMZ-build/src/ksp/ksp/interface/itfunc.c
[0] PCSetUp() line 902 in /tmp/pip-Ko7tMZ-build/src/ksp/pc/interface/precon.c
[0] PCSetUp_FieldSplit() line 551 in /tmp/pip-Ko7tMZ-build/src/ksp/pc/impls/fieldsplit/fieldsplit.c
[0] MatGetSubMatrix() line 7452 in /tmp/pip-Ko7tMZ-build/src/mat/interface/matrix.c
[0] MatGetSubMatrix_Nest() line 387 in /tmp/pip-Ko7tMZ-build/src/mat/impls/nest/matnest.c
[0] MatNestFindSubMat() line 371 in /tmp/pip-Ko7tMZ-build/src/mat/impls/nest/matnest.c
[0] MatNestFindIS() line 310 in /tmp/pip-Ko7tMZ-build/src/mat/impls/nest/matnest.c
[0] Arguments are incompatible
[0] Could not find index set
make: *** [run] Error 1
Do I need to pass some additional argument to solve to allow it to find this 'index set'?
I'm using the same fieldsplit solver options as the test_poisson_mixed_strong_bcs.py test:
but I get the following PETSc error when running my MMS test in the shallow water code:
Do I need to pass some additional argument to
solveto allow it to find this 'index set'?