Hi,<br><br>I am solving a Poisson problem using a DUNE solver. But, somehow the residual (A*x -b) is not tending to zero. I get residual values between 6.00 to 10.00. Could some one please suggest, if a change of preconditioner ll improve the results, so that A*x - b -> 0. Please find below the solver.<br>
<br><b>template<class GV><br>void P1Elements<GV>::solve()<br>{<br> </b> // make linear operator from A<b><br> Dune::MatrixAdapter<Matrix,ScalarField,ScalarField> op(PoissonMatrix);<br></b><br> // initialize preconditioner<b><br>
Dune::SeqILUn<Matrix,ScalarField,ScalarField> ilu1(PoissonMatrix, 1, 0.92);<br></b><br> // the inverse operator<b><br> Dune::BiCGSTABSolver<ScalarField> bcgs(op, ilu1, 1e-15, 5000, 0);<br> Dune::InverseOperatorResult r;<br>
<br></b> // initialue u to some arbitrary value to avoid u being the exact<br> // solution<b><br> u.resize(b.N(), false);<br> u = 2.0;<br><br> b *= -1.0;<br> // finally solve the system<br> bcgs.apply(u, b, r);<br>
<br> // A.solve(u,b);<br></b><br>Best,<br>Alex<br>