Skip to main content
Ctrl+K
PETSc v3.26.1-331-g44efd75427f9 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 "petscsys.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 Note#

The call sequence is PetscViewerASCIIPrintf(PetscViewer, character(*), int ierr). 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/sys/classes/viewer/tutorials/ex1.c
src/sys/tutorials/ex7.c
src/sys/classes/viewer/tests/ex4.c
src/sys/classes/viewer/tests/ex5.c
src/sys/classes/viewer/tests/ex7.c
src/sys/tests/ex50.c
src/sys/tests/ex64.cxx
src/sys/tests/ex65.c
src/dm/field/tutorials/ex1.c
src/dm/label/tutorials/ex1.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 Note
  • 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-11-08T03:39:45-0600 (v3.26.1-331-g44efd75427f9).