Actual source code: zaijf.c

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

  4: #if defined(PETSC_HAVE_FORTRAN_CAPS)
  5:   #define matcreateseqaij_           MATCREATESEQAIJ
  6:   #define matseqaijsetpreallocation_ MATSEQAIJSETPREALLOCATION
  7: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
  8:   #define matcreateseqaij_           matcreateseqaij
  9:   #define matseqaijsetpreallocation_ matseqaijsetpreallocation
 10: #endif

 12: PETSC_EXTERN void matcreateseqaij_(MPI_Comm *comm, PetscInt *m, PetscInt *n, PetscInt *nz, PetscInt *nnz, Mat *newmat, PetscErrorCode *ierr)
 13: {
 14:   CHKFORTRANNULLINTEGER(nnz);
 15:   *ierr = MatCreateSeqAIJ(MPI_Comm_f2c(*(MPI_Fint *)&*comm), *m, *n, *nz, nnz, newmat);
 16: }

 18: PETSC_EXTERN void matseqaijsetpreallocation_(Mat *mat, PetscInt *nz, PetscInt *nnz, PetscErrorCode *ierr)
 19: {
 20:   CHKFORTRANNULLINTEGER(nnz);
 21:   *ierr = MatSeqAIJSetPreallocation(*mat, *nz, nnz);
 22: }