[dune-fem] Possible bug in istlmatrixadapter.hh, in computing the residuum?

Sacconi, Andrea a.sacconi11 at imperial.ac.uk
Fri Sep 26 13:42:39 CEST 2014


Hi all,

I have a problem with the file istlmatrixadapter.hh. At some point, there is a method which computes the residuum (line 153 and following).
Here it is:

      virtual double residuum(const Y& rhs, X& x) const
      {
        X tmp (x);

        this->apply(x,tmp);
        tmp -= rhs;

        // return global sum of residuum 
        return scp_.norm(tmp);
      }

I think the first line is wrong ... I would put:

Y tmp (rhs);

because if X (domain type) and Y (range type) are two different types (which happens in my case, since I have a rectangular matrix), it is impossible to perform the "apply" method. In addition, you would not be able to subtract rhs from tmp, were they not of the same type. Am I correct?

Thanks for your help!
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