Commits

Peter Brune  committed e514fbc

Tests for persistent lagging of the Jacobian or Preconditioner

  • Participants
  • Parent commits 9d7e2de

Comments (0)

Files changed (3)

File src/snes/examples/tutorials/makefile

 	-@${MPIEXEC} -n 2 ./ex15 -snes_monitor_short -da_grid_x 20 -da_grid_y 20 -p 1.3 -lambda 1 -jtype PICARD -picard -precheck 1 > ex15_3.tmp 2>&1; \
 	   ${DIFF} output/ex15_3.out ex15_3.tmp || echo  ${PWD} "\nPossible problem with with ex15_3, diffs above \n========================================="; \
 	   ${RM} -f ex15_3.tmp
+runex15_lag_jac:
+	-@${MPIEXEC} -n 4 ./ex15 -snes_monitor_short -da_grid_x 20 -da_grid_y 20 -p 6.0 -lambda 0 -jtype NEWTON -snes_type ngmres \
+        -npc_snes_type newtonls -npc_snes_lag_jacobian 5 -npc_pc_type asm -npc_ksp_converged_reason -npc_snes_lag_jacobian_persists > ex15_lag_jac.tmp 2>&1; \
+	   ${DIFF} output/ex15_lag_jac.out ex15_lag_jac.tmp || echo  ${PWD} "\nPossible problem with with ex15_lag_jac, diffs above \n========================================="; \
+           ${RM} -f ex15_lag_jac.tmp
+runex15_lag_pc:
+	-@${MPIEXEC} -n 4 ./ex15 -snes_monitor_short -da_grid_x 20 -da_grid_y 20 -p 6.0 -lambda 0 -jtype NEWTON -snes_type ngmres \
+        -npc_snes_type newtonls -npc_snes_lag_preconditioner 5 -npc_pc_type asm -npc_ksp_converged_reason -npc_snes_lag_preconditioner_persists > ex15_lag_pc.tmp 2>&1; \
+	   ${DIFF} output/ex15_lag_pc.out ex15_lag_pc.tmp || echo  ${PWD} "\nPossible problem with with ex15_lag_pc, diffs above \n========================================="; \
+           ${RM} -f ex15_lag_pc.tmp
+
 runex19:
 	-@${MPIEXEC} -n 2 ./ex19 -da_refine 3 -snes_monitor_short -pc_type mg -ksp_type fgmres -pc_mg_type full > ex19_1.tmp 2>&1; \
 	   if (${DIFF} output/ex19_1.out ex19_1.tmp) then true; \
                                  runex5_5_ngmres_ngs runex5_5_qn runex5_5_ls \
                                  runex5_5_fas runex5_5_ngmres_fas runex5_5_fas_additive \
                                  runex5_6 ex5.rm ex7.PETSc runex7 ex7.rm\
-                                 ex14.PETSc runex14 runex14_2 ex14.rm ex15.PETSc runex15 runex15_3 ex15.rm ex18.PETSc runex18 ex18.rm \
+                                 ex14.PETSc runex14 runex14_2 ex14.rm ex15.PETSc runex15 runex15_3 runex15_lag_jac runex15_lag_pc ex15.rm ex18.PETSc runex18 ex18.rm \
                                  ex19.PETSc runex19 runex19_5 \
                                  runex19_6 runex19_fieldsplit_2 runex19_fieldsplit_3 runex19_fieldsplit_4 \
                                  runex19_composite_fieldsplit runex19_composite_fieldsplit_bjacobi runex19_composite_fieldsplit_bjacobi_2\

File src/snes/examples/tutorials/output/ex15_lag_jac.out

