xref: /petsc/src/sys/objects/ftn-custom/zgcommf.c (revision a542b6e80630e71e63160d591300bd42ba9ab54f)
1ce0a2cd1SBarry Smith #include "private/fortranimpl.h"
255fcb7f5SSatish Balay #include "petsc.h"
355fcb7f5SSatish Balay 
455fcb7f5SSatish Balay #if defined(PETSC_HAVE_FORTRAN_CAPS)
555fcb7f5SSatish Balay #define petscobjectgetcomm_        PETSCOBJECTGETCOMM
655fcb7f5SSatish Balay #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
755fcb7f5SSatish Balay #define petscobjectgetcomm_        petscobjectgetcomm
855fcb7f5SSatish Balay #endif
955fcb7f5SSatish Balay 
1055fcb7f5SSatish Balay EXTERN_C_BEGIN
1155fcb7f5SSatish Balay void PETSC_STDCALL petscobjectgetcomm_(PetscObject *obj,int *comm,PetscErrorCode *ierr)
1255fcb7f5SSatish Balay {
1355fcb7f5SSatish Balay   MPI_Comm c;
1455fcb7f5SSatish Balay   *ierr = PetscObjectGetComm(*obj,&c);
15*a542b6e8SBarry Smith   *(int*)comm =  MPI_Comm_c2f(c);
1655fcb7f5SSatish Balay }
1755fcb7f5SSatish Balay 
1855fcb7f5SSatish Balay EXTERN_C_END
19