#include "petscsys.h"
#include "petscfix.h"
#include "petsc/private/fortranimpl.h"
/* section.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) (a ? *(PetscFortranAddr *)(a) : 0)
#define PetscFromPointer(a) (PetscFortranAddr)(a)
#define PetscRmPointer(a)
#endif

#include "petscsection.h"
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectioncreate_ PETSCSECTIONCREATE
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectioncreate_ petscsectioncreate
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectioncopy_ PETSCSECTIONCOPY
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectioncopy_ petscsectioncopy
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionclone_ PETSCSECTIONCLONE
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionclone_ petscsectionclone
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetfromoptions_ PETSCSECTIONSETFROMOPTIONS
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetfromoptions_ petscsectionsetfromoptions
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectioncompare_ PETSCSECTIONCOMPARE
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectioncompare_ petscsectioncompare
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetnumfields_ PETSCSECTIONGETNUMFIELDS
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetnumfields_ petscsectiongetnumfields
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetnumfields_ PETSCSECTIONSETNUMFIELDS
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetnumfields_ petscsectionsetnumfields
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetfieldname_ PETSCSECTIONGETFIELDNAME
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetfieldname_ petscsectiongetfieldname
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetfieldname_ PETSCSECTIONSETFIELDNAME
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetfieldname_ petscsectionsetfieldname
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetcomponentname_ PETSCSECTIONGETCOMPONENTNAME
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetcomponentname_ petscsectiongetcomponentname
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetcomponentname_ PETSCSECTIONSETCOMPONENTNAME
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetcomponentname_ petscsectionsetcomponentname
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetfieldcomponents_ PETSCSECTIONGETFIELDCOMPONENTS
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetfieldcomponents_ petscsectiongetfieldcomponents
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetfieldcomponents_ PETSCSECTIONSETFIELDCOMPONENTS
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetfieldcomponents_ petscsectionsetfieldcomponents
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetchart_ PETSCSECTIONGETCHART
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetchart_ petscsectiongetchart
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetchart_ PETSCSECTIONSETCHART
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetchart_ petscsectionsetchart
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetpermutation_ PETSCSECTIONGETPERMUTATION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetpermutation_ petscsectiongetpermutation
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetpermutation_ PETSCSECTIONSETPERMUTATION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetpermutation_ petscsectionsetpermutation
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetpointmajor_ PETSCSECTIONGETPOINTMAJOR
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetpointmajor_ petscsectiongetpointmajor
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetpointmajor_ PETSCSECTIONSETPOINTMAJOR
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetpointmajor_ petscsectionsetpointmajor
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetincludesconstraints_ PETSCSECTIONGETINCLUDESCONSTRAINTS
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetincludesconstraints_ petscsectiongetincludesconstraints
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetincludesconstraints_ PETSCSECTIONSETINCLUDESCONSTRAINTS
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetincludesconstraints_ petscsectionsetincludesconstraints
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetdof_ PETSCSECTIONGETDOF
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetdof_ petscsectiongetdof
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetdof_ PETSCSECTIONSETDOF
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetdof_ petscsectionsetdof
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionadddof_ PETSCSECTIONADDDOF
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionadddof_ petscsectionadddof
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetfielddof_ PETSCSECTIONGETFIELDDOF
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetfielddof_ petscsectiongetfielddof
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetfielddof_ PETSCSECTIONSETFIELDDOF
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetfielddof_ petscsectionsetfielddof
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionaddfielddof_ PETSCSECTIONADDFIELDDOF
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionaddfielddof_ petscsectionaddfielddof
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetconstraintdof_ PETSCSECTIONGETCONSTRAINTDOF
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetconstraintdof_ petscsectiongetconstraintdof
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetconstraintdof_ PETSCSECTIONSETCONSTRAINTDOF
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetconstraintdof_ petscsectionsetconstraintdof
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionaddconstraintdof_ PETSCSECTIONADDCONSTRAINTDOF
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionaddconstraintdof_ petscsectionaddconstraintdof
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetfieldconstraintdof_ PETSCSECTIONGETFIELDCONSTRAINTDOF
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetfieldconstraintdof_ petscsectiongetfieldconstraintdof
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetfieldconstraintdof_ PETSCSECTIONSETFIELDCONSTRAINTDOF
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetfieldconstraintdof_ petscsectionsetfieldconstraintdof
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionaddfieldconstraintdof_ PETSCSECTIONADDFIELDCONSTRAINTDOF
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionaddfieldconstraintdof_ petscsectionaddfieldconstraintdof
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetupbc_ PETSCSECTIONSETUPBC
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetupbc_ petscsectionsetupbc
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetup_ PETSCSECTIONSETUP
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetup_ petscsectionsetup
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetmaxdof_ PETSCSECTIONGETMAXDOF
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetmaxdof_ petscsectiongetmaxdof
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetstoragesize_ PETSCSECTIONGETSTORAGESIZE
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetstoragesize_ petscsectiongetstoragesize
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetconstrainedstoragesize_ PETSCSECTIONGETCONSTRAINEDSTORAGESIZE
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetconstrainedstoragesize_ petscsectiongetconstrainedstoragesize
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectioncreateglobalsection_ PETSCSECTIONCREATEGLOBALSECTION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectioncreateglobalsection_ petscsectioncreateglobalsection
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectioncreateglobalsectioncensored_ PETSCSECTIONCREATEGLOBALSECTIONCENSORED
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectioncreateglobalsectioncensored_ petscsectioncreateglobalsectioncensored
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetpointlayout_ PETSCSECTIONGETPOINTLAYOUT
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetpointlayout_ petscsectiongetpointlayout
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetvaluelayout_ PETSCSECTIONGETVALUELAYOUT
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetvaluelayout_ petscsectiongetvaluelayout
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetoffset_ PETSCSECTIONGETOFFSET
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetoffset_ petscsectiongetoffset
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetoffset_ PETSCSECTIONSETOFFSET
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetoffset_ petscsectionsetoffset
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetfieldoffset_ PETSCSECTIONGETFIELDOFFSET
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetfieldoffset_ petscsectiongetfieldoffset
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetfieldoffset_ PETSCSECTIONSETFIELDOFFSET
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetfieldoffset_ petscsectionsetfieldoffset
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetfieldpointoffset_ PETSCSECTIONGETFIELDPOINTOFFSET
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetfieldpointoffset_ petscsectiongetfieldpointoffset
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetoffsetrange_ PETSCSECTIONGETOFFSETRANGE
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetoffsetrange_ petscsectiongetoffsetrange
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectioncreatesubsection_ PETSCSECTIONCREATESUBSECTION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectioncreatesubsection_ petscsectioncreatesubsection
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectioncreatecomponentsubsection_ PETSCSECTIONCREATECOMPONENTSUBSECTION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectioncreatecomponentsubsection_ petscsectioncreatecomponentsubsection
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectioncreatesupersection_ PETSCSECTIONCREATESUPERSECTION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectioncreatesupersection_ petscsectioncreatesupersection
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectioncreatesubmeshsection_ PETSCSECTIONCREATESUBMESHSECTION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectioncreatesubmeshsection_ petscsectioncreatesubmeshsection
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectioncreatesubdomainsection_ PETSCSECTIONCREATESUBDOMAINSECTION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectioncreatesubdomainsection_ petscsectioncreatesubdomainsection
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionviewfromoptions_ PETSCSECTIONVIEWFROMOPTIONS
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionviewfromoptions_ petscsectionviewfromoptions
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionview_ PETSCSECTIONVIEW
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionview_ petscsectionview
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionload_ PETSCSECTIONLOAD
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionload_ petscsectionload
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionresetclosurepermutation_ PETSCSECTIONRESETCLOSUREPERMUTATION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionresetclosurepermutation_ petscsectionresetclosurepermutation
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionreset_ PETSCSECTIONRESET
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionreset_ petscsectionreset
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiondestroy_ PETSCSECTIONDESTROY
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiondestroy_ petscsectiondestroy
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionhasconstraints_ PETSCSECTIONHASCONSTRAINTS
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionhasconstraints_ petscsectionhasconstraints
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetconstraintindices_ PETSCSECTIONSETCONSTRAINTINDICES
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetconstraintindices_ petscsectionsetconstraintindices
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionpermute_ PETSCSECTIONPERMUTE
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionpermute_ petscsectionpermute
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetclosureindex_ PETSCSECTIONSETCLOSUREINDEX
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetclosureindex_ petscsectionsetclosureindex
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetclosureindex_ PETSCSECTIONGETCLOSUREINDEX
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetclosureindex_ petscsectiongetclosureindex
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetclosurepermutation_ PETSCSECTIONSETCLOSUREPERMUTATION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetclosurepermutation_ petscsectionsetclosurepermutation
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetclosurepermutation_ PETSCSECTIONGETCLOSUREPERMUTATION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetclosurepermutation_ petscsectiongetclosurepermutation
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetclosureinversepermutation_ PETSCSECTIONGETCLOSUREINVERSEPERMUTATION
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetclosureinversepermutation_ petscsectiongetclosureinversepermutation
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetfield_ PETSCSECTIONGETFIELD
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetfield_ petscsectiongetfield
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsymcreate_ PETSCSECTIONSYMCREATE
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsymcreate_ petscsectionsymcreate
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsymsettype_ PETSCSECTIONSYMSETTYPE
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsymsettype_ petscsectionsymsettype
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsymgettype_ PETSCSECTIONSYMGETTYPE
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsymgettype_ petscsectionsymgettype
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsymdestroy_ PETSCSECTIONSYMDESTROY
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsymdestroy_ petscsectionsymdestroy
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsymview_ PETSCSECTIONSYMVIEW
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsymview_ petscsectionsymview
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetsym_ PETSCSECTIONSETSYM
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetsym_ petscsectionsetsym
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetsym_ PETSCSECTIONGETSYM
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetsym_ petscsectiongetsym
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetfieldsym_ PETSCSECTIONSETFIELDSYM
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetfieldsym_ petscsectionsetfieldsym
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetfieldsym_ PETSCSECTIONGETFIELDSYM
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetfieldsym_ petscsectiongetfieldsym
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsymcopy_ PETSCSECTIONSYMCOPY
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsymcopy_ petscsectionsymcopy
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsymdistribute_ PETSCSECTIONSYMDISTRIBUTE
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsymdistribute_ petscsectionsymdistribute
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectiongetusefieldoffsets_ PETSCSECTIONGETUSEFIELDOFFSETS
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectiongetusefieldoffsets_ petscsectiongetusefieldoffsets
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionsetusefieldoffsets_ PETSCSECTIONSETUSEFIELDOFFSETS
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionsetusefieldoffsets_ petscsectionsetusefieldoffsets
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define petscsectionextractdofsfromarray_ PETSCSECTIONEXTRACTDOFSFROMARRAY
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
#define petscsectionextractdofsfromarray_ petscsectionextractdofsfromarray
#endif
/* Provide declarations for malloc/free if needed for strings */
#include <stdlib.h>


