[Dune] Residual != 0

Alex Evanovic alex.evanovic at googlemail.com
Wed Oct 19 10:34:10 CEST 2011


Hi, I set the verbosity level to true & I see that it calculates till pow
(10, -15). But, when i calculate the residual as A*x - b, I do not get
residual as 0. Could some one please help?

RESULTS:

E (w lagrange & self)    E (w/o self)                  E_lagrange
       ||gradL||                   ||gradLphi||
phi[atom_node]        *Residual_phi_i*
=== CGSolver
   16  1.212512273e-15
=== rate=0.1056936409, T=0, TIT=0, IT=16
55.13802707            -24.07287785            -2.788880238e-13
17.45594764            0.08484197512            -7.936744468
*9.99848961
*

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);*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20111019/4edabde0/attachment.htm>


More information about the Dune mailing list