Actual source code: btview.c

      1: #include <petscsys.h>
      2: #include <petscbt.h>
      3: #include <petscviewer.h>

      5: PetscErrorCode PetscBTView(PetscCount m, const PetscBT bt, PetscViewer viewer)
      6: {
      7:   PetscFunctionBegin;
      8:   if (!viewer) PetscCall(PetscViewerASCIIGetStdout(PETSC_COMM_SELF, &viewer));
      9:   PetscCall(PetscViewerASCIIPushSynchronized(viewer));
     10:   for (PetscCount i = 0; i < m; ++i) PetscCall(PetscViewerASCIISynchronizedPrintf(viewer, "%" PetscCount_FMT " %hhu\n", i, PetscBTLookup(bt, i)));
     11:   PetscCall(PetscViewerFlush(viewer));
     12:   PetscCall(PetscViewerASCIIPopSynchronized(viewer));
     13:   PetscFunctionReturn(PETSC_SUCCESS);
     14: }