Actual source code: pff.c

  1: /* pf.c */
  2: /* Fortran interface file */

  4: /*
  5: * This file was generated automatically by bfort from the C source
  6: * file.  
  7:  */

  9: #ifdef PETSC_USE_POINTER_CONVERSION
 10: #if defined(__cplusplus)
 11: extern "C" {
 12: #endif 
 13: extern void *PetscToPointer(void *);
 14: extern int PetscFromPointer(void *);
 15: extern void PetscRmPointer(void *);
 16: #if defined(__cplusplus)
 17: }
 18: #endif 

 20: #else

 22: #define PetscToPointer(a) (*(long *)(a))
 23: #define PetscFromPointer(a) (long)(a)
 24: #define PetscRmPointer(a)
 25: #endif

 27: #include "petscfix.h"
 28:  #include petscpf.h
 29: #ifdef MPI_BUILD_PROFILING
 30: #ifdef PETSC_HAVE_FORTRAN_CAPS
 31: #define pfapplyvec_ PPFAPPLYVEC
 32: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 33: #define pfapplyvec_ ppfapplyvec
 34: #else
 35: #define pfapplyvec_ ppfapplyvec_
 36: #endif
 37: #else
 38: #ifdef PETSC_HAVE_FORTRAN_CAPS
 39: #define pfapplyvec_ PFAPPLYVEC
 40: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 41: #define pfapplyvec_ pfapplyvec
 42: #endif
 43: #endif

 45: #ifdef MPI_BUILD_PROFILING
 46: #ifdef PETSC_HAVE_FORTRAN_CAPS
 47: #define pfapply_ PPFAPPLY
 48: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 49: #define pfapply_ ppfapply
 50: #else
 51: #define pfapply_ ppfapply_
 52: #endif
 53: #else
 54: #ifdef PETSC_HAVE_FORTRAN_CAPS
 55: #define pfapply_ PFAPPLY
 56: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 57: #define pfapply_ pfapply
 58: #endif
 59: #endif

 61: #ifdef MPI_BUILD_PROFILING
 62: #ifdef PETSC_HAVE_FORTRAN_CAPS
 63: #define pfview_ PPFVIEW
 64: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 65: #define pfview_ ppfview
 66: #else
 67: #define pfview_ ppfview_
 68: #endif
 69: #else
 70: #ifdef PETSC_HAVE_FORTRAN_CAPS
 71: #define pfview_ PFVIEW
 72: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 73: #define pfview_ pfview
 74: #endif
 75: #endif

 77: #ifdef MPI_BUILD_PROFILING
 78: #ifdef PETSC_HAVE_FORTRAN_CAPS
 79: #define pfsetfromoptions_ PPFSETFROMOPTIONS
 80: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 81: #define pfsetfromoptions_ ppfsetfromoptions
 82: #else
 83: #define pfsetfromoptions_ ppfsetfromoptions_
 84: #endif
 85: #else
 86: #ifdef PETSC_HAVE_FORTRAN_CAPS
 87: #define pfsetfromoptions_ PFSETFROMOPTIONS
 88: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 89: #define pfsetfromoptions_ pfsetfromoptions
 90: #endif
 91: #endif



 95: /* Definitions of Fortran Wrapper routines */
 96: #if defined(__cplusplus)
 97: extern "C" {
 98: #endif
 99: void PETSC_STDCALL pfapplyvec_(PF *pf,Vec x,Vec y, int *ierr ){
100: *PFApplyVec(*pf,
101:         (Vec)PetscToPointer( (x) ),
102:         (Vec)PetscToPointer( (y) ));
103: }
104: void PETSC_STDCALL pfapply_(PF *pf,int *n,PetscScalar* x,PetscScalar* y, int *ierr ){
105: *PFApply(*pf,*n,x,y);
106: }
107: void PETSC_STDCALL pfview_(PF *pf,PetscViewer *viewer, int *ierr ){
108: *PFView(*pf,*viewer);
109: }
110: void PETSC_STDCALL pfsetfromoptions_(PF *pf, int *ierr ){
111: *PFSetFromOptions(*pf);
112: }
113: #if defined(__cplusplus)
114: }
115: #endif