Evaluating the solution of FEM on the selected points


I solved the problem (curl-curl equations) using Nedelec basis functions and obtained a (number of edges x 1) solution as expected. For example, assume that, I have 1584 edges in total, after I convert FEM solution to numpy array, I obtained 1584x1 vector. Now, I want to calculate the value of the solution (FEM solution) on the selected points (for instance, quadrature points). In my case, I have 1024 triangles and 3 quadrature points per triangle, I have totally 3072 points. I want to calculat ethe value of the FEM solution on these points, I want to obtain (3072,1) solution matrix obtained from the selected points. How can I project my solution (edge-based Nedelec basis functions are used) selected points.

I read different question from the forum and tutorial but I think, my question is not answered because in my case, I cannot obtain the solution of (number of pointsx1) that I expected to obtain as a result of the solution matrix (number of edgesx1) and projection to the selected points in any of the explained methods. What approach should I take? Are there any functions or code blocks that I can use to do this?

Thank you very much for your help

Are you using legacy DOLFIN or DOLFINx?

With either code, you could interpolate your solution into a quadrature space, and then in turn tabulate the dof coordinates to get the quadrature points. Note that a nedelec function-space is a vector space, i.e. the basis is vector valued, by evaluating at a point you will get out a vector of size geometric dimension of the mesh per point.

Thank you, I am using Dolfinx.

Then interpolate into a quadrature space, use tabulate dof coordinates and access the underlying dof data from u_interpolated.x.array.