As the theme side, i gives a vector to a  DataOut<dim> object, the type of the vector entry is double, with 15 effective digit. But there is only 6 digit when write to a file (vtk or gpl). My vector is around  1647.99932xxxx, the result write into the file is 1648. How can i improve the presion of the result in file?

You probably just need to call
  output_file_stream.precision(12);
before calling
  data_out.write_vtk(output_file_stream);
This should make sure that output is written with 12 digits rather than C++'s default of 6 digits.

That said, do you really need this many digits of accuracy? It is very difficult to solve PDEs to more than, say, 4 digits of accuracy. As a consequence, it would surprise me if you actually need more accuracy than just the default 6 digits in your output files.

Best
 W.


--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/d5502550-b6a5-aa17-41d6-06781a5c758d%40colostate.edu.

Reply via email to