Export then read global solution

Hello,

I am running a code on parallel and I would like to export the global solution as one array, then I would like to read this array in another .edp file. Now I am familiar with exporting/importing data in FreeFEM, but how can I gather the solutions on all the processors in a simple real[int] array type.

The scipt FreeFem-sources/navier-stokes-2d-PETSc.edp at develop · FreeFem/FreeFem-sources · GitHub illustrates how you can gather the distributed FE field into a global one (uG). Then, you can just save the global mesh (ThBackup ) and the global solution vector (uG[]).