Andrew, There are multiple ways to achieve this... But they are all variations on the same theme: you have to remember that your finite element "solution" is really nothing more than coefficients. These coefficients, when multiplied by their paired shape functions and added together are the actual solution.
It just so happens (well not really as they are chosen like that on purpose) that lagrange shape functions are interpolary at the nodes... ie at the nodes the value of the function you solved for happens to correspond to the value of the coefficient associated with the shape function there... these are the "nodal values" most people refer to. Note that that is just a property of those particular functions (and actually are how they are defined / derived). So how to get values at non nodal points when using lagrange (or any other shape functions)? You actually need to evaluate your TRUE solution... that is: the coefficients multiplied by the shape functions. With normal finite element formulations that use shape functions with compact support this amounts to finding the element that contains the physical point you want to evaluate the solution at... then summing the local coefficients multiplied by their respective shape functions evaluated at the physical point. Specifically, in libmesh this can be accomplished by looping over the elements, calling contains_point() on each element then when you have found the element containing the point you need to reinitialize an FE object using that element and the physical point inverse mapped into the reference domain... that will give you your shape functions evaluated at the physical point... Now loop over the dofs on that element and multiply the coefficients from the solution vector by each associated shape function... and sum the results. That will be the value of the solution at that point. Firstly, this is NOT interpolation! This is EVALUATION. This is one of the large differences between finite elements and other discretization techniques (like finite difference and finite volume). In finite elements you are literally solving for a _function_ that covers the entire domain. In continuous galerkin (like you are probably using with lagrange shape functions) that function is even _continuous_ over the entire domain! Secondly... If this sounds like a lot of work.... It kind of is. That's why the MeshFunction object exists... Just initialize it with your solution and EquationSystems and it will do all of the above for you... Allowing you to evaluate your solution at any point in the domain (with some more efficiency than if you tried to do it yourself). Hope that helps! Derek Sent from my iPad On Aug 18, 2010, at 6:59 PM, Andrew Wharmby <[email protected]> wrote: > I've read some discussion these boards on how to go about doing this, but > didn't find any real concrete answer. Is there an easy way of after running > a model, to go back and use the interpolation functions used to approximate > the nodal values to approximate points between the nodes? > > Thanks, > _Andrew_ > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > Libmesh-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/libmesh-users ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
