On 11/19/18 1:18 AM, 'Maxi Miller' via deal.II User Group wrote: > I would like to implement Broyden's method, to speed up the assembly of the > jacobian when solving a nonlinear system, which results in an equation > containing the difference of the residual, the difference of the solution and > the current jacobian matrix, i.e. > J_{n+1}=J_n+\frac{\Delta f_n-J_n\Delta x_n}{\vert\vert \Delta > x_n\vert\vert^2}\Delta x_n^T > Now I am not entirely sure how to implement that into the code, especially > the > matrix creation due to the multiplication of a row- and a column-vector, such > that I get the same structure as the original jacobian matrix. If I > understand > it correctly I can use the same approach as shown in the matrix-free methods, > f.ex. step-37, where I create the elements cell-wise, and distribute them > afterwards. Is that correct, or are there better ways to implement Broyden's > method?
You don't actually generate the matrix. Instead, you store the two types of vectors and represent the matrix only through its *action*, not by computing and storing its elements. That's because the outer product of two dense vectors is in general a dense matrix. In other words, you'll have to implement a class that stores these vectors and implements a vmult function. Best W. -- ------------------------------------------------------------------------ Wolfgang Bangerth email: bange...@colostate.edu www: http://www.math.colostate.edu/~bangerth/ -- 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. For more options, visit https://groups.google.com/d/optout.