Nowadays I am doing some simulation of fluid-structure interaction. Actually, I know how to assemble the matrix for fluid, solid and its coupling part. I also know how to write a parallel code for decoupled fluid part or solid part respectively, following the tutorials of Professor Pierre Jolivet.

But I don’t know how to implement it in parallel, for example, I need to construct different meshes for solid and fluid, and maybe different PETSc Mat? (But I think solid or fluid part is solved by different cores) Then with PETSc changeOperator or some other commands for the total coupled Mat. I am a little confused. Is there any related example?

I am working on the same problem with ALE. Now when I solve the eigenvalue problem and resolvent problem, I first assemble all the matrix in FreeFem++ without parallelization and then output all the matrix to a parallel evp solver (This is not a good way, and I don’t use preconditioner).

I have two detailed problems for parallelizing the codes:

I have to create a Mat for PETSc, but with ALE method, the mesh (Th) is decomposed into at least two parts for fluid (ThF) and solid (ThS), and also the extensional field (ThE). So to build the final Mat J (as in your tutorial at slide 20), I should first trunc the mesh and build each sub-Mat, for example Jqq for ThS, and finally assemble Mat J or I should build Mat J first for Th, then trunc the mesh. (Maybe I should test it myself first…)

After I have assemble Mat J, I don’t know the exact way to set the preconditioner for the 4X4 block Mat J. I know for 2X2 block matrix, Schur-complement could be a way to set the preconditioner, with -pc_shell to write the preconditioner. For 4X4 block matrix, there should be similar method, but I don’t know whether I could directly use -fieldsplit instead of writing it by my own.

Because I didn’t figure out these questions before and mostly followed some examples to parallelize my project on only fluid equations, I don’t know how to solve them for this FSI problem… Would you mind giving me some ideas? Thanks again.