Hi, I don't think you need to use multigrid for inverting the HDiv mass matrix, since it is very well conditioned. Probably CG+Jacobi already works. If 0 is the HDiv space, then can you try: solver_parameters={'pc_type': 'fieldsplit', 'pc_fieldsplit_type': 'schur', 'ksp_type': 'gmres', 'ksp_rtol':self._tolerance, 'pc_fieldsplit_schur_fact_type': 'FULL', 'pc_fieldsplit_schur_precondition': 'selfp', 'fieldsplit_0_ksp_type': 'cg', 'fieldsplit_0_pc_type': 'jacobi', 'fieldsplit_1_ksp_type': 'preonly', 'fieldsplit_1_pc_type': 'hypre', 'fieldsplit_1_pc_hypre_type': 'boomeramg'} That should use hypre's boomerAMG. Or replace the last two entries with 'fieldsplit_1_pc_type': 'gamg'. The standard AMG settings might work in your case. Eike ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Andrew McRae <A.T.T.McRae@bath.ac.uk> Sent: 15 October 2015 14:18 To: firedrake@imperial.ac.uk Subject: Re: [firedrake] Preconditioner for Least-squares FEM As usual, the Firedrake person in the best position to answer your question is Lawrence, but he's currently on holiday. I won't try to answer your question, but in an old email<http://mailman.ic.ac.uk/pipermail/firedrake/2015-July/000953.html>, Lawrence suggested you try using multigrid on the blocks; e.g. 'fieldsplit_0_pc_type': 'gamg', 'fieldsplit_1_pc_type': 'gamg', My linear solver knowledge is pretty dire, so I'll stop talking here :) Andrew On 15 October 2015 at 13:58, Justin Chang <jychang48@gmail.com<mailto:jychang48@gmail.com>> wrote: I did ask them, but it went unanswered for the last 1.5 months... Let me clarify my question a bit though, I tried using -ksp_type cg -pc_type hypre -pc_hypre_type boomeramg, but it is not supported for matnest. I added nest=False but it seems to break my solver somehow. The only thing that works for me is -ksp_type cg -pc_type bjacobi plus MixedVectorSpaceBasis(W, ...) but the number of solver iterations increases with problem size... Thanks, Justin On Thu, Oct 15, 2015 at 6:50 AM, Andrew McRae <A.T.T.McRae@bath.ac.uk<mailto:A.T.T.McRae@bath.ac.uk>> wrote: I think the PETSc mailing list is a much better place to ask questions like this? On 15 October 2015 at 13:47, Justin Chang <jychang48@gmail.com<mailto:jychang48@gmail.com>> wrote: Hi all, I am attempting to solve Darcy's equation: u + grad[p] = 0 div[u] = f The weak form under the least-squares finite element method (LSFEM) looks like this: (u + grad[p]; v + grad[q]) + div[u]*div[v] = (f; div[v]) For H(div) elements like RT0, these options worked nicely: -ksp_type gmres -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_precondition selfp -fieldsplit_0_ksp_type preonly -fieldsplit_0_pc_type bjacobi -fieldsplit_0_sub_pc_type ilu -fieldsplir_1_ksp_type preonly -fieldsplit_1_pc_type hypre but for the above LSFEM, it does not work (get a DIVERGED_MAX_IT error). I heard multigrid methods are good for these types of problems, so how do I tweak the above parameters? Thanks, Justin _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake