Skip to main content
Ctrl+K
PETSc v3.24.3-257-g5d4b16a5bffa documentation - Home
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • PetscViewerA...

PetscViewerASCIIPrintf#

Prints to a file, only from the first processor in the PetscViewer of type PETSCVIEWERASCII

Synopsis#

#include "petscviewer.h" 
PetscErrorCode PetscViewerASCIIPrintf(PetscViewer viewer, const char format[], ...)

Not Collective, but only the first MPI rank in the viewer has any effect

Input Parameters#

  • viewer - obtained with PetscViewerASCIIOpen()

  • format - the usual printf() format string

Fortran Notes#

The call sequence is PetscViewerASCIIPrintf(PetscViewer, character(*), int ierr) from Fortran. That is, you can only pass a single character string from Fortran.

See Also#

Viewers: Looking at PETSc Objects, PetscPrintf(), PetscSynchronizedPrintf(), PetscViewerASCIIOpen(), PetscViewerASCIIPushTab(), PetscViewerASCIIPopTab(), PetscViewerASCIISynchronizedPrintf(), PetscViewerCreate(), PetscViewerDestroy(), PetscViewerSetType(), PetscViewerASCIIGetPointer(), PetscViewerASCIIPushSynchronized()

Level#

developer

Location#

src/sys/classes/viewer/impls/ascii/filev.c

Examples#

src/snes/tutorials/ex70.c
src/ts/tutorials/ex30.c
src/ts/tutorials/ex14.c
src/snes/tutorials/ex6.c
src/ksp/ksp/tutorials/ex69.c
src/ksp/ksp/tutorials/ex68.c
src/snes/tutorials/ex15.c
src/sys/classes/viewer/tutorials/ex1.c
src/snes/tutorials/ex48.c
src/ts/tutorials/ex9.c


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

On this page
  • Synopsis
  • Input Parameters
  • Fortran Notes
  • See Also
  • Level
  • Location
  • Examples
Edit on GitLab
Show Source

© Copyright 1991-2026, UChicago Argonne, LLC and the PETSc Development Team.

Created using Sphinx 7.3.7.

Built with the PyData Sphinx Theme 0.15.1.

Last updated on 2026-01-07T03:47:18-0600 (v3.24.3-257-g5d4b16a5bffa).