[petsc-users] Number of decimals in Viewer

Jed Brown jedbrown at mcs.anl.gov
Tue Jul 5 07:47:47 CDT 2011


On Tue, Jul 5, 2011 at 02:42, Elias Goldmann <goldmann at itp.uni-bremen.de>wrote:

> I write a few real eigenvalues to a file using PetscRealView. Do you really
> think going binary is better here? Why would that be the case?


This is entirely reasonable unless your results are very nearly as accurate
as machine precision, in which case using text may lose a couple low bits in
a platform-dependent way.


Maybe it would be worth adding something like:

PetscViewerASCIIPushRealFormat(viewer,"% 20.12e");
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110705/f8513e47/attachment.htm>


More information about the petsc-users mailing list