deepxde icon indicating copy to clipboard operation
deepxde copied to clipboard

Export data for plot

Open HumbertHumbert7 opened this issue 10 months ago • 4 comments

Once I get the solution, is it possible to export the results and plot them using ParaView? Thank you

HumbertHumbert7 avatar Apr 23 '24 14:04 HumbertHumbert7

dde.saveplot(losshistory, train_state, issave=True, isplot=False)

This will save the loss history in loss.dat, the predicted solution with the best model in test.dat. For plotting you can use matplotlib.

praksharma avatar Apr 24 '24 10:04 praksharma

Thank you very much, I know how to plot in matplotlib but I would like to know if there is a way to export the data and obtain a better plot in Praview.

HumbertHumbert7 avatar Apr 25 '24 14:04 HumbertHumbert7

Once you have the dat file, you can do whatever you want. Paraview has so many filter to plot CSV file, but that is out of scope of this discussion. I personally use plt.imshow() from a meshgrid and interpolation the values at those grids.

praksharma avatar Apr 25 '24 15:04 praksharma

Thank you very much. I’ll try it

HumbertHumbert7 avatar Apr 25 '24 15:04 HumbertHumbert7