Commits

BarryFSmith committed 9a40d00

ex10.c initialized variable should be static so it does not recompute the linear part of the Jacogian each time

Comments (0)

Files changed (1)

src/ts/examples/tutorials/advection-diffusion-reaction/ex10.c

   Vec                  localC;
   const PetscReal      *rowstart,*colstart;
   const PetscReal      **cHeV,**fHeV;
-  PetscBool            initialized = PETSC_FALSE;
+  static PetscBool     initialized = PETSC_FALSE;
 
   PetscFunctionBeginUser;
   ierr = cHeVCreate((PetscScalar***)&cHeV);CHKERRQ(ierr);