Please find below my solver, could some one please point out why the residuals are not going to zero? Is it because of bad conditioning of the matrix?<br><br><b>template<class GV><br>void P1Elements<GV>::solve_u_i()<br>
{<br> // make linear operator from A<br> Dune::MatrixAdapter<Matrix,ScalarField,ScalarField> op(ThomasFermiMatrix);<br><br> // initialize preconditioner<br> Dune::SeqILUn<Matrix,ScalarField,ScalarField> ilu2(ThomasFermiMatrix, 1, 0.92)<br>
<br> // the inverse operator<br> Dune::CGSolver<ScalarField> cg(op, ilu2, 1e-15, 5000, 2);<br> Dune::InverseOperatorResult r1;<br><br> // initialue u to some arbitrary value to avoid u being the exact <br>
// solution<br> u1.resize(b1.N(), false);<br> u1 = 0.0;<br><br> b1 *= -1.0;<br> // finally solve the system<br> cg.apply(u1, b1, r1);<br>} </b><br><br><div class="gmail_quote">On Sun, Nov 20, 2011 at 8:13 PM, S. Swayamjyoti <span dir="ltr"><<a href="mailto:swayam.151@gmail.com">swayam.151@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Dune,<br><br>I am solving a Ax = b system with the dune CG solver. I somehow find that, the residual is very high (order of 10^38) & not zero! I run the solver with verbosity 2, & I find that the "defect" of the system is also non-zero & of very high order (~ 10^40).<br>
<br>Can someone please tell me the reason?<br><br>Regards,<br>Swayam<br>
</blockquote></div><br>