Am Mittwoch, 24. Juli 2019 00:39:14 UTC+2 schrieb Daniel Arndt: > > 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. > Could you elaborate on that further (changing the diagonal value)?
> > Currently, you residual seems to depend linearly on u. In that case, the > difference does not depend on u at all. > I know, the equation is linear anyway, but was intended to be used as simple example. For further tests the non-linear equations will be used. > > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/12247d99-b2a8-4125-b98b-6e965e9f6f4d%40googlegroups.com.
