#include "petsc.h"
#include "petscfix.h"
/* damgsnes.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) (*(long *)(a))
#define PetscFromPointer(a) (long)(a)
#define PetscRmPointer(a)
#endif

#include "petscda.h"
#include "petscmg.h"
#include "petscdmmg.h"
#ifdef MPI_BUILD_PROFILING
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define snesdacomputejacobianwithadic_ PSNESDACOMPUTEJACOBIANWITHADIC
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define snesdacomputejacobianwithadic_ psnesdacomputejacobianwithadic
#else
#define snesdacomputejacobianwithadic_ psnesdacomputejacobianwithadic_
#endif
#else
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define snesdacomputejacobianwithadic_ SNESDACOMPUTEJACOBIANWITHADIC
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define snesdacomputejacobianwithadic_ snesdacomputejacobianwithadic
#endif
#endif

#include "petscmg.h"
#ifdef MPI_BUILD_PROFILING
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define dmmgsetsneslocal_ PDMMGSETSNESLOCAL
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define dmmgsetsneslocal_ pdmmgsetsneslocal
#else
#define dmmgsetsneslocal_ pdmmgsetsneslocal_
#endif
#else
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define dmmgsetsneslocal_ DMMGSETSNESLOCAL
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define dmmgsetsneslocal_ dmmgsetsneslocal
#endif
#endif



/* Definitions of Fortran Wrapper routines */
#if defined(__cplusplus)
extern "C" {
#endif
void PETSC_STDCALL   snesdacomputejacobianwithadic_(SNES snes,Vec X,Mat *J,Mat *B,MatStructure *flag,void*ptr, int *__ierr ){
*__ierr = SNESDAComputeJacobianWithAdic(
	(SNES)PetscToPointer((snes) ),
	(Vec)PetscToPointer((X) ),J,B,
	(MatStructure* )PetscToPointer((flag) ),ptr);
}
void PETSC_STDCALL  dmmgsetsneslocal_(DMMG *dmmg,DALocalFunction1 *function,DALocalFunction1 *jacobian,
                        DALocalFunction1 *ad_function,DALocalFunction1 *admf_function, int *__ierr ){
*__ierr = DMMGSetSNESLocal(dmmg,*function,*jacobian,*ad_function,*admf_function);
}
#if defined(__cplusplus)
}
#endif
