1 2 #include <petsc/private/viewerimpl.h> /*I "petscviewer.h" I*/ 3 4 /*@ 5 PetscViewerFlush - Flushes a PetscViewer (i.e. tries to dump all the 6 data that has been printed through a PetscViewer). 7 8 Collective on PetscViewer 9 10 Input Parameter: 11 . viewer - the PetscViewer to be flushed 12 13 Level: intermediate 14 15 .seealso: `PetscViewerSocketOpen()`, `PetscViewerASCIIOpen()`, `PetscViewerDrawOpen()`, `PetscViewerCreate()`, `PetscViewerDestroy()`, 16 `PetscViewerSetType()` 17 @*/ 18 PetscErrorCode PetscViewerFlush(PetscViewer viewer) 19 { 20 PetscFunctionBegin; 21 PetscValidHeaderSpecific(viewer,PETSC_VIEWER_CLASSID,1); 22 if (viewer->ops->flush) { 23 PetscCall((*viewer->ops->flush)(viewer)); 24 } 25 PetscFunctionReturn(0); 26 } 27