Date: 2025-03-28T21:11:13+00:00

Actual source code: zstartf.c

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

      3: #if defined(PETSC_HAVE_FORTRAN_CAPS)
      4:   #define petscinitializefortran_      PETSCINITIALIZEFORTRAN
      5:   #define petscsetfortranbasepointers_ PETSCSETFORTRANBASEPOINTERS
      6:   #define petsc_null_function_         PETSC_NULL_FUNCTION
      7: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
      8:   #define petscinitializefortran_      petscinitializefortran
      9:   #define petscsetfortranbasepointers_ petscsetfortranbasepointers
     10:   #define petsc_null_function_         petsc_null_function
     11: #endif

     13: #if defined(PETSC_HAVE_FORTRAN_UNDERSCORE_UNDERSCORE)
     14:   #define petsc_null_function_ petsc_null_function__
     15: #endif

     17: PETSC_EXTERN void petscinitializefortran_(int *ierr)
     18: {
     19:   *ierr = PetscInitializeFortran();
     20: }

     22: PETSC_EXTERN void petscsetfortranbasepointers_(char *fnull_character, void *fnull_integer, void *fnull_scalar, void *fnull_double, void *fnull_real, void *fnull_bool, void *fnull_enum, void (*fnull_function)(void), void *fnull_mpi_comm, void *fnull_integer_array, void *fnull_scalar_array, void *fnull_real_array, PETSC_FORTRAN_CHARLEN_T len)
     23: {
     24:   PETSC_NULL_CHARACTER_Fortran     = fnull_character;
     25:   PETSC_NULL_INTEGER_Fortran       = fnull_integer;
     26:   PETSC_NULL_SCALAR_Fortran        = fnull_scalar;
     27:   PETSC_NULL_DOUBLE_Fortran        = fnull_double;
     28:   PETSC_NULL_REAL_Fortran          = fnull_real;
     29:   PETSC_NULL_BOOL_Fortran          = fnull_bool;
     30:   PETSC_NULL_ENUM_Fortran          = fnull_enum;
     31:   PETSC_NULL_FUNCTION_Fortran      = fnull_function;
     32:   PETSC_NULL_MPI_COMM_Fortran      = fnull_mpi_comm;
     33:   PETSC_NULL_INTEGER_ARRAY_Fortran = fnull_integer_array;
     34:   PETSC_NULL_SCALAR_ARRAY_Fortran  = fnull_scalar_array;
     35:   PETSC_NULL_REAL_ARRAY_Fortran    = fnull_real_array;
     36: }

     38: /*
     39:   A valid address for the fortran variable PETSC_NULL_FUNCTION
     40: */
     41: PETSC_EXTERN void petsc_null_function_(void)
     42: {
     43:   return;
     44: }