John Peterson wrote: > On Fri, Apr 2, 2010 at 11:01 PM, Karen Lee <[email protected]> wrote: >> Dear all, >> >> I'm wondering if anyone knows how I might calculate the gradient of my >> solution (an electric potential) in 3D. Basically I would like to have the >> electric field vector associated at the nodes for which I have the potential >> value... Does anyone know how I might do that? Either doing that with the >> output I already have or doing it in the solver itself would be awesome. The >> potential was obtained from a Poisson's equation. > > Check out one of the nonlinear examples like ex13. For each element > we need to recompute the velocity gradient from the old timestep and > current Newton step, and we do it by looping over the element dofs and > adding up the contributions > > grad_u = sum_i u_i dphi_i > > In the examples this is done at interior (Gauss) quadrature points but > you could follow the same procedure using a nodal quadrature rule > instead.
For more details on this you could look up the thread on libmesh-users with subject line "Getting access to gradients at node points", from 2008-09-27 in the mailing list archives. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
