xref: /petsc/src/sys/classes/viewer/interface/flush.c (revision db7814771ca77b190574494e87b584e981451db0)
15c6c1daeSBarry Smith 
2af0996ceSBarry Smith #include <petsc/private/viewerimpl.h>  /*I "petscviewer.h" I*/
35c6c1daeSBarry Smith 
45c6c1daeSBarry Smith /*@
55c6c1daeSBarry Smith    PetscViewerFlush - Flushes a PetscViewer (i.e. tries to dump all the
65c6c1daeSBarry Smith    data that has been printed through a PetscViewer).
75c6c1daeSBarry Smith 
85c6c1daeSBarry Smith    Collective on PetscViewer
95c6c1daeSBarry Smith 
105c6c1daeSBarry Smith    Input Parameter:
115c6c1daeSBarry Smith .  viewer - the PetscViewer to be flushed
125c6c1daeSBarry Smith 
135c6c1daeSBarry Smith    Level: intermediate
145c6c1daeSBarry Smith 
15*db781477SPatrick Sanan .seealso: `PetscViewerSocketOpen()`, `PetscViewerASCIIOpen()`, `PetscViewerDrawOpen()`, `PetscViewerCreate()`, `PetscViewerDestroy()`,
16*db781477SPatrick Sanan           `PetscViewerSetType()`
175c6c1daeSBarry Smith @*/
185c6c1daeSBarry Smith PetscErrorCode  PetscViewerFlush(PetscViewer viewer)
195c6c1daeSBarry Smith {
205c6c1daeSBarry Smith   PetscFunctionBegin;
215c6c1daeSBarry Smith   PetscValidHeaderSpecific(viewer,PETSC_VIEWER_CLASSID,1);
225c6c1daeSBarry Smith   if (viewer->ops->flush) {
239566063dSJacob Faibussowitsch     PetscCall((*viewer->ops->flush)(viewer));
245c6c1daeSBarry Smith   }
255c6c1daeSBarry Smith   PetscFunctionReturn(0);
265c6c1daeSBarry Smith }
27