PetscFormatConvert#

converts %g to [|%g|] so that PetscVSNPrintf() can ensure all %g formatted numbers have a decimal point when printed.

Synopsis#

PetscErrorCode PetscFormatConvert(const char *format, char *newformat)

No Fortran Support

Input Parameter#

  • format - the PETSc format string

Output Parameter#

  • newformat - the formatted string, must be long enough to hold result

Note#

The decimal point is then used by the petscdiff script so that differences in floating point number output is ignored in the test harness.

Deprecated usage also converts the %D to %d for 32-bit PETSc indices and to %lld for 64-bit PETSc indices. This feature is no longer used in PETSc code instead use %” PetscInt_FMT “ in the format string.

See Also#

PetscFormatConvertGetSize(), PetscVSNPrintf(), PetscVFPrintf()

Level#

developer

Location#

src/sys/fileio/mprint.c


Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages