<div dir="ltr">On Thu, Jan 31, 2013 at 12:31 PM, Alex Salazar <span dir="ltr"><<a href="mailto:alejandrocof@gmail.com" target="_blank">alejandrocof@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thanks Jed, sorry I new using Petsc.<br><br></div>I am runing my program with default options :<br>
<div>mpirun -np 1 ./a.out<br>runing the program with a few points (10) the interpolation is aceptable, <br>
<br>using the monitor options ie.<br>mpirun -np 1 ./a.out -ksp_converged_reason -ksp_monitor_true_residual<br>the output is the next<br> 0 KSP preconditioned resid norm 7.415666989515e+05 true resid norm 1.510533668194e+04 ||r(i)||/||b|| 1.000000000000e+00<br>
1 KSP preconditioned resid norm 4.935801698308e+02 true resid norm 1.721762948997e+01 ||r(i)||/||b|| 1.139837519183e-03<br> 2 KSP preconditioned resid norm 1.038493428107e-01 true resid norm 9.406615966569e+00 ||r(i)||/||b|| 6.227346112594e-04<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br><br></div><div>But if encrease the number of points to interpolate, the result is incorrect and the time of convergece encrease, the output in this case is: <br>
</div><div><br>.....<br>138 KSP preconditioned resid norm 4.897817095518e-06 true resid norm 5.455886375264e-08 ||r(i)||/||b|| 4.852601039969e-10<br>139 KSP preconditioned resid norm 3.535973415166e-06 true resid norm 3.717900878947e-08 ||r(i)||/||b|| 3.306793512687e-10<br>
140 KSP preconditioned resid norm 2.450794339359e-06 true resid norm 3.009597005096e-08 ||r(i)||/||b|| 2.676810430480e-10<br>Linear solve converged due to CONVERGED_RTOL iterations 140<br>[0] time (sec) 89.940000<br></div>
</div></blockquote><div><br></div><div style>You have an ill-conditioned system, so you will have to lower the tolerance. Also note that your</div><div style>preconditioner is a piece of crap.</div><div style><br></div><div style>
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><br>the code where the solution is implemented is the next:<br>
KSP ksp;<br>KSPCreate(PETSC_COMM_WORLD,&ksp);<br>KSPSetOperators(ksp,A,A,DIFFERENT_NONZERO_PATTERN);<br>KSPSetTolerances(ksp,1.e-5/(N+nt+1),1.e-50,PETSC_DEFAULT,PETSC_DEFAULT);<br>KSPSetFromOptions(ksp);<br>KSPSolve(ksp,b,x);<br>
<br></div><div>Let me know if you need another information. <br><br></div><div>Regard Alex <br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/1/31 Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>"result is incorrect" is not helpful. Please include diagnostics. Are you using an iterative or direct solver? Start here if you don't know what to check:</div>
<br><a href="http://scicomp.stackexchange.com/questions/513/why-is-my-iterative-linear-solver-not-converging" target="_blank">http://scicomp.stackexchange.com/questions/513/why-is-my-iterative-linear-solver-not-converging</a><div>
<div><br>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 31, 2013 at 9:58 AM, Alex Salazar <span dir="ltr"><<a href="mailto:alejandrocof@gmail.com" target="_blank">alejandrocof@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello, everyone <br><br>I want to get the solution of algrebraic system (with a dense zero-diagonal simetric matrix) of a interpolation problem (using radial basis functions) with Petsc.<br>
<br> For a few points (around 10 elements) using KSP I get the correct solution, however when I increase the number of points, the result is incorrect.<br>
<br>Any Idea ?<br><br>Regards Alejandro. <br><br></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>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>