I have two questions related to the savevtk function :
- is there a way to save multiple (more than one) scalar node fields, in my case i need to save in the same vtu 10 scalar fields.
- is there a way to save a scalar cell field ? For instance i want to save the average flux by cell.
Yes, for the both questions. Also, both of these can be done in a single line and saved in a single
See documentation Visualization for the essentials.
Something like this should work (in both 2D and 3D):
mesh Th = (...);
fespace Vh(Th,P1); Vh uh, vh;
fespace Qh(Th,P0); Qh qh;
savevtk("data.vtu",Th,uh,vh,qh,dataname="u v q",order=vtuOrder);