<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Sun, Sep 30, 2018 at 6:06 PM zakaryah <<a href="mailto:zakaryah@gmail.com">zakaryah@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><font color="#000000" face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)">OK, thanks.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)">I'm using a composite DM, DM_packer.  To make a separate KSP, I did the following in the FormJacobian() routine, after assembling the Jacobian matrix A and the RHS for the tangent vector, b:</font></div><div><ul><li><font color="#000000" face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)">KSPCreate(PETSC_COMM_WORLD,&ksp)</font></li><li><font color="#000000" face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)">KSPSetDM(ksp,DM_packer)</font></li><li><font color="#000000" face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)">KSPSetDMActive(ksp,PETSC_FALSE) - because I want to set the operators</font></li><li><font color="#000000" face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)">KSPSetOperators(ksp,A,P)</font></li><li><font color="#000000" face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)">VecSet(n,0) - set initial guess to zero</font></li><li><font color="#000000" face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)">KSPSolve(ksp,b,n) - this solve works correctly</font></li><li><font color="#000000" face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)">VecNormalize(n,NULL)</font></li><li><font color="#000000" face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)">MatNullSpaceCreate(PetscObjectComm((PetscObject)A),PETSC_FALSE,1,&n,&nullsp)</font></li><li><font color="#000000" face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)">MatSetNullSpace(A,nullsp)</font></li></ul></div><div><font color="#000000" face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)">Then, with -snes_type newtonls -pc_type none -ksp_monitor -ksp_monitor_true_residual -ksp_view, the output for the KSPSolve described above, i.e. for the tangent vector, looks correct:</font></div><div><span class="m_3181896160715294774gmail-s3" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><br></font></span></div><div><font face="arial, helvetica, sans-serif" color="#000000" style="background-color:rgb(255,255,255)"><span class="m_3181896160715294774gmail-s3" style="font-variant-ligatures:no-common-ligatures">  0 KSP</span><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures"> preconditioned resid norm 1.000000000000e+03 true resid norm 1.000000000000e+03 ||r(i)||/||b|| 1.000000000000e+00</span><br></font></div><div><font face="arial, helvetica, sans-serif" color="#000000" style="background-color:rgb(255,255,255)">...</font></div><div>





<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000">185 KSP preconditioned resid norm 9.900713131874e-03 true resid norm 9.900713131904e-03 ||r(i)||/||b|| 9.900713131904e-06</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000">Linear solve converged due to CONVERGED_RTOL iterations 185</font></span></p></div><div><font color="#000000" face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)"><br></font></div><div>





<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font color="#000000" face="arial, helvetica, sans-serif">KSP Object: 1 MPI processes</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span>type: gmres</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">    </span>restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">    </span>happy breakdown tolerance 1e-30</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span>maximum iterations=10000, initial guess is zero</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span>tolerances:<span class="m_3181896160715294774gmail-Apple-converted-space">  </span>relative=1e-05, absolute=1e-50, divergence=10000.</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span>left preconditioning</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span>using PRECONDITIONED norm type for convergence test</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000">PC Object: 1 MPI processes</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span>type: none</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span>linear system matrix = precond matrix:</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span>Mat Object: 1 MPI processes</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">    </span>type: seqaij</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">    </span>rows=78247, cols=78247</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">    </span>total: nonzeros=6063481, allocated nonzeros=6063481</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">    </span>total number of mallocs used during MatSetValues calls =0</font></span></p>
<p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">      </span>using I-node routines: found 26083 nodes, limit used is 5</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><br></font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000">But the next KSP, i.e. the one in the SNES, doesn't converge in the true residual:</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><br></font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000">





</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000">  0 KSP preconditioned resid norm 2.045599092896e-04 true resid norm 2.803828296212e-04 ||r(i)||/||b|| 1.000000000000e+00</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal">





</p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000">191 KSP preconditioned resid norm 2.009941278534e-09 true resid norm 1.636010142734e-04 ||r(i)||/||b|| 5.834915586465e-01</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><br></font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000">KSP Object: 1 MPI processes</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span>type: gmres</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">    </span>restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">    </span>happy breakdown tolerance 1e-30</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span>maximum iterations=10000, initial guess is zero</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span>tolerances:<span class="m_3181896160715294774gmail-Apple-converted-space">  </span>relative=1e-05, absolute=1e-50, divergence=10000.</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span>left preconditioning</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span>using PRECONDITIONED norm type for convergence test</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000">PC Object: 1 MPI processes</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span>type: none</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><font face="arial, helvetica, sans-serif" color="#000000" style="background-color:rgb(255,255,255)"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span></span><span class="m_3181896160715294774gmail-s2" style="font-variant-ligatures:no-common-ligatures">linear</span><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures"> system matrix = precond matrix:</span></font></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">  </span>Mat Object: 1 MPI processes</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">    </span>type: seqaij</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">    </span>rows=78247, cols=78247</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">    </span>total: nonzeros=6063481, allocated nonzeros=6063481</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">    </span>total number of mallocs used during MatSetValues calls =0</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">      </span>has attached null space</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000">






















</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><span class="m_3181896160715294774gmail-Apple-converted-space">      </span>using I-node routines: found 26083 nodes, limit used is 5</font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"><br></font></span></p><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000">My guess about what's going on is that the tangent vector n isn't really in the nullspace of A. </font></span></p></div></div></blockquote><div><br></div><div>I do not understand the rest, but this is the problem. Maybe it would make more sense if you wrote things</div><div>in linear algebraic notation.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><p class="m_3181896160715294774gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span class="m_3181896160715294774gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#000000"> Rather, it's in the nullspace of the m x (m+1) submatrix of A.  So, An=c e_{m+1}, where c is an arbitrary constant and e_{m+1} is the m+1 th basis vector.  The nonlinear function also has an added row, F_{m+1}, which is set to zero in the FormFunction() routine.  I don't care about the value of F_{m+1}, but I suppose that if it's included in the true residual, and NOT in the "preconditioned" residual, even with pc_type none, then it will be tricky to diagnose the performance.  Should I be using my own routine to evaluate the residual, so that F_{m+1} is not included?</font></span></p></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>