+  0 SNES Function norm 0.199059 
+    Linear solve converged due to CONVERGED_RTOL iterations 18
+  1 SNES Function norm 0.179922 
+    Linear solve converged due to CONVERGED_RTOL iterations 17
+  2 SNES Function norm 0.163911 
+    Linear solve converged due to CONVERGED_RTOL iterations 17
+  3 SNES Function norm 0.150371 
+    Linear solve converged due to CONVERGED_RTOL iterations 15
+  4 SNES Function norm 0.145174 
+    Linear solve converged due to CONVERGED_RTOL iterations 13
+  5 SNES Function norm 0.143808 
+    Linear solve converged due to CONVERGED_RTOL iterations 17
+  6 SNES Function norm 0.129987 
+    Linear solve converged due to CONVERGED_RTOL iterations 17
+  7 SNES Function norm 0.118428 
+    Linear solve converged due to CONVERGED_RTOL iterations 17
+  8 SNES Function norm 0.108643 
+    Linear solve converged due to CONVERGED_RTOL iterations 17
+  9 SNES Function norm 0.100214 
+    Linear solve converged due to CONVERGED_RTOL iterations 17
+ 10 SNES Function norm 0.0804723 
+    Linear solve converged due to CONVERGED_RTOL iterations 13
+ 11 SNES Function norm 0.0784986 
+    Linear solve converged due to CONVERGED_RTOL iterations 13
+ 12 SNES Function norm 0.0776338 
+    Linear solve converged due to CONVERGED_RTOL iterations 12
+ 13 SNES Function norm 0.0773329 
+    Linear solve converged due to CONVERGED_RTOL iterations 11
+ 14 SNES Function norm 0.0768854 
+    Linear solve converged due to CONVERGED_RTOL iterations 13
+ 15 SNES Function norm 0.0765425 
+    Linear solve converged due to CONVERGED_RTOL iterations 14
+ 16 SNES Function norm 0.0691688 
+    Linear solve converged due to CONVERGED_RTOL iterations 14
+ 17 SNES Function norm 0.0629957 
+    Linear solve converged due to CONVERGED_RTOL iterations 14
+ 18 SNES Function norm 0.0577882 
+    Linear solve converged due to CONVERGED_RTOL iterations 13
+ 19 SNES Function norm 0.0533855 
+    Linear solve converged due to CONVERGED_RTOL iterations 14
+ 20 SNES Function norm 0.0496041 
+    Linear solve converged due to CONVERGED_RTOL iterations 13
+ 21 SNES Function norm 0.0386158 
+    Linear solve converged due to CONVERGED_RTOL iterations 13
+ 22 SNES Function norm 0.0340579 
+    Linear solve converged due to CONVERGED_RTOL iterations 12
+ 23 SNES Function norm 0.0304921 
+    Linear solve converged due to CONVERGED_RTOL iterations 12
+ 24 SNES Function norm 0.0264418 
+    Linear solve converged due to CONVERGED_RTOL iterations 13
+ 25 SNES Function norm 0.0160981 
+    Linear solve converged due to CONVERGED_RTOL iterations 12
+ 26 SNES Function norm 0.0146566 
+    Linear solve converged due to CONVERGED_RTOL iterations 12
+ 27 SNES Function norm 0.0136091 
+    Linear solve converged due to CONVERGED_RTOL iterations 12
+ 28 SNES Function norm 0.0128454 
+    Linear solve converged due to CONVERGED_RTOL iterations 12
+ 29 SNES Function norm 0.0123047 
+    Linear solve converged due to CONVERGED_RTOL iterations 12
+ 30 SNES Function norm 0.0134276 
+    Linear solve converged due to CONVERGED_RTOL iterations 11
+ 31 SNES Function norm 0.0156118 
+    Linear solve converged due to CONVERGED_RTOL iterations 10
+ 32 SNES Function norm 0.00580062 
+    Linear solve converged due to CONVERGED_RTOL iterations 11
+ 33 SNES Function norm 0.0108986 
+    Linear solve converged due to CONVERGED_RTOL iterations 11
+ 34 SNES Function norm 0.00900118 
+    Linear solve converged due to CONVERGED_RTOL iterations 11
+ 35 SNES Function norm 0.00402106 
+    Linear solve converged due to CONVERGED_RTOL iterations 9
+ 36 SNES Function norm 0.00359493 
+    Linear solve converged due to CONVERGED_RTOL iterations 9
+ 37 SNES Function norm 0.00316284 
+    Linear solve converged due to CONVERGED_RTOL iterations 9
+ 38 SNES Function norm 0.00273642 
+    Linear solve converged due to CONVERGED_RTOL iterations 9
+ 39 SNES Function norm 0.00252167 
+    Linear solve converged due to CONVERGED_RTOL iterations 9
+ 40 SNES Function norm 0.000539772 
+    Linear solve converged due to CONVERGED_RTOL iterations 8
+ 41 SNES Function norm 2.7964e-05 
+    Linear solve converged due to CONVERGED_RTOL iterations 7
+ 42 SNES Function norm 4.05351e-06 
+    Linear solve converged due to CONVERGED_RTOL iterations 8
+ 43 SNES Function norm 1.28119e-07 
+    Linear solve converged due to CONVERGED_RTOL iterations 8
+ 44 SNES Function norm 4.3833e-09 
+    Linear solve converged due to CONVERGED_RTOL iterations 8
+ 45 SNES Function norm 5.236e-10 
+CONVERGED_FNORM_RELATIVE Number of nonlinear iterations = 45

