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

Sacconi, Andrea a.sacconi11 at imperial.ac.uk
Tue May 27 13:26:59 CEST 2014


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 );

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




More information about the dune-fem mailing list