Commits

Hong Zhang committed 223f2e8

cleanup output of ex28

  • Participants
  • Parent commits 47e5527

Comments (0)

Files changed (5)

src/ksp/ksp/examples/tests/ex28.c

   ierr = VecAXPY(x,neg_one,u);CHKERRQ(ierr);
   ierr = VecNorm(x,NORM_2,&norm);CHKERRQ(ierr);
   ierr = KSPGetIterationNumber(ksp,&its);CHKERRQ(ierr);
-  ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of error %G, Iterations %D\n",norm,its);CHKERRQ(ierr);
+  if (norm > 1.e-14) {
+    ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of error %G, Iterations %D\n",norm,its);CHKERRQ(ierr);
+  }
 
   /* Free work space. */
   ierr = VecDestroy(&x);CHKERRQ(ierr); ierr = VecDestroy(&u);CHKERRQ(ierr);

src/ksp/ksp/examples/tests/makefile

 	   ${RM} -f ex28.tmp
 runex28_3:
 	-@${MPIEXEC} -n 5 ./ex28 -procedural -pc_redundant_number 3 -redundant_ksp_type gmres -redundant_pc_type bjacobi > ex28.tmp 2>&1; \
-	if (${DIFF} output/ex28_3.out ex28.tmp) then true; \
+	if (${DIFF} output/ex28.out ex28.tmp) then true; \
 	   else echo ${PWD} ; echo "Possible problem with with ex28_3, diffs above \n========================================="; fi; \
 	   ${RM} -f ex28.tmp
 runex29:

src/ksp/ksp/examples/tests/output/ex28.out

-Norm of error 1.04148e-15, Iterations 5

src/ksp/ksp/examples/tests/output/ex28_2.out

 row 7: (6, -1)  (7, 2)  (8, -1) 
 row 8: (7, -1)  (8, 2)  (9, -1) 
 row 9: (8, -1)  (9, 2) 
-Norm of error 1.92296e-16, Iterations 1

src/ksp/ksp/examples/tests/output/ex28_3.out

-Norm of error 4.24796e-15, Iterations 1