File src/snes/examples/tutorials/output/ex15_lag_pc.out

+  0 SNES Function norm 0.199059 
+    Linear solve converged due to CONVERGED_RTOL iterations 18
+  1 SNES Function norm 0.179922 
+    Linear solve converged due to CONVERGED_RTOL iterations 25
+  2 SNES Function norm 0.162637 
+    Linear solve converged due to CONVERGED_RTOL iterations 30
+  3 SNES Function norm 0.146998 
+    Linear solve converged due to CONVERGED_RTOL iterations 44
+  4 SNES Function norm 0.119207 
+    Linear solve converged due to CONVERGED_RTOL iterations 54
+  5 SNES Function norm 0.107748 
+    Linear solve converged due to CONVERGED_RTOL iterations 15
+  6 SNES Function norm 0.0974011 
+    Linear solve converged due to CONVERGED_RTOL iterations 17
+  7 SNES Function norm 0.086917 
+    Linear solve converged due to CONVERGED_RTOL iterations 20
+  8 SNES Function norm 0.0759298 
+    Linear solve converged due to CONVERGED_RTOL iterations 22
+  9 SNES Function norm 0.0687975 
+    Linear solve converged due to CONVERGED_RTOL iterations 55
+ 10 SNES Function norm 0.0437129 
+    Linear solve converged due to CONVERGED_RTOL iterations 11
+ 11 SNES Function norm 0.0397578 
+    Linear solve converged due to CONVERGED_RTOL iterations 15
+ 12 SNES Function norm 0.0360321 
+    Linear solve converged due to CONVERGED_RTOL iterations 16
+ 13 SNES Function norm 0.0326618 
+    Linear solve converged due to CONVERGED_RTOL iterations 19
+ 14 SNES Function norm 0.0295729 
+    Linear solve converged due to CONVERGED_RTOL iterations 20
+ 15 SNES Function norm 0.0267688 
+    Linear solve converged due to CONVERGED_RTOL iterations 11
+ 16 SNES Function norm 0.0242518 
+    Linear solve converged due to CONVERGED_RTOL iterations 11
+ 17 SNES Function norm 0.0219583 
+    Linear solve converged due to CONVERGED_RTOL iterations 12
+ 18 SNES Function norm 0.0198356 
+    Linear solve converged due to CONVERGED_RTOL iterations 12
+ 19 SNES Function norm 0.0161677 
+    Linear solve converged due to CONVERGED_RTOL iterations 13
+ 20 SNES Function norm 0.00546152 
+    Linear solve converged due to CONVERGED_RTOL iterations 8
+ 21 SNES Function norm 0.00065697 
+    Linear solve converged due to CONVERGED_RTOL iterations 10
+ 22 SNES Function norm 2.13495e-05 
+    Linear solve converged due to CONVERGED_RTOL iterations 10
+ 23 SNES Function norm 2.38709e-08 
+    Linear solve converged due to CONVERGED_RTOL iterations 10
+ 24 SNES Function norm < 1.e-11
+CONVERGED_FNORM_RELATIVE Number of nonlinear iterations = 24