Maxi,

No, that code is the vmult-call I am using in my LinearOperator (and is
> used directly in my solve()-call). The calculate_residual()-function is
> similar to the function in step-15, with the difference, that I do not
> provide alpha, but the vector, and return the calculated residual value.
>

So this is where your cell loop currently lives and that can be represented
by a matrix-vector product. :-)


> Thus, as far as I could understand, I have to do the following in the
> matrix-free cell loop:
>
>    - Calculate residual of the current solution
>    - Calculate residual of the current solution + epsilon * src
>    - Calculate dst, and return it
>
> On the other hand, would it be sufficient to unroll the
> residual-calculation, i.e. if the residual is F(u) = nabla^2 u + f, to
> write (in the cell-loop): (nabla^2(u + eps*src) + f - nabla^2u -
> f)/epsilon? Or would that lead to wrong results?
>

It is sufficient to only change compute_diagonal() to use the MatrixFree
framework. Passing multiple vectors at once might be a little bit more
difficult to implement.

Currently, you residual seems to depend linearly on u. In that case, the
difference does not depend on u at all.

Best,
Daniel

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAOYDWb%2BCH%2BNRgR2_ni%2Bxm%3DE60JP-L255ie7etKCzKMhXH0qvBw%40mail.gmail.com.

Reply via email to