I have a scalar field defined on the nodes of a mesh, and I need to
compute the tensor field of its gradient on the mesh's nodes.

(For now I use continuous elements, so the gradient is discontinuous at
the cells' borders, so what I want to compute is, on each node, the
average for all neighbor cells of the node of the gradient's projection
on the node. I may later use discontinuous elements, but I guess the
problems I have will still be there...)

I have tried to use the functions
compute_projection_from_quadrature_points_matrix and
compute_projection_from_quadrature_points.

Sorry for that not-so-smart question. Actually, the right way to do it seems to be the following: - \phi is the known scalar field for which I can compute the gradient on each integration point - w is the unknown vector field that is expressed on the nodes through w = N^t . W
 - the equation simply writes: w = \grad(\phi)
- taking its weak form and discretizing, one obtains W = M\Q where M = \int(N . N^t) and Q = \int(N . \grad(\phi))
Easy!

Martin.
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to