Hi,
when there is an array of solutions, say two of them called sols, allocated with
MMG5_pSol sols[2];
int types[2] = {MMG5_Scalar, MMG5_Scalar};
MMG2D_Set_solsAtVerticesSize(mesh2, sols, 2, n, types);
where n is the number of vertices of the mesh, the command
MMG2D_saveAllSols(mesh2, sols, “sols.sol”);
works and saves both correctly. Saving just the first one with
MMG2D_saveSol(mesh, sols[0], “firstone.sol”);
works and saves just the first one out of the two but
MMG2D_saveSol(mesh, sols[1], “secondone.sol”);
segfaults instead of saving the second one.
It seems that the saveSol command somehow makes the implicit assumption that the MMG5_pSol argument does not come out of an array of solutions. I guess that’s not the intended behaviour?
I’d debug that myself but it seems this is about some internal assumption that is not so easy to see.
Cheers, Mathias