Hi all, could someone outline the best way to save an array of values resulting from a simulation for post-processing? I’m currently saving the array as a .txt file and then simply copy and pasting them into Python where I can then plot them, but the issue I’m having is that the values that appear in the .txt file are rounded such that only 6 significant figures are ever displayed, thus some information is lost. Is there some kind of way to save an array such that it may be directly opened in Python, without the loss of information along the way?
I found something in section 4.6.12 of the documentation which I think is what I’m looking for and that is the .precision(n)
function, which lets the user set the precision of the printed value. However, I’m not entirely sure of how to use it with the ofstream
function or with cout
, so any pointers would be really appreciated! Please say if my question is not clear.