[Dune] Residual != 0

Alex Evanovic alex.evanovic at googlemail.com
Tue Oct 18 13:53:51 CEST 2011


Hi,

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.

*template<class GV>
void P1Elements<GV>::solve()
{
 *  // make linear operator from A*
    Dune::MatrixAdapter<Matrix,ScalarField,ScalarField> op(PoissonMatrix);
*
    // initialize preconditioner*
    Dune::SeqILUn<Matrix,ScalarField,ScalarField> ilu1(PoissonMatrix, 1,
0.92);
*
    // the inverse operator*
    Dune::BiCGSTABSolver<ScalarField> bcgs(op, ilu1, 1e-15, 5000, 0);
    Dune::InverseOperatorResult r;

*    // initialue u to some arbitrary value to avoid u being the exact
    // solution*
    u.resize(b.N(), false);
    u = 2.0;

        b *= -1.0;
    // finally solve the system
    bcgs.apply(u, b, r);

    //    A.solve(u,b);
*
Best,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20111018/4b1c889e/attachment.htm>


More information about the Dune mailing list