<div dir="ltr"><div><div><div><div><div><div><div>Hi all,<br><br></div>We are working on enforcing maximum principles for the Darcy equation using the variational inequality (with Firedrake). We are employing the VMS finite element formulation for the Darcy equation which results in a saddle-point system, so we are using the schur complement approach to solve the saddle-point system. These are the petsc4py options that we've set:<br><br>petsc_options = PETSc.Options()<br>petsc_options.prefixPush("rs_")<br>petsc_options.setValue("ksp_type", "gmres")<br>petsc_options.setValue("pc_type", "fieldsplit")<br>petsc_options.setValue("pc_fieldsplit_type", "schur")<br>petsc_options.setValue("pc_fieldsplit_schur_fact_type","full")<br>petsc_options.setValue("pc_fieldsplit_schur_precondition", "selfp")<br>petsc_options.setValue("fieldsplit_0_ksp_type", "preonly")<br>petsc_options.setValue("fieldsplit_0_pc_type", "bjacobi")<br>petsc_options.setValue("fieldsplit_1_ksp_type", "preonly")<br>petsc_options.setValue("fieldsplit_1_pc_type", "hypre")<br>petsc_options.setValue("fieldsplit_1_pc_hypre_type", "boomeramg")<br>petsc_options.setValue("fieldsplit_1_pc_hypre_boomeramg_strong_threshold", 0.75)<br>petsc_options.setValue("fieldsplit_1_pc_hypre_boomeramg_agg_nl", 2)<br>petsc_options.prefixPop()<br><br></div>Attached is the full Firedrake project file (as well as the corresponding GMSH file in case any Firedrakers out there want to reproduce this) so that you guys have a basic understanding of what we're trying to do.<br></div><br></div>If we do not apply any bounds and do a regular Newton method (with "-snes_type ksponly"), our boundary value problem works. However, if we apply VINEWTONRSLS we get the following error:<br><br>$ python sphere.py -rs_snes_monitor -rs_ksp_monitor <br>  0 SNES Function norm 3.862953179603e-01 <br>Traceback (most recent call last):<br>  File "sphere.py", line 179, in <module><br>    virs()<br>  File "sphere.py", line 162, in virs<br>    rs_solver.solve(None,sol_vec)<br>  File "PETSc/SNES.pyx", line 537, in petsc4py.PETSc.SNES.solve (src/petsc4py.PETSc.c:169159)<br>petsc4py.PETSc.Error: error code 77<br>[0] SNESSolve() line 4061 in /tmp/pip-plvgeV-build/src/snes/interface/snes.c<br>[0] SNESSolve_VINEWTONRSLS() line 506 in /tmp/pip-plvgeV-build/src/snes/impls/vi/rs/virs.c<br>[0] KSPSetUp() line 393 in /tmp/pip-plvgeV-build/src/ksp/ksp/interface/itfunc.c<br>[0] PCSetUp() line 968 in /tmp/pip-plvgeV-build/src/ksp/pc/interface/precon.c<br>[0] PCSetUp_FieldSplit() line 487 in /tmp/pip-plvgeV-build/src/ksp/pc/impls/fieldsplit/fieldsplit.c<br>[0] PCFieldSplitSetDefaults() line 470 in /tmp/pip-plvgeV-build/src/ksp/pc/impls/fieldsplit/fieldsplit.c<br>[0] Petsc has generated inconsistent data<br>[0] Unhandled case, must have at least two fields, not 1<br><br></div>Why is this happening? It seems to me VINEWTONRSLS is not understanding that I have a two-field formulation.<br><br></div>Thanks,<br></div>Justin<br><div><div><div><div><div><br><br></div></div></div></div></div></div>