<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello all, <br><br></div><div>I am trying to solve a Stokes type problem using PETSc's Fieldsplit infrastructure while providing external GMG information coming from libMesh and am running into issues when using the two simultaneously.<br><br>I have verified that FS + MG behaves as expected on its own, (I can use -pc_type gamg on the velocity block just fine), and I also checked that the construction of the external DMShell hierarchy also behaves as expected when using -pc_type mg in the absence of fieldsplit; yet when I combine the two I get errors indicating that "This DM cannot coarsen" in dm.c.<br></div><div><br></div><div>After a little digging it appeared to me that during  PCApply_FieldSplit_Schur the DM which I provided to SNES that is attached to the PC isn't propagating through to the sub PC/KSPs because while inspecting the pc->dm data I could see my coarsen/refine hooks which I provided, while the sub PCs and KSPs seemed to lack those pointers.<br><br></div><div>I tried a naive fix by preempting the schurfactorization switch in  PCApply_FieldSplit_Schur to try and extract the DM I provided and push it through to the other Schur components ala: <br><br>ierr = PCGetDM(pc,&dm);CHKERRQ(ierr);<br>ierr = PCSetDM(kspA->pc,dm);CHKERRQ(ierr);<br>ierr = KSPSetDM(kspA,dm);CHKERRQ(ierr); <br><br></div><div>and likewise for the Upper and Lower PC/KSPs, but with such a change I still seem to lose the contexts which I attached to my DMs during the GMG setup phase, which in turn prevents PCSetUp_MG from completing successfully.<br><br></div><div>As such, I'm wondering if there are any additional setup steps which I am forgetting to take into account here, or if there's something else I could try to accommodate this solver configuration.<br><br></div><div>Thanks as always for any assistance,<br><br></div><div>- Boris Boutkov<br></div><div><br></div><div><br><br><br> </div></div></div></div></div></div></div></div></div></div></div></div>