[petsc-users] [DMMG] Stokes Solver

domenico.borzacchiello at univ-st-etienne.fr domenico.borzacchiello at univ-st-etienne.fr
Fri Apr 8 07:28:50 CDT 2011


> The direct solver should also converge in one iteration. Are you only
> assembling an approximation of the Jacobian (e.g. using
> -snes_mf_operator)?
> If using MFFD, is the system poorly scaled such that the step size is very
> low accuracy (maybe try -mat_mffd_type ds)? Are the equations singular? Is
> both the Jacobian and residual evaluation correct?

Apparently the equations were singular. I modified the equations
describing the Outflow BC by explicitly writing the open boundary
condition -mu*(dw/dz)+p=0 (instead of including it in the momentum
equation as I was doing before) and the linear solver is now converging
within 1 iteration, snes is still diverging though.

  0 SNES Function norm 7.128085632250e+00
Linear solve converged due to CONVERGED_RTOL iterations 1
  1 SNES Function norm 7.068552744365e+00
Linear solve converged due to CONVERGED_RTOL iterations 1
  2 SNES Function norm 7.068535930605e+00
Linear solve converged due to CONVERGED_RTOL iterations 1
  3 SNES Function norm 7.068535930605e+00
Linear solve converged due to CONVERGED_RTOL iterations 1
.
. (some mumps output here)
.
Number of Newton iterations = 3
Number of Linear iterations = 4
Average Linear its / Newton = 1.333333e+00
Converged Reason = -6

if I run it with -snes_type tr instead I get
  0 SNES Function norm 7.128085632250e+00
Linear solve converged due to CONVERGED_STEP_LENGTH iterations 1
  1 SNES Function norm 7.081751494639e+00
Linear solve converged due to CONVERGED_STEP_LENGTH iterations 1
  2 SNES Function norm 7.068482944794e+00
Linear solve converged due to CONVERGED_STEP_LENGTH iterations 1
  3 SNES Function norm 7.067980457052e+00
Linear solve converged due to CONVERGED_STEP_LENGTH iterations 1
  4 SNES Function norm 7.067979237888e+00
Linear solve converged due to CONVERGED_STEP_LENGTH iterations 1
  5 SNES Function norm 7.067979237888e+00
.
.
.
Number of Newton iterations = 4
Number of Linear iterations = 5
Average Linear its / Newton = 1.250000e+00
Converged Reason = 4


I don't define the Jacobian myself I'm just calling
 DMMGSetSNESLocal(dmmg,FormFunctionLocal,0,0,0)

I Assumed that the FD evaluation of Jacobian would be exact since the the
Function is linear.



More information about the petsc-users mailing list