<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -178,7 +178,7 @@ int main(int argc,char **args)
     switch (t) {
       case 0: ierr = PCShellSetApply(pc, StokesPCApply0);CHKERRQ(ierr); break; // Full block LU saddle preconditioner
       case 1: ierr = PCShellSetApply(pc, StokesPCApply1);CHKERRQ(ierr); break; // Upper triangular saddle preconditioner
-      case 2: ierr = PCShellSetApply(pc, StokesPCApply2);CHKERRQ(ierr); break; // Upper triangular saddle preconditioner
+      case 2: ierr = PCShellSetApply(pc, StokesPCApply2);CHKERRQ(ierr); break; // Block diagonal saddle preconditioner
       default: SETERRQ1(1, &quot;pc_saddle_type %d not implemented&quot;, t);CHKERRQ(ierr);
     }
   }
@@ -201,7 +201,13 @@ int main(int argc,char **args)
       //ierr = VecView(r, PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);printf(&quot;\n&quot;);
     }
   }
-  ierr = MatNullSpaceTest(ns, A);CHKERRQ(ierr);
+  {
+    PetscTruth isNull;
+    ierr = MatNullSpaceTest(ns, A, &amp;isNull);CHKERRQ(ierr);
+    if (!isNull) {
+      SETERRQ(1,&quot;Null space test failed&quot;);
+    }
+  }
 
   if (true) {
     PetscReal exponent = opt-&gt;exponent;
@@ -1150,11 +1156,11 @@ PetscErrorCode StokesMixedVelocity(StokesCtx *c, Vec vL)
 #define __FUNCT__ &quot;StokesPCSetUp0&quot;
 PetscErrorCode StokesPCSetUp0(void *void_ctx)
 {
-  StokesCtx     *ctx = (StokesCtx *)void_ctx;
-  PetscInt       d = ctx-&gt;numDims, *dim = ctx-&gt;dim;
-  PetscReal     *x, *eta, *deta, **strain;
-  PetscInt      *ixL;
-  PetscErrorCode ierr;
+  StokesCtx      *ctx = (StokesCtx *)void_ctx;
+  PetscInt        d   = ctx-&gt;numDims, *dim = ctx-&gt;dim;
+  PetscReal      *x, *eta, *deta, **strain;
+  const PetscInt *ixL;
+  PetscErrorCode  ierr;
 
   PetscFunctionBegin;
   ierr = VecGetArray(ctx-&gt;eta, &amp;eta); CHKERRQ(ierr);
@@ -1253,7 +1259,7 @@ PetscErrorCode StokesPCSetUp1(void *void_ctx)
   StokesCtx      *ctx         = (StokesCtx *)void_ctx;
   const PetscInt d = ctx-&gt;numDims, *dim = ctx-&gt;dim, N = productInt(d, ndim);
   PetscReal      *x, *eta, *deta, **strain, *lump;
-  PetscInt       *ixL;
+  const PetscInt *ixL;
   PetscInt row[N*d], col[N*d];
   PetscReal A[N*d][N*d], M[N*d][N*d];
   PetscErrorCode  ierr;
@@ -1446,15 +1452,15 @@ PetscErrorCode StokesPCSetUp1(void *void_ctx)
 #define __FUNCT__ &quot;StokesPCSetUp2&quot;
 PetscErrorCode StokesPCSetUp2(void *void_ctx)
 {
-  StokesCtx *ctx = (StokesCtx *)void_ctx;
-  PetscInt d = ctx-&gt;numDims, *dim = ctx-&gt;dim, m = d*(4*d+1);
-  PetscInt n, row, col[m];
-  PetscInt *ixL;
-  PetscScalar values[m];
-  ISColoring iscolor;
-  MatFDColoring fdcolor;
-  MatStructure flag;
-  PetscErrorCode ierr;
+  StokesCtx      *ctx = (StokesCtx *)void_ctx;
+  PetscInt        d   = ctx-&gt;numDims, *dim = ctx-&gt;dim, m = d*(4*d+1);
+  PetscInt        n, row, col[m];
+  const PetscInt *ixL;
+  PetscScalar     values[m];
+  ISColoring      iscolor;
+  MatFDColoring   fdcolor;
+  MatStructure    flag;
+  PetscErrorCode  ierr;
 
   PetscFunctionBegin;
   ierr = VecGetSize(ctx-&gt;vG0, &amp;n);CHKERRQ(ierr);
@@ -1514,11 +1520,11 @@ PetscErrorCode StokesColorFunction(void *dummy, Vec x, Vec y, void *void_ctx)
 #define __FUNCT__ &quot;StokesPCSetUp3&quot;
 PetscErrorCode StokesPCSetUp3(void *void_ctx)
 {
-  StokesCtx     *ctx = (StokesCtx *)void_ctx;
-  PetscInt       d = ctx-&gt;numDims, *dim = ctx-&gt;dim;
-  PetscReal     *x, *Eta, *dEta, **Strain;
-  PetscInt      *ixL;
-  PetscErrorCode ierr;
+  StokesCtx      *ctx = (StokesCtx *)void_ctx;
+  PetscInt        d = ctx-&gt;numDims, *dim = ctx-&gt;dim;
+  PetscReal      *x, *Eta, *dEta, **Strain;
+  const PetscInt *ixL;
+  PetscErrorCode  ierr;
 
   PetscFunctionBegin;
   ierr = VecGetArray(ctx-&gt;eta, &amp;Eta); CHKERRQ(ierr);</diff>
      <filename>stokes.C</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,8 @@ test_range () {
     echo 'cos_scale = ' $cos_scale
     for n in $(seq $2 $3 $4); do
 	printf &quot;%3d: &quot; $n
-	./elliptic -dims $n,$n -exact 0 -cos_scale $cos_scale -gamma 4 -ksp_rtol 1e-12 -snes_rtol 1e-12 | grep 'Norm of error'
+	./elliptic -dim $n,$n -exact 0 -cos_scale $cos_scale -gamma 4 -ksp_rtol 1e-12 -snes_rtol 1e-12 | grep 'Norm of error'
+	#./elliptic -dim $n,$n -exact 0 -cos_scale $cos_scale -gamma 4 -snes_max_it 1 -ksp_type preonly -pc_type lu # | grep 'Norm of error'
     done
 }
 </diff>
      <filename>tests.sh</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c4ec55acd7bd70d2e532247daba08041d99be99a</id>
    </parent>
  </parents>
  <author>
    <name>Jed Brown</name>
    <email>jed@59A2.org</email>
  </author>
  <url>http://github.com/jedbrown/spectral-petsc/commit/1a13f5d7d809b5ba48fa6dc672d7ad1216b86063</url>
  <id>1a13f5d7d809b5ba48fa6dc672d7ad1216b86063</id>
  <committed-date>2008-12-09T05:37:34-08:00</committed-date>
  <authored-date>2008-12-09T05:37:34-08:00</authored-date>
  <message>Update for recent PETSc changes</message>
  <tree>74c40120ae85e0be7d448809082840f79340de58</tree>
  <committer>
    <name>Jed Brown</name>
    <email>jed@59A2.org</email>
  </committer>
</commit>