/* Definitions of Fortran Wrapper routines */
#if defined(__cplusplus)
extern "C" {
#endif
PETSC_EXTERN void  petscsectioncreate_(MPI_Fint * comm,PetscSection *s, int *ierr)
{
PETSC_FORTRAN_OBJECT_CREATE(s);
 PetscBool s_null = !*(void**) s ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionCreate(
	MPI_Comm_f2c(*(comm)),s);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! s_null && !*(void**) s) * (void **) s = (void *)-2;
}
PETSC_EXTERN void  petscsectioncopy_(PetscSection section,PetscSection newSection, int *ierr)
{
CHKFORTRANNULLOBJECT(section);
CHKFORTRANNULLOBJECT(newSection);
*ierr = PetscSectionCopy(
	(PetscSection)PetscToPointer((section) ),
	(PetscSection)PetscToPointer((newSection) ));
}
PETSC_EXTERN void  petscsectionclone_(PetscSection section,PetscSection *newSection, int *ierr)
{
CHKFORTRANNULLOBJECT(section);
PetscBool newSection_null = !*(void**) newSection ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(newSection);
*ierr = PetscSectionClone(
	(PetscSection)PetscToPointer((section) ),newSection);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! newSection_null && !*(void**) newSection) * (void **) newSection = (void *)-2;
}
PETSC_EXTERN void  petscsectionsetfromoptions_(PetscSection s, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionSetFromOptions(
	(PetscSection)PetscToPointer((s) ));
}
PETSC_EXTERN void  petscsectioncompare_(PetscSection s1,PetscSection s2,PetscBool *congruent, int *ierr)
{
CHKFORTRANNULLOBJECT(s1);
CHKFORTRANNULLOBJECT(s2);
*ierr = PetscSectionCompare(
	(PetscSection)PetscToPointer((s1) ),
	(PetscSection)PetscToPointer((s2) ),congruent);
}
PETSC_EXTERN void  petscsectiongetnumfields_(PetscSection s,PetscInt *numFields, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(numFields);
*ierr = PetscSectionGetNumFields(
	(PetscSection)PetscToPointer((s) ),numFields);
}
PETSC_EXTERN void  petscsectionsetnumfields_(PetscSection s,PetscInt *numFields, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionSetNumFields(
	(PetscSection)PetscToPointer((s) ),*numFields);
}
PETSC_EXTERN void  petscsectiongetfieldname_(PetscSection s,PetscInt *field, char *fieldName, int *ierr, PETSC_FORTRAN_CHARLEN_T cl0)
{
  char *_cltmp0 = PETSC_NULLPTR;
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionGetFieldName(
	(PetscSection)PetscToPointer((s) ),*field,(const char **)&_cltmp0);
/* insert C-to-Fortran conversion for fieldName */
*ierr = PetscStrncpy(fieldName, _cltmp0, cl0);
                        if (*ierr) return;
                        FIXRETURNCHAR(PETSC_TRUE, fieldName, cl0);
}
PETSC_EXTERN void  petscsectionsetfieldname_(PetscSection s,PetscInt *field, char fieldName[], int *ierr, PETSC_FORTRAN_CHARLEN_T cl0)
{
  char *_cltmp0 = PETSC_NULLPTR;
CHKFORTRANNULLOBJECT(s);
/* insert Fortran-to-C conversion for fieldName */
  FIXCHAR(fieldName,cl0,_cltmp0);
*ierr = PetscSectionSetFieldName(
	(PetscSection)PetscToPointer((s) ),*field,_cltmp0);
  FREECHAR(fieldName,_cltmp0);
}
PETSC_EXTERN void  petscsectiongetcomponentname_(PetscSection s,PetscInt *field,PetscInt *comp, char *compName, int *ierr, PETSC_FORTRAN_CHARLEN_T cl0)
{
  char *_cltmp0 = PETSC_NULLPTR;
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionGetComponentName(
	(PetscSection)PetscToPointer((s) ),*field,*comp,(const char **)&_cltmp0);
/* insert C-to-Fortran conversion for compName */
*ierr = PetscStrncpy(compName, _cltmp0, cl0);
                        if (*ierr) return;
                        FIXRETURNCHAR(PETSC_TRUE, compName, cl0);
}
PETSC_EXTERN void  petscsectionsetcomponentname_(PetscSection s,PetscInt *field,PetscInt *comp, char compName[], int *ierr, PETSC_FORTRAN_CHARLEN_T cl0)
{
  char *_cltmp0 = PETSC_NULLPTR;
CHKFORTRANNULLOBJECT(s);
/* insert Fortran-to-C conversion for compName */
  FIXCHAR(compName,cl0,_cltmp0);
*ierr = PetscSectionSetComponentName(
	(PetscSection)PetscToPointer((s) ),*field,*comp,_cltmp0);
  FREECHAR(compName,_cltmp0);
}
PETSC_EXTERN void  petscsectiongetfieldcomponents_(PetscSection s,PetscInt *field,PetscInt *numComp, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(numComp);
*ierr = PetscSectionGetFieldComponents(
	(PetscSection)PetscToPointer((s) ),*field,numComp);
}
PETSC_EXTERN void  petscsectionsetfieldcomponents_(PetscSection s,PetscInt *field,PetscInt *numComp, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionSetFieldComponents(
	(PetscSection)PetscToPointer((s) ),*field,*numComp);
}
PETSC_EXTERN void  petscsectiongetchart_(PetscSection s,PetscInt *pStart,PetscInt *pEnd, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(pStart);
CHKFORTRANNULLINTEGER(pEnd);
*ierr = PetscSectionGetChart(
	(PetscSection)PetscToPointer((s) ),pStart,pEnd);
}
PETSC_EXTERN void  petscsectionsetchart_(PetscSection s,PetscInt *pStart,PetscInt *pEnd, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionSetChart(
	(PetscSection)PetscToPointer((s) ),*pStart,*pEnd);
}
PETSC_EXTERN void  petscsectiongetpermutation_(PetscSection s,IS *perm, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
PetscBool perm_null = !*(void**) perm ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(perm);
*ierr = PetscSectionGetPermutation(
	(PetscSection)PetscToPointer((s) ),perm);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! perm_null && !*(void**) perm) * (void **) perm = (void *)-2;
}
PETSC_EXTERN void  petscsectionsetpermutation_(PetscSection s,IS perm, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLOBJECT(perm);
*ierr = PetscSectionSetPermutation(
	(PetscSection)PetscToPointer((s) ),
	(IS)PetscToPointer((perm) ));
}
PETSC_EXTERN void  petscsectiongetpointmajor_(PetscSection s,PetscBool *pm, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionGetPointMajor(
	(PetscSection)PetscToPointer((s) ),pm);
}
PETSC_EXTERN void  petscsectionsetpointmajor_(PetscSection s,PetscBool *pm, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionSetPointMajor(
	(PetscSection)PetscToPointer((s) ),*pm);
}
PETSC_EXTERN void  petscsectiongetincludesconstraints_(PetscSection s,PetscBool *includesConstraints, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionGetIncludesConstraints(
	(PetscSection)PetscToPointer((s) ),includesConstraints);
}
PETSC_EXTERN void  petscsectionsetincludesconstraints_(PetscSection s,PetscBool *includesConstraints, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionSetIncludesConstraints(
	(PetscSection)PetscToPointer((s) ),*includesConstraints);
}
PETSC_EXTERN void  petscsectiongetdof_(PetscSection s,PetscInt *point,PetscInt *numDof, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(numDof);
*ierr = PetscSectionGetDof(
	(PetscSection)PetscToPointer((s) ),*point,numDof);
}
PETSC_EXTERN void  petscsectionsetdof_(PetscSection s,PetscInt *point,PetscInt *numDof, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionSetDof(
	(PetscSection)PetscToPointer((s) ),*point,*numDof);
}
PETSC_EXTERN void  petscsectionadddof_(PetscSection s,PetscInt *point,PetscInt *numDof, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionAddDof(
	(PetscSection)PetscToPointer((s) ),*point,*numDof);
}
PETSC_EXTERN void  petscsectiongetfielddof_(PetscSection s,PetscInt *point,PetscInt *field,PetscInt *numDof, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(numDof);
*ierr = PetscSectionGetFieldDof(
	(PetscSection)PetscToPointer((s) ),*point,*field,numDof);
}
PETSC_EXTERN void  petscsectionsetfielddof_(PetscSection s,PetscInt *point,PetscInt *field,PetscInt *numDof, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionSetFieldDof(
	(PetscSection)PetscToPointer((s) ),*point,*field,*numDof);
}
PETSC_EXTERN void  petscsectionaddfielddof_(PetscSection s,PetscInt *point,PetscInt *field,PetscInt *numDof, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionAddFieldDof(
	(PetscSection)PetscToPointer((s) ),*point,*field,*numDof);
}
PETSC_EXTERN void  petscsectiongetconstraintdof_(PetscSection s,PetscInt *point,PetscInt *numDof, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(numDof);
*ierr = PetscSectionGetConstraintDof(
	(PetscSection)PetscToPointer((s) ),*point,numDof);
}
PETSC_EXTERN void  petscsectionsetconstraintdof_(PetscSection s,PetscInt *point,PetscInt *numDof, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionSetConstraintDof(
	(PetscSection)PetscToPointer((s) ),*point,*numDof);
}
PETSC_EXTERN void  petscsectionaddconstraintdof_(PetscSection s,PetscInt *point,PetscInt *numDof, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionAddConstraintDof(
	(PetscSection)PetscToPointer((s) ),*point,*numDof);
}
PETSC_EXTERN void  petscsectiongetfieldconstraintdof_(PetscSection s,PetscInt *point,PetscInt *field,PetscInt *numDof, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(numDof);
*ierr = PetscSectionGetFieldConstraintDof(
	(PetscSection)PetscToPointer((s) ),*point,*field,numDof);
}
PETSC_EXTERN void  petscsectionsetfieldconstraintdof_(PetscSection s,PetscInt *point,PetscInt *field,PetscInt *numDof, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionSetFieldConstraintDof(
	(PetscSection)PetscToPointer((s) ),*point,*field,*numDof);
}
PETSC_EXTERN void  petscsectionaddfieldconstraintdof_(PetscSection s,PetscInt *point,PetscInt *field,PetscInt *numDof, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionAddFieldConstraintDof(
	(PetscSection)PetscToPointer((s) ),*point,*field,*numDof);
}
PETSC_EXTERN void  petscsectionsetupbc_(PetscSection s, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionSetUpBC(
	(PetscSection)PetscToPointer((s) ));
}
PETSC_EXTERN void  petscsectionsetup_(PetscSection s, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionSetUp(
	(PetscSection)PetscToPointer((s) ));
}
PETSC_EXTERN void  petscsectiongetmaxdof_(PetscSection s,PetscInt *maxDof, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(maxDof);
*ierr = PetscSectionGetMaxDof(
	(PetscSection)PetscToPointer((s) ),maxDof);
}
PETSC_EXTERN void  petscsectiongetstoragesize_(PetscSection s,PetscInt *size, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(size);
*ierr = PetscSectionGetStorageSize(
	(PetscSection)PetscToPointer((s) ),size);
}
PETSC_EXTERN void  petscsectiongetconstrainedstoragesize_(PetscSection s,PetscInt *size, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(size);
*ierr = PetscSectionGetConstrainedStorageSize(
	(PetscSection)PetscToPointer((s) ),size);
}
PETSC_EXTERN void  petscsectioncreateglobalsection_(PetscSection s,PetscSF sf,PetscBool *usePermutation,PetscBool *includeConstraints,PetscBool *localOffsets,PetscSection *gsection, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLOBJECT(sf);
PetscBool gsection_null = !*(void**) gsection ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(gsection);
*ierr = PetscSectionCreateGlobalSection(
	(PetscSection)PetscToPointer((s) ),
	(PetscSF)PetscToPointer((sf) ),*usePermutation,*includeConstraints,*localOffsets,gsection);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! gsection_null && !*(void**) gsection) * (void **) gsection = (void *)-2;
}
PETSC_EXTERN void  petscsectioncreateglobalsectioncensored_(PetscSection s,PetscSF sf,PetscBool *includeConstraints,PetscInt *numExcludes, PetscInt excludes[],PetscSection *gsection, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLOBJECT(sf);
CHKFORTRANNULLINTEGER(excludes);
PetscBool gsection_null = !*(void**) gsection ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(gsection);
*ierr = PetscSectionCreateGlobalSectionCensored(
	(PetscSection)PetscToPointer((s) ),
	(PetscSF)PetscToPointer((sf) ),*includeConstraints,*numExcludes,excludes,gsection);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! gsection_null && !*(void**) gsection) * (void **) gsection = (void *)-2;
}
PETSC_EXTERN void  petscsectiongetpointlayout_(MPI_Fint * comm,PetscSection s,PetscLayout *layout, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
PetscBool layout_null = !*(void**) layout ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(layout);
*ierr = PetscSectionGetPointLayout(
	MPI_Comm_f2c(*(comm)),
	(PetscSection)PetscToPointer((s) ),layout);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! layout_null && !*(void**) layout) * (void **) layout = (void *)-2;
}
PETSC_EXTERN void  petscsectiongetvaluelayout_(MPI_Fint * comm,PetscSection s,PetscLayout *layout, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
PetscBool layout_null = !*(void**) layout ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(layout);
*ierr = PetscSectionGetValueLayout(
	MPI_Comm_f2c(*(comm)),
	(PetscSection)PetscToPointer((s) ),layout);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! layout_null && !*(void**) layout) * (void **) layout = (void *)-2;
}
PETSC_EXTERN void  petscsectiongetoffset_(PetscSection s,PetscInt *point,PetscInt *offset, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(offset);
*ierr = PetscSectionGetOffset(
	(PetscSection)PetscToPointer((s) ),*point,offset);
}
PETSC_EXTERN void  petscsectionsetoffset_(PetscSection s,PetscInt *point,PetscInt *offset, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionSetOffset(
	(PetscSection)PetscToPointer((s) ),*point,*offset);
}
PETSC_EXTERN void  petscsectiongetfieldoffset_(PetscSection s,PetscInt *point,PetscInt *field,PetscInt *offset, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(offset);
*ierr = PetscSectionGetFieldOffset(
	(PetscSection)PetscToPointer((s) ),*point,*field,offset);
}
PETSC_EXTERN void  petscsectionsetfieldoffset_(PetscSection s,PetscInt *point,PetscInt *field,PetscInt *offset, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionSetFieldOffset(
	(PetscSection)PetscToPointer((s) ),*point,*field,*offset);
}
PETSC_EXTERN void  petscsectiongetfieldpointoffset_(PetscSection s,PetscInt *point,PetscInt *field,PetscInt *offset, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(offset);
*ierr = PetscSectionGetFieldPointOffset(
	(PetscSection)PetscToPointer((s) ),*point,*field,offset);
}
PETSC_EXTERN void  petscsectiongetoffsetrange_(PetscSection s,PetscInt *start,PetscInt *end, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(start);
CHKFORTRANNULLINTEGER(end);
*ierr = PetscSectionGetOffsetRange(
	(PetscSection)PetscToPointer((s) ),start,end);
}
PETSC_EXTERN void  petscsectioncreatesubsection_(PetscSection s,PetscInt *len, PetscInt fields[],PetscSection *subs, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(fields);
PetscBool subs_null = !*(void**) subs ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(subs);
*ierr = PetscSectionCreateSubsection(
	(PetscSection)PetscToPointer((s) ),*len,fields,subs);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! subs_null && !*(void**) subs) * (void **) subs = (void *)-2;
}
PETSC_EXTERN void  petscsectioncreatecomponentsubsection_(PetscSection s,PetscInt *len, PetscInt comps[],PetscSection *subs, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(comps);
PetscBool subs_null = !*(void**) subs ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(subs);
*ierr = PetscSectionCreateComponentSubsection(
	(PetscSection)PetscToPointer((s) ),*len,comps,subs);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! subs_null && !*(void**) subs) * (void **) subs = (void *)-2;
}
PETSC_EXTERN void  petscsectioncreatesupersection_(PetscSection s[],PetscInt *len,PetscSection *supers, int *ierr)
{
PetscBool s_null = !*(void**) s ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(s);
PetscBool supers_null = !*(void**) supers ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(supers);
*ierr = PetscSectionCreateSupersection(s,*len,supers);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! s_null && !*(void**) s) * (void **) s = (void *)-2;
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! supers_null && !*(void**) supers) * (void **) supers = (void *)-2;
}
PETSC_EXTERN void  petscsectioncreatesubmeshsection_(PetscSection s,IS subpointIS,PetscSection *subs, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLOBJECT(subpointIS);
PetscBool subs_null = !*(void**) subs ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(subs);
*ierr = PetscSectionCreateSubmeshSection(
	(PetscSection)PetscToPointer((s) ),
	(IS)PetscToPointer((subpointIS) ),subs);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! subs_null && !*(void**) subs) * (void **) subs = (void *)-2;
}
PETSC_EXTERN void  petscsectioncreatesubdomainsection_(PetscSection s,IS subpointMap,PetscSection *subs, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLOBJECT(subpointMap);
PetscBool subs_null = !*(void**) subs ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(subs);
*ierr = PetscSectionCreateSubdomainSection(
	(PetscSection)PetscToPointer((s) ),
	(IS)PetscToPointer((subpointMap) ),subs);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! subs_null && !*(void**) subs) * (void **) subs = (void *)-2;
}
PETSC_EXTERN void  petscsectionviewfromoptions_(PetscSection A,PetscObject obj, char name[], int *ierr, PETSC_FORTRAN_CHARLEN_T cl0)
{
  char *_cltmp0 = PETSC_NULLPTR;
CHKFORTRANNULLOBJECT(A);
CHKFORTRANNULLOBJECT(obj);
/* insert Fortran-to-C conversion for name */
  FIXCHAR(name,cl0,_cltmp0);
*ierr = PetscSectionViewFromOptions(
	(PetscSection)PetscToPointer((A) ),
	(PetscObject)PetscToPointer((obj) ),_cltmp0);
  FREECHAR(name,_cltmp0);
}
PETSC_EXTERN void  petscsectionview_(PetscSection s,PetscViewer viewer, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLOBJECT(viewer);
*ierr = PetscSectionView(
	(PetscSection)PetscToPointer((s) ),PetscPatchDefaultViewers((PetscViewer*)viewer));
}
PETSC_EXTERN void  petscsectionload_(PetscSection s,PetscViewer viewer, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLOBJECT(viewer);
*ierr = PetscSectionLoad(
	(PetscSection)PetscToPointer((s) ),PetscPatchDefaultViewers((PetscViewer*)viewer));
}
PETSC_EXTERN void  petscsectionresetclosurepermutation_(PetscSection section, int *ierr)
{
CHKFORTRANNULLOBJECT(section);
*ierr = PetscSectionResetClosurePermutation(
	(PetscSection)PetscToPointer((section) ));
}
PETSC_EXTERN void  petscsectionreset_(PetscSection s, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionReset(
	(PetscSection)PetscToPointer((s) ));
}
PETSC_EXTERN void  petscsectiondestroy_(PetscSection *s, int *ierr)
{
PETSC_FORTRAN_OBJECT_F_DESTROYED_TO_C_NULL(s);
 PetscBool s_null = !*(void**) s ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionDestroy(s);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! s_null && !*(void**) s) * (void **) s = (void *)-2;
