
      Interface
        Subroutine DMPlexGetCone(m,p,cone,ierr)
          import tDM
          PetscInt     p
          PetscInt, pointer :: cone(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexRestoreCone(m,p,cone,ierr)
          import tDM
          PetscInt     p
          PetscInt, pointer :: cone(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexGetConeOrientation(m,p,coneOrient,ierr)
          import tDM
          PetscInt     p
          PetscInt, pointer :: coneOrient(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexRestoreConeOrientation(m,p,coneOrient,ierr)
          import tDM
          PetscInt     p
          PetscInt, pointer :: coneOrient(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexGetSupport(m,p,support,ierr)
          import tDM
          PetscInt     p
          PetscInt, pointer :: support(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexRestoreSupport(m,p,support,ierr)
          import tDM
          PetscInt     p
          PetscInt, pointer :: support(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexGetTransitiveClosure(m,p,useCone,points,ierr)
          import tDM
          PetscInt     p
          PetscBool    useCone
          PetscInt, pointer :: points(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexRestoreTransitiveClosure(m,p,uC,points,ierr)
          import tDM
          PetscInt     p
          PetscBool    uC
          PetscInt, pointer :: points(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexGetJoin(m,numPoints,points,join,ierr)
          import tDM
          PetscInt     numPoints
          PetscInt, pointer :: points(:)
          PetscInt, pointer :: join(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexGetFullJoin(m,numPoints,points,join,ierr)
          import tDM
          PetscInt     numPoints
          PetscInt, pointer :: points(:)
          PetscInt, pointer :: join(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexRestoreJoin(m,numPoints,points,join,ierr)
          import tDM
          PetscInt     numPoints
          PetscInt, pointer :: points(:)
          PetscInt, pointer :: join(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexGetMeet(m,numPoints,points,meet,ierr)
          import tDM
          PetscInt     numPoints
          PetscInt, pointer :: points(:)
          PetscInt, pointer :: meet(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexGetFullMeet(m,numPoints,points,meet,ierr)
          import tDM
          PetscInt     numPoints
          PetscInt, pointer :: points(:)
          PetscInt, pointer :: meet(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexRestoreMeet(m,numPoints,points,meet,ierr)
          import tDM
          PetscInt     numPoints
          PetscInt, pointer :: points(:)
          PetscInt, pointer :: meet(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexVecGetClosure(m,section,v,point,values,ierr)
          import tDM,tPetscSection,tVec
          PetscSection section
          Vec     v
          PetscInt     point
          PetscScalar, pointer :: values(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexVecRestoreClosure(m,section,v,point,vs,ierr)
          import tDM,tPetscSection,tVec
          PetscSection section
          Vec     v
          PetscInt     point
          PetscScalar, pointer :: vs(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexVecSetClosure(m,sec,v,point,vs,mode,ierr)
          import tDM,tPetscSection,tVec
          PetscSection sec
          Vec     v
          PetscInt     point
          InsertMode   mode
          PetscScalar, pointer :: vs(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexMatSetClosure(m,s,gS,A,p,v,mode,ierr)
          import tDM,tPetscSection,tMat
          PetscSection s
          PetscSection gS
          Mat     A
          PetscInt     p
          InsertMode   mode
          PetscScalar, pointer :: v(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexCreateSection(m,l,nC,nD,nB,bF,bC,bP,pm,sc,e)
          import tDM,tPetscSection,tIS,tDMLabel
          PetscSection sc
          PetscInt     nB
          DMLabel,  pointer :: l(:)
          PetscInt, pointer :: nC(:)
          PetscInt, pointer :: nD(:)
          PetscInt, pointer :: bF(:)
          IS,       pointer :: bC(:)
          IS,       pointer :: bP(:)
          IS        pm
          PetscErrorCode e
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexComputeCellGeometryAffineFEM(m,c,v0,J,iJ,dJ,er)
          import tDM
          PetscInt   c
          PetscReal, pointer :: v0(:)
          PetscReal, pointer :: J(:)
          PetscReal, pointer :: iJ(:)
          PetscReal  dJ
          PetscErrorCode er
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexComputeCellGeometryFEM(m,c,fe,v0,J,iJ,dJ,er)
          import tDM, tPetscFE
          PetscInt   c
          PetscReal, pointer :: v0(:)
          PetscReal, pointer :: J(:)
          PetscReal, pointer :: iJ(:)
          PetscReal  dJ
          PetscErrorCode er
          PetscFE fe
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexComputeCellGeometryFVM(m,cell,vol,ct,nm,ierr)
          import tDM
          PetscInt   cell
          PetscReal  vol
          PetscReal, pointer :: ct(:)
          PetscReal, pointer :: nm(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexGetCellFields(m,c,x,xt,a,u,ut,v,ierr)
          import tDM,tIS,tVec
          IS  c
          Vec  x, xt, a
          PetscScalar, pointer :: u(:)
          PetscScalar, pointer :: ut(:)
          PetscScalar, pointer :: v(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexRestoreCellFields(m,c,x,xt,a,u,ut,v,ierr)
          import tDM,tIS,tVec
          IS  c
          Vec  x, xt, a
          PetscScalar, pointer :: u(:)
          PetscScalar, pointer :: ut(:)
          PetscScalar, pointer :: v(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexGetFaceFields(m,s,e,x,xt,f,c,g,n,uL,uR,ierr)
          import tDM,tVec
          PetscInt  s, e, n
          Vec  x, xt, f, c, g
          PetscScalar, pointer :: uL(:)
          PetscScalar, pointer :: uR(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexRestoreFaceFields(m,s,e,x,xt,f,c,g,n,uL,uR,ierr)
          import tDM,tVec
          PetscInt  s, e, n
          Vec  x, xt, f, c, g
          PetscScalar, pointer :: uL(:)
          PetscScalar, pointer :: uR(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexGetFaceGeometry(m,s,e,f,c,n,g,v,ierr)
          import tDM,tVec
          PetscInt  s, e, n
          Vec  f, c
          PetscScalar, pointer :: g(:)
          PetscScalar, pointer :: v(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexRestoreFaceGeometry(m,s,e,f,c,n,g,v,ierr)
          import tDM,tVec
          PetscInt  s, e, n
          Vec  f, c
          PetscScalar, pointer :: g(:)
          PetscScalar, pointer :: v(:)
          PetscErrorCode ierr
          DM m
        End Subroutine
      End Interface

      Interface
        Subroutine DMPlexCreateDefault(m,ierr)
          import tDM
          DM, intent(out) :: m
          PetscErrorCode, intent(out):: ierr
        End Subroutine
      End Interface
