Heat equation with PETSc : How can the global solution be obtained from the solutions on the subdomains?

Hi FreeFem community,

I am currently using PETSc to solve the transient heat equation (DMeshCreate), but at each time step I need to compute cost functionals, which require the global solution. How can I obtain the global solution from the local solutions?

Additionally, I would like to know how to save this global solution for visualization in ParaView.

Thank you in advance for your answers.

I doubt that’s true.

How can I obtain the global solution from the local solutions?

Search for N2O in the examples/hpddm folder.