Thank you. I used the setprecision function to output the result to desired accuracy. However, I noticed that deal.ii writes the output to vtk file only upto certain precision(6). Is there a way to write output to the vtk file according to required precision?
Thank you On Thursday, September 29, 2022 at 6:13:28 PM UTC+5:30 [email protected] wrote: > Hello, > > What do you mean exactly by "deal.ii outputs the solution vector values > upto 7 decimal"? Which function are you using? If you are using a function > like std::cout to inspect the values in the vector, the default precision > is 6 (I think) but it can be changed using std::setprecision (see > https://en.cppreference.com/w/cpp/io/manip/setprecision) > > Best, > > Bruno > > On Thursday, September 29, 2022 at 4:24:49 AM UTC-4 > [email protected] wrote: > >> Hello everyone. >> Is there a way to increase precision of floating point values in deal.ii? >> I am modifying step3 and checking my solution against a linear exact >> solution. I am getting machine precision (around 10^-16 ) for 4,16...4096 >> elements. However, when I refine further, I am getting an error of 10^-6 >> and 10^-5 for 16384 and 65536 elements. What I realized is that deal.ii >> outputs the solution vector values upto 7 decimal places only and hence the >> error begins to show up for very fine meshes. >> Is there a way to increase my precision to say upto 14 decimal places? >> I tried using long double instead of double for my various variables but >> it gives the following error: >> error: no matching function for call to >> ‘interpolate_boundary_values(dealii::DoFHandler<2, 2>&, int, >> dealii::Functions::ConstantFunction<2>, std::map<unsigned int, long >> double>&)’ >> 296 | boundary_values); >> >> Thank You! >> > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/6b3efbaa-c3b9-4da6-a907-11db4d979been%40googlegroups.com.
