Parallel / serial coupling of Dolfinx

Hi,

I am trying to develop a framework in Dolfinx in which I solve a 3D model (thermal) in which I embedded a heat source term based on a 1D model (also in DolfinX). Ideally, I would like every process to have its own 1D model. Currently, if I run the code in parallel, the 1D problem is automatically parallelized too.

So, my question is: Is it possible to run a large 3D model on multiple tasks and allow each task to create a smaller serial 1D model?

Thank you!

Francis

The mesh constructor has a communicator as the first argument, so in principle you could pass mpi4py.MPI.COMM_WORLD to the 3D mesh, and mpi4py.MPI.COMM_SELF to each 1D mesh you’d like to have on the current process. It will be up to you to handle communication between the 3D and the 1D meshes, however.

Thank you for your fast response, I will try that today.