huyanzhuo,
We compute and then output data inside DataOut<dim> as float (32 bit
floating point) and not as double (64bit). Float has an accuracy of
approximately 7 decimal digits, so your number would be roughly
1647.999 but it happens to be rounded up to 1648.000.
I am afraid there is no easy way to change this because this is
hard-coded inside DataOut<dim>. It is in the Patch class if you are
curious:
https://www.dealii.org/developer/doxygen/deal.II/structDataOutBase_1_1Patch.html#a366bf92bcc2b667586d630455953d911
Normally, this should be enough for visualization.
On Tue, Feb 8, 2022 at 4:58 PM huyanzhuo <
hu4ya...@gmail.com> wrote:
>
> I'm using the 8.5.1 version.
> 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?
>
> --
> 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+un...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/db91c18b-7e9b-4aa0-9a81-3e93e1f3df2an%40googlegroups.com.
--
Timo Heister
http://www.math.clemson.edu/~heister/