Actual source code: zpbvecf.c

  1: #include <petsc/private/fortranimpl.h>
  2: #include <petscvec.h>
  3: #if defined(PETSC_HAVE_FORTRAN_CAPS)
  4:   #define veccreatempiwitharray_        VECCREATEMPIWITHARRAY
  5:   #define veccreateghostblockwitharray_ VECCREATEGHOSTBLOCKWITHARRAY
  6:   #define veccreateghostwitharray_      VECCREATEGHOSTWITHARRAY
  7: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
  8:   #define veccreatempiwitharray_        veccreatempiwitharray
  9:   #define veccreateghostblockwitharray_ veccreateghostblockwitharray
 10:   #define veccreateghostwitharray_      veccreateghostwitharray
 11: #endif

 13: PETSC_EXTERN void veccreatempiwitharray_(MPI_Comm *comm, PetscInt *bs, PetscInt *n, PetscInt *N, PetscScalar *s, Vec *V, PetscErrorCode *ierr)
 14: {
 15:   CHKFORTRANNULLSCALAR(s);
 16:   *ierr = VecCreateMPIWithArray(MPI_Comm_f2c(*(MPI_Fint *)&*comm), *bs, *n, *N, s, V);
 17: }

 19: PETSC_EXTERN void veccreateghostblockwitharray_(MPI_Comm *comm, PetscInt *bs, PetscInt *n, PetscInt *N, PetscInt *nghost, PetscInt *ghosts, PetscScalar *array, Vec *vv, PetscErrorCode *ierr)
 20: {
 21:   CHKFORTRANNULLSCALAR(array);
 22:   *ierr = VecCreateGhostBlockWithArray(MPI_Comm_f2c(*(MPI_Fint *)&*comm), *bs, *n, *N, *nghost, ghosts, array, vv);
 23: }

 25: PETSC_EXTERN void veccreateghostwitharray_(MPI_Comm *comm, PetscInt *n, PetscInt *N, PetscInt *nghost, PetscInt *ghosts, PetscScalar *array, Vec *vv, PetscErrorCode *ierr)
 26: {
 27:   CHKFORTRANNULLSCALAR(array);
 28:   *ierr = VecCreateGhostWithArray(MPI_Comm_f2c(*(MPI_Fint *)&*comm), *n, *N, *nghost, ghosts, array, vv);
 29: }