From: John Peterson <jwpeterson@gm...>  20081211 19:43:03

I'll second what Derek said, but I'd also like to ask if you are doing some kind of gradient recovery at the nodal points of a C^0 finite element discretization? There was a discussion about this particular topic a couple days ago...  John On Thu, Dec 11, 2008 at 1:28 PM, Derek Gaston <friedmud@...> wrote: > MeshFunction can do this for you. Just initialize it with your > solution vector and then you can ask for the gradient at arbitrary > physical points. > > Now... just FYI.... if you just want to search you can use a > PointLocator class... which returns an Elem based on a physical point. > > Derek > > On Dec 11, 2008, at 12:15 PM, bkraczek wrote: > >> Hi. >> >> I'm looking for a way to obtain the gradient of my 3d FE solution at a >> specified point or points. I imagine this entails two parts, neither >> of >> which I know how to do: >> >> 1. Figure out which element a point lies inside >> 2. Determine the gradient of the basis functions inside that element. >> >> For the first part, if there is a way to do this already in the >> code, how >> do you go about it? If there isn't a way to do this already in the >> code, I >> think I could generate a way to do this from the coordinates of the >> nodes. >> How do I obtain these within a program? >> >> For the second part, once I know which element the point lies inside >> I need >> to calculate the gradient at that point. I was trying to figure out >> how to >> do this based on how dphi is calculated, but I cannot find where >> that is >> actually done in the code. I can find its declaration in fe_base.h, >> but not >> where it is calculated.  John 