if (*ierr) return;
PETSC_FORTRAN_OBJECT_C_NULL_TO_F_DESTROYED(s);
 }
PETSC_EXTERN void  petscsectionhasconstraints_(PetscSection s,PetscBool *hasConstraints, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionHasConstraints(
	(PetscSection)PetscToPointer((s) ),hasConstraints);
}
PETSC_EXTERN void  petscsectionsetconstraintindices_(PetscSection s,PetscInt *point, PetscInt indices[], int *ierr)
{
CHKFORTRANNULLOBJECT(s);
CHKFORTRANNULLINTEGER(indices);
*ierr = PetscSectionSetConstraintIndices(
	(PetscSection)PetscToPointer((s) ),*point,indices);
}
PETSC_EXTERN void  petscsectionpermute_(PetscSection section,IS permutation,PetscSection *sectionNew, int *ierr)
{
CHKFORTRANNULLOBJECT(section);
CHKFORTRANNULLOBJECT(permutation);
PetscBool sectionNew_null = !*(void**) sectionNew ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(sectionNew);
*ierr = PetscSectionPermute(
	(PetscSection)PetscToPointer((section) ),
	(IS)PetscToPointer((permutation) ),sectionNew);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! sectionNew_null && !*(void**) sectionNew) * (void **) sectionNew = (void *)-2;
}
PETSC_EXTERN void  petscsectionsetclosureindex_(PetscSection section,PetscObject obj,PetscSection clSection,IS clPoints, int *ierr)
{
CHKFORTRANNULLOBJECT(section);
CHKFORTRANNULLOBJECT(obj);
CHKFORTRANNULLOBJECT(clSection);
CHKFORTRANNULLOBJECT(clPoints);
*ierr = PetscSectionSetClosureIndex(
	(PetscSection)PetscToPointer((section) ),
	(PetscObject)PetscToPointer((obj) ),
	(PetscSection)PetscToPointer((clSection) ),
	(IS)PetscToPointer((clPoints) ));
}
PETSC_EXTERN void  petscsectiongetclosureindex_(PetscSection section,PetscObject obj,PetscSection *clSection,IS *clPoints, int *ierr)
{
CHKFORTRANNULLOBJECT(section);
CHKFORTRANNULLOBJECT(obj);
PetscBool clSection_null = !*(void**) clSection ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(clSection);
PetscBool clPoints_null = !*(void**) clPoints ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(clPoints);
*ierr = PetscSectionGetClosureIndex(
	(PetscSection)PetscToPointer((section) ),
	(PetscObject)PetscToPointer((obj) ),clSection,clPoints);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! clSection_null && !*(void**) clSection) * (void **) clSection = (void *)-2;
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! clPoints_null && !*(void**) clPoints) * (void **) clPoints = (void *)-2;
}
PETSC_EXTERN void  petscsectionsetclosurepermutation_(PetscSection section,PetscObject obj,PetscInt *depth,IS perm, int *ierr)
{
CHKFORTRANNULLOBJECT(section);
CHKFORTRANNULLOBJECT(obj);
CHKFORTRANNULLOBJECT(perm);
*ierr = PetscSectionSetClosurePermutation(
	(PetscSection)PetscToPointer((section) ),
	(PetscObject)PetscToPointer((obj) ),*depth,
	(IS)PetscToPointer((perm) ));
}
PETSC_EXTERN void  petscsectiongetclosurepermutation_(PetscSection section,PetscObject obj,PetscInt *depth,PetscInt *clSize,IS *perm, int *ierr)
{
CHKFORTRANNULLOBJECT(section);
CHKFORTRANNULLOBJECT(obj);
PetscBool perm_null = !*(void**) perm ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(perm);
*ierr = PetscSectionGetClosurePermutation(
	(PetscSection)PetscToPointer((section) ),
	(PetscObject)PetscToPointer((obj) ),*depth,*clSize,perm);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! perm_null && !*(void**) perm) * (void **) perm = (void *)-2;
}
PETSC_EXTERN void  petscsectiongetclosureinversepermutation_(PetscSection section,PetscObject obj,PetscInt *depth,PetscInt *clSize,IS *perm, int *ierr)
{
CHKFORTRANNULLOBJECT(section);
CHKFORTRANNULLOBJECT(obj);
PetscBool perm_null = !*(void**) perm ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(perm);
*ierr = PetscSectionGetClosureInversePermutation(
	(PetscSection)PetscToPointer((section) ),
	(PetscObject)PetscToPointer((obj) ),*depth,*clSize,perm);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! perm_null && !*(void**) perm) * (void **) perm = (void *)-2;
}
PETSC_EXTERN void  petscsectiongetfield_(PetscSection s,PetscInt *field,PetscSection *subs, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
PetscBool subs_null = !*(void**) subs ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(subs);
*ierr = PetscSectionGetField(
	(PetscSection)PetscToPointer((s) ),*field,subs);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! subs_null && !*(void**) subs) * (void **) subs = (void *)-2;
}
PETSC_EXTERN void  petscsectionsymcreate_(MPI_Fint * comm,PetscSectionSym *sym, int *ierr)
{
PETSC_FORTRAN_OBJECT_CREATE(sym);
 PetscBool sym_null = !*(void**) sym ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(sym);
*ierr = PetscSectionSymCreate(
	MPI_Comm_f2c(*(comm)),sym);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! sym_null && !*(void**) sym) * (void **) sym = (void *)-2;
}
PETSC_EXTERN void  petscsectionsymsettype_(PetscSectionSym sym,char *method, int *ierr, PETSC_FORTRAN_CHARLEN_T cl0)
{
  char *_cltmp0 = PETSC_NULLPTR;
CHKFORTRANNULLOBJECT(sym);
/* insert Fortran-to-C conversion for method */
  FIXCHAR(method,cl0,_cltmp0);
*ierr = PetscSectionSymSetType(
	(PetscSectionSym)PetscToPointer((sym) ),_cltmp0);
  FREECHAR(method,_cltmp0);
}
PETSC_EXTERN void  petscsectionsymgettype_(PetscSectionSym sym,char *type, int *ierr, PETSC_FORTRAN_CHARLEN_T cl0)
{
  char *_cltmp0 = PETSC_NULLPTR;
CHKFORTRANNULLOBJECT(sym);
*ierr = PetscSectionSymGetType(
	(PetscSectionSym)PetscToPointer((sym) ),(const char **)&_cltmp0);
/* insert C-to-Fortran conversion for type */
*ierr = PetscStrncpy(type, _cltmp0, cl0);
                        if (*ierr) return;
                        FIXRETURNCHAR(PETSC_TRUE, type, cl0);
}
PETSC_EXTERN void  petscsectionsymdestroy_(PetscSectionSym *sym, int *ierr)
{
PETSC_FORTRAN_OBJECT_F_DESTROYED_TO_C_NULL(sym);
 PetscBool sym_null = !*(void**) sym ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(sym);
*ierr = PetscSectionSymDestroy(sym);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! sym_null && !*(void**) sym) * (void **) sym = (void *)-2;
if (*ierr) return;
PETSC_FORTRAN_OBJECT_C_NULL_TO_F_DESTROYED(sym);
 }
