[petsc-users] How to VecView with a formatted precision (%10.8f) ?

Barry Smith bsmith at mcs.anl.gov
Tue May 30 13:22:16 CDT 2017


   When I want "full precision" for debugging purposes I use PetscViewerPushFormat(viewer,PETSC_VIEWER_ASCII_MATLAB);

> On May 30, 2017, at 2:14 AM, Franck Houssen <franck.houssen at inria.fr> wrote:
> 
> Mainly for debugging purposes: controlling format/precision could be convenient ! 
> 
> Franck
> 
> ~> mpirun -n 5 ./vecViewPrecision.exe 
> Vec Object: 5 MPI processes
>  type: mpi
> Process [0]
> 0.
> 0.
> Process [1]
> 1.23457e+06
> -8.1e-07
> Process [2]
> 2.46914e-06
> -1.62e+06
> Process [3]
> 3.7037e+06
> -2.43e-06
> Process [4]
> 4.93827e-06
> -3.24e+06
> 
> 
> ----- Mail original -----
>> De: "Jed Brown" <jed at jedbrown.org>
>> À: "Franck Houssen" <franck.houssen at inria.fr>, "PETSc users list" <petsc-users at mcs.anl.gov>
>> Envoyé: Vendredi 26 Mai 2017 19:27:42
>> Objet: Re: [petsc-users] How to VecView with a formatted precision (%10.8f) ?
>> 
>> No, but this could be added to the ASCII viewer.  Why do you want it?
>> 
>> Franck Houssen <franck.houssen at inria.fr> writes:
>> 
>>> How to VecView with a formatted precision (%10.8f) ? Not possible ?
>>> 
>>> Franck
>> 
> <vecViewPrecision.cpp>



More information about the petsc-users mailing list