[Dune] Residual != 0
Oliver Sander
sander at mi.fu-berlin.de
Tue Oct 18 13:57:15 CEST 2011
I think you may get into trouble if your initial solution doesn't contain
the correct Dirichlet entries. Have you tried that?
--
Oliver
Am 18.10.2011 13:53, schrietb Alex Evanovic:
> 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
>
>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
More information about the Dune
mailing list