I see now where I should be more accurate in my question.
Mark, I mentioned the hyperbolicity because I would like to keep using the PetscDSSetRiemannSolver and the DMTSSetBoundaryLocal and DMTSSetRHSFunctionLocal with DMPlexTSComputeRHSFunctionFVM that are quite automatic and nice and efficient wrappers. Now aside from those which deal specifically with the hyperbolic part of the PDE, i would like to add the diffusive terms. I would rather stay in the FVM world, but if it is easier in the FEM world then I am open to it.
Jed, as for the discretization let us say indeed that the mesh can be either cartesian or not, and the discretization should therefore be independent of the nature of the mesh - any unstructured mesh (i handle it with DMPlex in my case). I saw indeed that FV has gradient reconstruction, with or without a limiter, which is great. However I have not quite understood what function to use to get the gradient of any variable, be it in the context (e.g. for N-S, ro, rou, rov, etc...) or an auxiliary variable (e.g. the components of the strain tensor). I also agree that the diffusive part is usually the one that strongly limits the time step in explicit computations, but for now I would like to set up a fully explicit system.
Matthew, I'll take a look at ex 18, thanks, I missed that one.
So basically if I wanted to summarize, I want to keep the Riemann Solver capability from the DS, and use the "automatic" DMPlexTSComputeRHSFunctionFVM for the hyperbolic part and add on top of it a discretization of the diffusive terms. I was thinking maybe one way to go would be to hack the DMTSSetForcingFunction but
1/ I still am not sure what this function should return exactly, is it a Vec for the flux on all faces ?
2/ I still do not know how to compute all the derivatives involved in the diffusive terms of the N-S using the gradient reconstruction from PetscFV
Thank you for your help, I hope I am clear enough in where I want to go !
Thibault