Actual source code: zplexexodusii.c
1: #include <petsc/private/fortranimpl.h>
2: #include <petscdmplex.h>
4: #if defined(PETSC_HAVE_FORTRAN_CAPS)
5: #define dmplexcreateexodusfromfile_ DMPLEXCREATEEXODUSFROMFILE
6: #define petscviewerexodusiiopen_ PETSCVIEWEREXODUSIIOPEN
7: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
8: #define dmplexcreateexodusfromfile_ dmplexcreateexodusfromfile
9: #define petscviewerexodusiiopen_ petscviewerexodusiiopen
10: #endif
12: /* Definitions of Fortran Wrapper routines */
14: PETSC_EXTERN void dmplexcreateexodusfromfile_(MPI_Fint *comm, char *name, PetscBool *interpolate, DM *dm, int *ierr, PETSC_FORTRAN_CHARLEN_T lenN)
15: {
16: char *filename;
18: FIXCHAR(name, lenN, filename);
19: *ierr = DMPlexCreateExodusFromFile(MPI_Comm_f2c(*(comm)), filename, *interpolate, dm);
20: if (*ierr) return;
21: FREECHAR(name, filename);
22: }
24: PETSC_EXTERN void petscviewerexodusiiopen_(MPI_Comm *comm, char *name, PetscFileMode *type, PetscViewer *binv, PetscErrorCode *ierr, PETSC_FORTRAN_CHARLEN_T len)
25: {
26: char *c1;
28: FIXCHAR(name, len, c1);
29: *ierr = PetscViewerExodusIIOpen(MPI_Comm_f2c(*(MPI_Fint *)&*comm), c1, *type, binv);
30: if (*ierr) return;
31: FREECHAR(name, c1);
32: }