Re: [Libmesh-users] Getting access to gradients at node points From: Roy Stogner - 2008-09-29 00:15:48 ```On Sat, 27 Sep 2008, Derek Gaston wrote: > Now, for C1 continuous elements (such as Clough-Toucher's, > Hermite's, etc.) you should be able to get the value of the gradient > at the nodes pretty easily: it should be in your solution vector. > Obviously, I've never used these elements or I would know the answer > to that... maybe Roy could fill us in. Currently the C1 elements have degrees of freedom corresponding to x, y partial derivatives at vertex nodes, but they don't have any degrees of freedom which can give you the whole gradient at a second-order node. In general, the right way to get the well-defined gradient on a C1 node is the same way you'd get the cheapest O(h^p) gradient approximation on a C0 node: start from an adjoining element, and do a dof-weighted sum of its shape functions at that point. >> One way to get an answer (John suggested this to me once) is to >> compute the gradients at quadrature points and then do an L2 >> projection of that solution, and then just sample the projected >> solution at the nodes. > > Yep... this is what's calle "Gradient Recovery". There are several > methods for doing this... Yup. For instance: if you do just a sum (weighted by element size? angle? I forget) of the local gradients approaching a node on all elements touching that node, you do get an O(h^{p+1}) approximation that way. That's the first step to the popular Zienkiewicz-Zhu error estimator, and it may be good enough (and cheap enough) for whatever Nasser needs too. --- Roy ```