On Fri, Jul 24, 2020 at 9:58 PM Wolfgang Bangerth <bange...@colostate.edu> wrote:

> On 7/23/20 12:07 PM, Xuefeng Li wrote: > > > > Well, the above function calculates the gradients of a finite element at > the > > quadrature points of a cell, not at the nodal points of a cell. > > Such a need arises in the following situation. > > > > for ( x in vector_of_nodal_points ) > > v(x) = g(x, u(x), grad u(x)) > > It's worth pointing out, however, that for the common FE_Q elements, the > function values u(x) are continuous and so it doesn't matter how exactly > you > compute u(x) at node points. On the other hand, grad u(x) is in general > discontinuous and so trying to evaluate it at node points is not actually > possible: You will either get the values from one adjacent cell or the > value > from another. > > In other words, if you want to compute a function that depends on 'grad > u', > you need to think about what exactly you mean by that. In the formulation > above, v(x) will in general be a discontinuous function, and you need to > think > about whether using FE_Q (a continuous finite element space) is really > what > you want to do. > > Best > W. > > Indeed, grad u would be discontinuous under normal conditions when u is approximated by FE_Q. I remember vaguely that such an issue was discussed in one or more of the tutorial Step examples. Thanks for your follow-up. -- Stay put, practice social distancing, and be safe! Best, --Xuefeng Li, (504)865-3340(phone) Like floating clouds, the heart rests easy Like flowing water, the spirit stays free Loyola University New Orleans New Orleans, Louisiana (504)865-2051(fax) -- 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/CAO2HPGW9tZ-U0mSuNYQcrzKGtnvg7mSoBA58svEL8DYEtfz%3DPQ%40mail.gmail.com.