Understanding macro_ddm.idp vs ffddm.idp

Hello FreeFEM community,

I have two semi-related questions, hopefully it’s alright that I’m asking this in one post. (I can make separate posts if that is preferred.)

I’m building some code using DDM for educational purposes, and I’m currently using the macro_ddm header file. I want to know if I can extract information such as which Schwarz solver being used (e.g. RAS, ASM, or an iterative method) and the number of iterations needed for the sub-problems to converge?

More generally, what is the difference between the macro_ddm.idp and ffddm.idp header files? Is it better to use ffddm if I want to get information such as what I’ve asked above?

Thank you in advance!

You can use -ksp_view -sub_ksp_converged_reason to get all the informations with respect to the solver. macro_ddm.idp is used by HPDDM and PETSc, ffddm.idp is used by ffddm.

Thank you very much for your reply!

As a follow-up question, when would you want to use HPDDM/PETSc over ffddm, and vice versa?

I favor PETSc because it offers the most flexibility and is used in other communities so it’s easier for people who don’t know about FreeFEM to figure out solver options. But I’m a PETSc developer, so my answer is biased.