Hi people,<br><br>thank you very much for the help. I couldn't fix the problem though...<br><br>Matthew:<br><br>1) I guess so because for the vast majority of the tests carried out, the method converges and you can actually observe norm(F(x)) decreasing with few Newton iterations. For example:<br>
<br>$ mpirun -np 2 ./bratu_problem -N 16 -M 16 -P 16 -ksp_converged_reason -snes_converged_reason -ksp_type lcd -pc_type jacobi -ksp_monitor<br><br> 0 KSP Residual norm 5.960419091967e-01<br> 1 KSP Residual norm 1.235318806330e+00<br>
(...)<br>Linear solve converged due to CONVERGED_RTOL iterations 56<br> 0 KSP Residual norm 2.990541631546e-02<br> 1 KSP Residual norm 1.332572441021e-02<br>(...)<br> 29 KSP Residual norm 3.225505605549e-07<br> 30 KSP Residual norm 1.658059885118e-07<br>
Linear solve converged due to CONVERGED_RTOL iterations 30<br> 0 KSP Residual norm 7.629434752036e-05<br> 1 KSP Residual norm 1.413056976255e-05<br>(...)<br> 21 KSP Residual norm 1.183900079277e-09<br> 22 KSP Residual norm 6.010910804534e-10<br>
<br>Linear solve converged due to CONVERGED_RTOL iterations 22<br>Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE<br><br>2) The governing PDE is -Laplacian(u) + d * u_x -lambda * exp(u) = 0 and u = 0 in all domain boundaries. u_x stands for the partial derivative of u with respect to the x variable, where u = u(x, y, z). For all the tests I made, d = 16 and lambda = 32. I tried setting d = 0, but the error continued.<br>
<br>Barry:<br><br>Consider<br><br>$ mpirun -np 8 ./bratu_problem -x 16 -y 16 -z 16 -ksp_converged_reason -snes_converged_reason -ksp_type lcd -pc_type jacobi -ksp_monitor<br><br>Here's the output:<br><br> 0 KSP Residual norm 5.960419091967e-01<br>
1 KSP Residual norm 1.235318806330e+00<br>(...)<br> 55 KSP Residual norm 7.533575286046e-06<br> 56 KSP Residual norm 4.924747432423e-06<br>Linear solve converged due to CONVERGED_RTOL iterations 56<br> 0 KSP Residual norm 5.899667305071e-01<br>
1 KSP Residual norm 1.233037780509e+00<br>(...)<br> 56 KSP Residual norm 9.299650766487e-06<br> 57 KSP Residual norm 5.541388445894e-06<br>Linear solve converged due to CONVERGED_RTOL iterations 57<br> 0 KSP Residual norm 5.898541843665e-01<br>
1 KSP Residual norm 1.230515227262e+00<br>(...)<br> 57 KSP Residual norm 6.065473514455e-06<br> 58 KSP Residual norm 3.255910272791e-06<br><br>Linear solve converged due to CONVERGED_RTOL iterations 58<br>Nonlinear solve did not converge due to DIVERGED_LS_FAILURE<br>
<br>Now, if I use
-ksp_rtol 1.e-10, same thing occurs, the only difference is that the number of linear iterations per nonlinear iteration gets bigger (as one might have expected).<br><br>I'm using the classic 7-point stencil finite difference approximation to discretize the PDE...<br>
<br>