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?<br><br>RESULTS:<br><br>E (w lagrange & self) E (w/o self) E_lagrange ||gradL|| ||gradLphi|| phi[atom_node] <b>Residual_phi_i</b> <br>
=== CGSolver<br> 16 1.212512273e-15<br>=== rate=0.1056936409, T=0, TIT=0, IT=16<br>55.13802707 -24.07287785 -2.788880238e-13 17.45594764 0.08484197512 -7.936744468 <b> 9.99848961</b><br>
<br>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);</b><br>