Actual source code: ztscreatef.c

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

  4: #if defined(PETSC_HAVE_FORTRAN_CAPS)
  5:   #define tscreate_  TSCREATE
  6:   #define tsdestroy_ TSDESTROY
  7: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
  8:   #define tscreate_  tscreate
  9:   #define tsdestroy_ tsdestroy
 10: #endif

 12: PETSC_EXTERN void tscreate_(MPI_Comm *comm, TS *outts, PetscErrorCode *ierr)
 13: {
 14:   *ierr = TSCreate(MPI_Comm_f2c(*(MPI_Fint *)&*comm), outts);
 15: }

 17: PETSC_EXTERN void tsdestroy_(TS *x, int *ierr)
 18: {
 19:   PETSC_FORTRAN_OBJECT_F_DESTROYED_TO_C_NULL(x);
 20:   *ierr = TSDestroy(x);
 21:   if (*ierr) return;
 22:   PETSC_FORTRAN_OBJECT_C_NULL_TO_F_DESTROYED(x);
 23: }