Attached are the modified src/dm/impls/da/ftn-auto/daindexf.c and src/dm/impls/da/ftn-custom/zdaindexf.c files.
Satish On Wed, 17 Feb 2016, Jed Brown wrote: > Randall Mackie <rlmackie...@gmail.com> writes: > > > this leads to the error ‘bin/maint/generatefortranstubs.py’ …No such file. > > > > there is no maint directory under bin. > > Ah, I missed that you have a tarball, not a clone of the repository. > Then you'll have to fix the file manually. I would start from a clean > tarball because we have no idea what state your source tree is in after > applying the match and manually editing files. Note that this would be > easy and completely reliable if you used a clone instead of tarball. >
#include "petscsys.h" #include "petscfix.h" #include "petsc/private/fortranimpl.h" /* daindex.c */ /* Fortran interface file */ /* * This file was generated automatically by bfort from the C source * file. */ #ifdef PETSC_USE_POINTER_CONVERSION #if defined(__cplusplus) extern "C" { #endif extern void *PetscToPointer(void*); extern int PetscFromPointer(void *); extern void PetscRmPointer(void*); #if defined(__cplusplus) } #endif #else #define PetscToPointer(a) (*(PetscFortranAddr *)(a)) #define PetscFromPointer(a) (PetscFortranAddr)(a) #define PetscRmPointer(a) #endif #include "petscdmda.h" #ifdef PETSC_HAVE_FORTRAN_CAPS #define dmdagetao_ DMDAGETAO #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE) #define dmdagetao_ dmdagetao #endif /* Definitions of Fortran Wrapper routines */ #if defined(__cplusplus) extern "C" { #endif PETSC_EXTERN void PETSC_STDCALL dmdagetao_(DM da,AO *ao, int *__ierr ){ *__ierr = DMDAGetAO( (DM)PetscToPointer((da) ),ao); } #if defined(__cplusplus) } #endif
#include <petsc/private/fortranimpl.h> #include <petscdmda.h> #if defined(PETSC_HAVE_FORTRAN_CAPS) #define dmdagetglobalindices_ DMDAGETGLOBALINDICES #define dmdarestoreglobalindices_ DMDARESTOREGLOBALINDICES #define dmdasetaotype_ DMDASETAOTYPE #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) #define dmdagetglobalindices_ dmdagetglobalindices #define dmdarestoreglobalindices_ dmdarestoreglobalindices #define dmdasetaotype_ dmdasetaotype #endif PETSC_EXTERN void PETSC_STDCALL dmdasetaotype_(DM *da,CHAR type PETSC_MIXED_LEN(len), int *__ierr PETSC_END_LEN(len) ) { char *t; FIXCHAR(type,len,t); *ierr = DMDASetAOType(*da,t); FREECHAR(type,t); } PETSC_EXTERN void PETSC_STDCALL dmdagetglobalindices_(DM *da,PetscInt *n,PetscInt *indices,size_t *ia,PetscErrorCode *ierr) { const PetscInt *idx; *ierr = DMDAGetGlobalIndices(*da,n,&idx); *ia = PetscIntAddressToFortran(indices,idx); } PETSC_EXTERN void PETSC_STDCALL dmdarestoreglobalindices_(DM *da,PetscInt *n,PetscInt *fa,size_t *ia,PetscErrorCode *ierr) { const PetscInt *lx = PetscIntAddressFromFortran(fa,*ia); *ierr = DMDARestoreGlobalIndices(*da,n,&lx); }