Date: 2021-03-03T22:28:21+00:00

Actual source code: f90impl.h
petsc-3.14.5 2021-03-03
Report Typos and Errors

      2: #if !defined(PETSCF90_H)
      3: #define PETSCF90_H
      4: #include <petsc/private/fortranimpl.h>

      6: /* PGI compilers pass in f90 pointers as 2 arguments */
      7: #if defined(PETSC_HAVE_F90_2PTR_ARG)
      8: #define PETSC_F90_2PTR_PROTO_NOVAR ,void*
      9: #define PETSC_F90_2PTR_PROTO(ptr) ,void* ptr
     10: #define PETSC_F90_2PTR_PARAM(ptr) , ptr
     11: #else
     12: #define PETSC_F90_2PTR_PROTO_NOVAR
     13: #define PETSC_F90_2PTR_PROTO(ptr)
     14: #define PETSC_F90_2PTR_PARAM(ptr)
     15: #endif

     17: typedef struct { char dummy; } F90Array1d;
     18: typedef struct { char dummy; } F90Array2d;
     19: typedef struct { char dummy; } F90Array3d;
     20: typedef struct { char dummy; } F90Array4d;

     22: PETSC_EXTERN PetscErrorCode F90Array1dCreate(void*,MPI_Datatype,PetscInt,PetscInt,F90Array1d* PETSC_F90_2PTR_PROTO_NOVAR);
     23: PETSC_EXTERN PetscErrorCode F90Array1dAccess(F90Array1d*,MPI_Datatype,void** PETSC_F90_2PTR_PROTO_NOVAR);
     24: PETSC_EXTERN PetscErrorCode F90Array1dDestroy(F90Array1d*,MPI_Datatype PETSC_F90_2PTR_PROTO_NOVAR);
     25: PETSC_EXTERN PetscErrorCode F90Array1dGetNextRecord(F90Array1d*,void** PETSC_F90_2PTR_PROTO_NOVAR);

     27: PETSC_EXTERN PetscErrorCode F90Array2dCreate(void*,MPI_Datatype,PetscInt,PetscInt,PetscInt,PetscInt,F90Array2d* PETSC_F90_2PTR_PROTO_NOVAR);
     28: PETSC_EXTERN PetscErrorCode F90Array2dAccess(F90Array2d*,MPI_Datatype,void** PETSC_F90_2PTR_PROTO_NOVAR);
     29: PETSC_EXTERN PetscErrorCode F90Array2dDestroy(F90Array2d*,MPI_Datatype PETSC_F90_2PTR_PROTO_NOVAR);
     30: PETSC_EXTERN PetscErrorCode F90Array2dGetNextRecord(F90Array2d*,void** PETSC_F90_2PTR_PROTO_NOVAR);

     32: PETSC_EXTERN PetscErrorCode F90Array3dCreate(void*,MPI_Datatype,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,F90Array3d* PETSC_F90_2PTR_PROTO_NOVAR);
     33: PETSC_EXTERN PetscErrorCode F90Array3dAccess(F90Array3d*,MPI_Datatype,void** PETSC_F90_2PTR_PROTO_NOVAR);
     34: PETSC_EXTERN PetscErrorCode F90Array3dDestroy(F90Array3d*,MPI_Datatype PETSC_F90_2PTR_PROTO_NOVAR);
     35: PETSC_EXTERN PetscErrorCode F90Array3dGetNextRecord(F90Array3d*,void** PETSC_F90_2PTR_PROTO_NOVAR);

     37: PETSC_EXTERN PetscErrorCode F90Array4dCreate(void*,MPI_Datatype,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,F90Array4d* PETSC_F90_2PTR_PROTO_NOVAR);
     38: PETSC_EXTERN PetscErrorCode F90Array4dAccess(F90Array4d*,MPI_Datatype,void** PETSC_F90_2PTR_PROTO_NOVAR);
     39: PETSC_EXTERN PetscErrorCode F90Array4dDestroy(F90Array4d*,MPI_Datatype PETSC_F90_2PTR_PROTO_NOVAR);
     40: PETSC_EXTERN PetscErrorCode F90Array4dGetNextRecord(F90Array4d*,void** PETSC_F90_2PTR_PROTO_NOVAR);

     43: /*
     44:   F90Array1dCreate - Given a C pointer to a one dimensional
     45:   array and its length; this fills in the appropriate Fortran 90
     46:   pointer data structure.

     48:   Input Parameters:
     49: +   array - regular C pointer (address)
     50: .   type  - DataType of the array
     51: .   start - starting index of the array
     52: -   len   - length of array (in items)

     54:   Output Parameters:
     55: .   ptr - Fortran 90 pointer
     56: */

     58: #endif