Date: 2026-05-01T06:12:04+00:00

Actual source code: zviewaf.c

      1: #include <petsc/private/ftnimpl.h>
      2: #include <petscviewer.h>

      4: #if defined(PETSC_HAVE_FORTRAN_CAPS)
      5:   #define petscviewerandformatcreate_  PETSCVIEWERANDFORMATCREATE
      6:   #define petscviewerandformatdestroy_ PETSCVIEWERANDFORMATDESTROY
      7: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
      8:   #define petscviewerandformatcreate_  petscviewerandformatcreate
      9:   #define petscviewerandformatdestroy_ petscviewerandformatdestroy
     10: #endif

     12: PETSC_EXTERN void petscviewerandformatcreate_(PetscViewer *vin, PetscViewerFormat *format, PetscViewerAndFormat **vf, PetscErrorCode *ierr)
     13: {
     14:   PetscViewer v;
     15:   PetscPatchDefaultViewers_Fortran(vin, v);
     16:   *ierr = PetscViewerAndFormatCreate(v, *format, vf);
     17: }

     19: PETSC_EXTERN void petscviewerandformatdestroy_(PetscViewerAndFormat **vf, PetscErrorCode *ierr)
     20: {
     21:   *ierr = PetscViewerAndFormatDestroy(vf);
     22: }