1. petsc
  2. PETSc
  3. petsc

Commits

BarryFSmith  committed e0d133f

added -snes_ksp_ew to test suite

Hg-commit: ed1cc08344adfceaeae9cf9283ec46ed229d434d

  • Participants
  • Parent commits 88790e0
  • Branches master

Comments (0)

Files changed (5)

File include/petsc-private/snesimpl.h

View file
  • Ignore whitespace
 PETSC_INTERN PetscErrorCode SNESVISetVariableBounds_VI(SNES,Vec,Vec);
 PETSC_INTERN PetscErrorCode SNESConvergedDefault_VI(SNES,PetscInt,PetscReal,PetscReal,PetscReal,SNESConvergedReason*,void*);
 
-PetscErrorCode SNES_KSPSolve(SNES,KSP,Vec,Vec);
+PETSC_EXTERN PetscErrorCode SNES_KSPSolve(SNES,KSP,Vec,Vec);
 PetscErrorCode SNESScaleStep_Private(SNES,Vec,PetscReal*,PetscReal*,PetscReal*,PetscReal*);
 
 PETSC_EXTERN PetscLogEvent SNES_Solve, SNES_LineSearch, SNES_FunctionEval, SNES_JacobianEval, SNES_GSEval, SNES_NPCSolve;

File src/snes/examples/tutorials/makefile

View file
  • Ignore whitespace
 	   else echo ${PWD} ; echo "Possible problem with with ex46, diffs above \n========================================="; fi; \
 	   ${RM} -f ex46.tmp
 
+runex46_ew_1:
+	-@${MPIEXEC} -n 1 ./ex46 -snes_monitor_short -ksp_converged_reason -da_grid_x 20 -da_grid_y 20 -snes_ksp_ew -snes_ksp_ew_version 1   > ex46.tmp 2>&1; \
+	   if (${DIFF} output/ex46_ew_1.out ex46.tmp) then true; \
+	   else echo ${PWD} ; echo "Possible problem with with ex46_ew_1, diffs above \n========================================="; fi; \
+	   ${RM} -f ex46.tmp
+
+
+runex46_ew_2:
+	-@${MPIEXEC} -n 1 ./ex46 -snes_monitor_short -ksp_converged_reason -da_grid_x 20 -da_grid_y 20 -snes_ksp_ew -snes_ksp_ew_version 2   > ex46.tmp 2>&1; \
+	   if (${DIFF} output/ex46_ew_2.out ex46.tmp) then true; \
+	   else echo ${PWD} ; echo "Possible problem with with ex46_ew_2, diffs above \n========================================="; fi; \
+	   ${RM} -f ex46.tmp
+
+
+runex46_ew_3:
+	-@${MPIEXEC} -n 1 ./ex46 -snes_monitor_short -ksp_converged_reason -da_grid_x 20 -da_grid_y 20 -snes_ksp_ew -snes_ksp_ew_version 3   > ex46.tmp 2>&1; \
+	   if (${DIFF} output/ex46_ew_3.out ex46.tmp) then true; \
+	   else echo ${PWD} ; echo "Possible problem with with ex46_ew_3, diffs above \n========================================="; fi; \
+	   ${RM} -f ex46.tmp
+
 runex47cu:
 	-@${MPIEXEC} -n 1 ./ex47cu -snes_monitor_short -dm_vec_type cusp  > ex47cu_1.tmp 2>&1;	  \
 	   if (${DIFF} output/ex47cu_1.out ex47cu_1.tmp) then true; \
                                  ex28.PETSc runex28_0 runex28_1 runex28_2 runex28_3 ex28.rm \
                                  ex35.PETSc runex35 runex35_2 runex35_3 runex35_4 runex35_5 runex35_6 runex35_7 runex35_8 ex35.rm \
                                  ex42.PETSc runex42 ex42.rm \
-                                 ex46.PETSc runex46 ex46.rm \
+                                 ex46.PETSc runex46 runex46_ew_1 runex46_ew_2 runex46_ew_3 ex46.rm \
                                  ex48.PETSc runex48 runex48_2 runex48_3 runex48_4 runex48_5 ex48.rm \
                                  ex58.PETSc runex58 runex58_2 ex58.rm
 TESTEXAMPLES_C_X	       = ex1.PETSc runex1_X ex1.rm ex19.PETSc runex19_draw ex19.rm

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

View file
  • Ignore whitespace
+  0 SNES Function norm 0.0534501 
+  Linear solve converged due to CONVERGED_RTOL iterations 3
+  1 SNES Function norm 0.0222185 
+  Linear solve converged due to CONVERGED_RTOL iterations 5
+  2 SNES Function norm 0.00162269 
+  Linear solve converged due to CONVERGED_RTOL iterations 11
+  3 SNES Function norm 4.75823e-07 
+  Linear solve converged due to CONVERGED_RTOL iterations 14
+  4 SNES Function norm < 1.e-11
+Number of SNES iterations = 4

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

View file
  • Ignore whitespace
+  0 SNES Function norm 0.0534501 
+  Linear solve converged due to CONVERGED_RTOL iterations 3
+  1 SNES Function norm 0.0222185 
+  Linear solve converged due to CONVERGED_RTOL iterations 4
+  2 SNES Function norm 0.00406224 
+  Linear solve converged due to CONVERGED_RTOL iterations 5
+  3 SNES Function norm 0.000288208 
+  Linear solve converged due to CONVERGED_RTOL iterations 8
+  4 SNES Function norm 2.12031e-06 
+  Linear solve converged due to CONVERGED_RTOL iterations 12
+  5 SNES Function norm 3.162e-10 
+Number of SNES iterations = 5

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

View file
  • Ignore whitespace
+  0 SNES Function norm 0.0534501 
+  Linear solve converged due to CONVERGED_RTOL iterations 3
+  1 SNES Function norm 0.0222185 
+  Linear solve converged due to CONVERGED_RTOL iterations 4
+  2 SNES Function norm 0.00406224 
+  Linear solve converged due to CONVERGED_RTOL iterations 5
+  3 SNES Function norm 0.000288208 
+  Linear solve converged due to CONVERGED_RTOL iterations 7
+  4 SNES Function norm 9.58257e-06 
+  Linear solve converged due to CONVERGED_RTOL iterations 9
+  5 SNES Function norm 2.73503e-08 
+  Linear solve converged due to CONVERGED_RTOL iterations 6
+  6 SNES Function norm 3.401e-10 
+Number of SNES iterations = 6