PETSC_EXTERN void  petscsectionsymview_(PetscSectionSym sym,PetscViewer viewer, int *ierr)
{
CHKFORTRANNULLOBJECT(sym);
CHKFORTRANNULLOBJECT(viewer);
*ierr = PetscSectionSymView(
	(PetscSectionSym)PetscToPointer((sym) ),PetscPatchDefaultViewers((PetscViewer*)viewer));
}
PETSC_EXTERN void  petscsectionsetsym_(PetscSection section,PetscSectionSym sym, int *ierr)
{
CHKFORTRANNULLOBJECT(section);
CHKFORTRANNULLOBJECT(sym);
*ierr = PetscSectionSetSym(
	(PetscSection)PetscToPointer((section) ),
	(PetscSectionSym)PetscToPointer((sym) ));
}
PETSC_EXTERN void  petscsectiongetsym_(PetscSection section,PetscSectionSym *sym, int *ierr)
{
CHKFORTRANNULLOBJECT(section);
PetscBool sym_null = !*(void**) sym ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(sym);
*ierr = PetscSectionGetSym(
	(PetscSection)PetscToPointer((section) ),sym);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! sym_null && !*(void**) sym) * (void **) sym = (void *)-2;
}
PETSC_EXTERN void  petscsectionsetfieldsym_(PetscSection section,PetscInt *field,PetscSectionSym sym, int *ierr)
{
CHKFORTRANNULLOBJECT(section);
CHKFORTRANNULLOBJECT(sym);
*ierr = PetscSectionSetFieldSym(
	(PetscSection)PetscToPointer((section) ),*field,
	(PetscSectionSym)PetscToPointer((sym) ));
}
PETSC_EXTERN void  petscsectiongetfieldsym_(PetscSection section,PetscInt *field,PetscSectionSym *sym, int *ierr)
{
CHKFORTRANNULLOBJECT(section);
PetscBool sym_null = !*(void**) sym ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(sym);
*ierr = PetscSectionGetFieldSym(
	(PetscSection)PetscToPointer((section) ),*field,sym);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! sym_null && !*(void**) sym) * (void **) sym = (void *)-2;
}
PETSC_EXTERN void  petscsectionsymcopy_(PetscSectionSym sym,PetscSectionSym nsym, int *ierr)
{
CHKFORTRANNULLOBJECT(sym);
CHKFORTRANNULLOBJECT(nsym);
*ierr = PetscSectionSymCopy(
	(PetscSectionSym)PetscToPointer((sym) ),
	(PetscSectionSym)PetscToPointer((nsym) ));
}
PETSC_EXTERN void  petscsectionsymdistribute_(PetscSectionSym sym,PetscSF migrationSF,PetscSectionSym *dsym, int *ierr)
{
CHKFORTRANNULLOBJECT(sym);
CHKFORTRANNULLOBJECT(migrationSF);
PetscBool dsym_null = !*(void**) dsym ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(dsym);
*ierr = PetscSectionSymDistribute(
	(PetscSectionSym)PetscToPointer((sym) ),
	(PetscSF)PetscToPointer((migrationSF) ),dsym);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! dsym_null && !*(void**) dsym) * (void **) dsym = (void *)-2;
}
PETSC_EXTERN void  petscsectiongetusefieldoffsets_(PetscSection s,PetscBool *flg, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionGetUseFieldOffsets(
	(PetscSection)PetscToPointer((s) ),flg);
}
PETSC_EXTERN void  petscsectionsetusefieldoffsets_(PetscSection s,PetscBool *flg, int *ierr)
{
CHKFORTRANNULLOBJECT(s);
*ierr = PetscSectionSetUseFieldOffsets(
	(PetscSection)PetscToPointer((s) ),*flg);
}
PETSC_EXTERN void  petscsectionextractdofsfromarray_(PetscSection origSection,MPI_Fint * dataType, void*origArray,IS points,PetscSection *newSection,void*newArray[], int *ierr)
{
CHKFORTRANNULLOBJECT(origSection);
CHKFORTRANNULLOBJECT(points);
PetscBool newSection_null = !*(void**) newSection ? PETSC_TRUE : PETSC_FALSE;
CHKFORTRANNULLOBJECT(newSection);
*ierr = PetscSectionExtractDofsFromArray(
	(PetscSection)PetscToPointer((origSection) ),
	MPI_Type_f2c(*(dataType)),origArray,
	(IS)PetscToPointer((points) ),newSection,newArray);
// if C routine nullifed the object, we must set to to -2 to indicate null set in Fortran
if (! newSection_null && !*(void**) newSection) * (void **) newSection = (void *)-2;
}
#if defined(__cplusplus)
}
#endif
