Reducing Number of MPI Communicators in Storing List of Solutions at Different Time Steps

There are many things that you can do in your code to make it more efficient, avoiding duplication of MPI processes etc.

As your code is quite tedious to parse, as you haven’t made it a minimal example to illustrate the issue, I’ll only refer you to previous posts:

and the references posts.
In particular,
https://jsdokken.com/FEniCS23-tutorial/src/form_compilation.html
might be helpful as I go through the idea of creating data outside of loops very carefully.