[dune-fem] Strange initialisation of tolerance in CG stopping criterion

Andreas Dedner a.s.dedner at warwick.ac.uk
Tue May 27 14:25:12 CEST 2014


Well, generally speaking dune-fem solvers do not really include any 
preconditioning anyway (with the
exception of diagonal). They are included in the package as a "getting 
started" option that does not
involve other packages (petsc) or modules (dune-istl). Also they can be 
used as a template to implement
something more sophisticated. From that point of view the stopping 
criteria is also not very
sophisticated.... As Claus says it is a relative error that is checked
eps > | b^n-b | / |b| with b^n=Au^n.

I don't quite see why the sqrt worries you - the statement prints the 
Euclidean norm of the
residual so has to include the square root?

Andreas

On 27/05/14 13:16, Claus-Justus Heine wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Am 27.05.14 13:26, schrieb Sacconi, Andrea:
>> Hi Dune-Fem users,
>>
>> I would like to ask you a question about the implementation of the
>> Conjugate Gradient solver. In the file cginverseoperator.hh, line
>> 399, the tolerance for the stopping criterion based on the
>> residuum is set as:
>>
>> const RangeFieldType tolerance = (epsilon_ * epsilon_) *
>> b.scalarProductDofs( b );
> Well, this means epsilon is a relative tolerance. Why not. One might
> be tempted to say, however, that then the preconditioned scalar
> product should used, not the Euclidean one. Of course, after convergence
>
> b= Au, if u is the solution.
>
> But this means that  <b,b>=<Au, Au> is a strange quantity. Applying
> the approximate inverse of A (the preconditioner) would lead to
> something which whould be closer to the energy norm of the solution,
> i.e. maybe
>
> <b, precon(b)>\approx <Au,u>
>
> should be used instead. Or am I wrong here?
>
> Cheers,
>
> Claus
>
>> Why is the square of the norm of the RHS introduced here?
>> Shouldn't the tolerance be independent on the magnitude of the RHS?
>> In addition, the std::cerr is a bit misleading, since
>>
>> std::cerr << "CG-Iteration: " << realCount_ << ", sqr(Residuum): "
>> << residuum << std::endl;
>>
>> the sqaure of the residuum, and not the residuum itself, is
>> printed.
>>
>> Cheers, Andrea
>> __________________________________________________________
>>
>> Andrea Sacconi PhD student, Applied Mathematics AMMP Section,
>> Department of Mathematics, Imperial College London, London SW7
>> 2AZ, UK a.sacconi11 at imperial.ac.uk
>>
>> _______________________________________________ dune-fem mailing
>> list dune-fem at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune-fem
>>
>
>
> - -- 
> Dr. Claus-Justus Heine
> Institut für Angewandte Analysis und Simulation
> * Numerische Mathematik für Höchstleistungsrechner
> Universität Stuttgart
>
> Fon: +49 (0) 711 - 685 65558
> Fax: +49 (0) 711 - 685 65507
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBAgAGBQJThIIFAAoJEAbZWiFWzP01MlsP/3NIHJkduTzVgvnb+ysUmADP
> lsJnZz7ArrpYbSjClSah6lSSvA4DqMuEKfWbm/VqYvExUKnAsQjNEr03JpITmkvw
> ywFWOERFde/YAvNB3YR4hY+L/w+J6Pn86cbbmQK7xg1BOgXi4djZ53Q9VtLt88Yo
> F3b9hCf9qgYHBWwsgHW9rA4KySTYXQLcbM8C9Mb0Kgp9fPECMmqGBGOhJ0/t77uf
> DnKDTa7CWN/4redQW1rVFumjIWlWtzc8BcgqI1uPqIxu9UK1ZGhCBnrGicQXIEvG
> svA9KWQpTnUsjxtWpystupULWQjG/28wL0TFxnfLYNnphy0mrW3fYD5DyI9oZ46B
> 87GP9JnI0Xsf2Zyo1+iuTxexPmGiNkRXWJXv+APfMYNWQxI+E5KUMMmSYBBOJZtx
> wjD4FzUdPoMJPumxLDeEbKj49LNzI/17nJB41Ef96I6QW7wxNREkKWvPzPEn8Y/k
> bhLe00Q1E7hCteUeRewA59OLqGi+8NsWgl9OJ3ODhFP2DsIcq2qtU2fTP4UFl59M
> lmD6VQ6x3xTGAKrj0LkP89OFZlee63ur4GBvyOAgE5JBBhuv9tBu2O7oY/okycLp
> O2ZbuB/tGeRXAKtgt+eySCzEhQnWq2pC2xdqC3gBBeA+HUFBdN5NHkDdCTAEskdO
> wmbdj0ctiExQgP16YMoa
> =OE4S
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> dune-fem mailing list
> dune-fem at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-fem





More information about the dune-fem mailing list