EXACTLY. However, it is not clear to me how can I store that value, so that in the next iteration I would be able to compare it with the current value at the q-point, and take the maximum between the two ,and then store that for the next iteration and so on.
On Tuesday, December 13, 2022 at 2:24:40 AM UTC+2 Wolfgang Bangerth wrote: > On 12/12/22 05:41, Abbas wrote: > > > > I am solving a vector problem similar to step-8. I have > > aVector<double> solution with u_x and u_y at each dof. I would like to > have > > another Vector<double> magnitude which stores the magnitude > \sqrt(u_x^2+u_y^2) > > at each dof. Now it is clear that solution has double the size of > magnitude. I > > need to extract the values of the magnitude vector for my weak form > within the > > assembly loop not for post-processing. > > > > Why do I need this? Well I don't actually want the magnitude exactly, > but what > > I need is the maximum value of my magnitude when I iterate in time. > > That sounds very much like you want to solve a nonlinear system -- for > which > step-15 shows you how to access this sort of information. > > The point to note regarding step-15, though, is that it never actually > creates > a vector that stores what in your case is the magnitude. That's because > the > magnitude you show above is not actually a finite element field even > though > u_x and u_y are: Even though the latter are bilinear functions (assuming > you > are using a Q1 element), the magnitude is not a binlinear function. As a > consequence, you don't want to compute it at each node and then > interpolate it > at quadrature points; rather, you want to compute it at each quadrature > point > from the original solutions u_x and u_y. > > Best > W. > > -- > ------------------------------------------------------------------------ > Wolfgang Bangerth email: [email protected] > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/4b56f1ca-2263-4aaf-a025-e1e2c71ad142n%40googlegroups.com.
