Actual source code: zaobasicf.c

  1: #include <petsc/private/fortranimpl.h>
  2: #include <petscao.h>

  4: #if defined(PETSC_HAVE_FORTRAN_CAPS)
  5:   #define aocreatebasic_            AOCREATEBASIC
  6:   #define aocreatebasicis_          AOCREATEBASICIS
  7:   #define aocreatememoryscalable_   AOCREATEMEMORYSCALABLE
  8:   #define aocreatememoryscalableis_ AOCREATEMEMORYSCALABLEIS
  9: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
 10:   #define aocreatebasic_            aocreatebasic
 11:   #define aocreatebasicis_          aocreatebasicis
 12:   #define aocreatememoryscalable_   aocreatememoryscalable
 13:   #define aocreatememoryscalableis_ aocreatememoryscalableis
 14: #endif

 16: PETSC_EXTERN void aocreatebasic_(MPI_Comm *comm, PetscInt *napp, PetscInt *myapp, PetscInt *mypetsc, AO *aoout, PetscErrorCode *ierr)
 17: {
 18:   CHKFORTRANNULLINTEGER(myapp);
 19:   CHKFORTRANNULLINTEGER(mypetsc);
 20:   *ierr = AOCreateBasic(MPI_Comm_f2c(*(MPI_Fint *)&*comm), *napp, myapp, mypetsc, aoout);
 21: }

 23: PETSC_EXTERN void aocreatebasicis_(IS *isapp, IS *ispetsc, AO *aoout, PetscErrorCode *ierr)
 24: {
 25:   IS cispetsc = NULL;
 26:   CHKFORTRANNULLOBJECT(ispetsc);
 27:   if (ispetsc) cispetsc = *ispetsc;
 28:   *ierr = AOCreateBasicIS(*isapp, cispetsc, aoout);
 29: }

 31: PETSC_EXTERN void aocreatememoryscalable_(MPI_Comm *comm, PetscInt *napp, PetscInt *myapp, PetscInt *mypetsc, AO *aoout, PetscErrorCode *ierr)
 32: {
 33:   CHKFORTRANNULLINTEGER(myapp);
 34:   CHKFORTRANNULLINTEGER(mypetsc);
 35:   *ierr = AOCreateMemoryScalable(MPI_Comm_f2c(*(MPI_Fint *)&*comm), *napp, myapp, mypetsc, aoout);
 36: }

 38: PETSC_EXTERN void aocreatememoryscalableis_(IS *isapp, IS *ispetsc, AO *aoout, PetscErrorCode *ierr)
 39: {
 40:   IS cispetsc = NULL;
 41:   CHKFORTRANNULLOBJECT(ispetsc);
 42:   if (ispetsc) cispetsc = *ispetsc;
 43:   *ierr = AOCreateMemoryScalableIS(*isapp, cispetsc, aoout);
 44: }