Commits

Jed Brown committed 1cfd975

DMDA: fix missing declarations and includes

Comments (0)

Files changed (3)

include/petscdmda.h

 #include <petscdm.h>
 #include <petscdt.h>
 #include <petscdmdatypes.h>
+#include <petscfetypes.h>
 #include <petscpf.h>
 #include <petscao.h>
 
 PETSC_EXTERN PetscErrorCode DMDACreateSection(DM, PetscInt[], PetscInt[], PetscInt[], PetscSection *);
 PETSC_EXTERN PetscErrorCode DMDAComputeCellGeometry(DM, PetscInt, PetscQuadrature *, PetscReal [], PetscReal [], PetscReal [], PetscReal []);
 PETSC_EXTERN PetscErrorCode DMDAVecGetClosure(DM, PetscSection, Vec, PetscInt, PetscInt *, const PetscScalar **);
+PETSC_EXTERN PetscErrorCode DMDAVecRestoreClosure(DM, PetscSection, Vec, PetscInt, PetscInt *, const PetscScalar **);
 PETSC_EXTERN PetscErrorCode DMDAVecSetClosure(DM, PetscSection, Vec, PetscInt, const PetscScalar *, InsertMode);
 PETSC_EXTERN PetscErrorCode DMDAGetClosure(DM, PetscSection, PetscInt, PetscInt*, const PetscInt**);
 PETSC_EXTERN PetscErrorCode DMDARestoreClosure(DM, PetscSection, PetscInt, PetscInt*, const PetscInt**);

src/dm/impls/da/dalocal.c

   ierr = DMDAGetHeightStratum(dm, 0, &cStart, &cEnd);CHKERRQ(ierr);
   ierr = PetscFEGetQuadrature(fe[0], &quad);CHKERRQ(ierr);
   for (c = cStart; c < cEnd; ++c) {
-    PetscScalar *x = NULL;
+    const PetscScalar *x = NULL;
     PetscReal    elemDiff = 0.0;
 
     ierr = DMDAComputeCellGeometry(dm, c, &quad, v0, J, invJ, &detJ);CHKERRQ(ierr);

src/snes/interface/snesut.c

 
 #include <petsc-private/snesimpl.h>       /*I   "petsc-private/snesimpl.h"   I*/
+#include <petscdm.h>
 #include <petscblaslapack.h>
 
 #undef __FUNCT__