Plot N1Curl field

Hello community,

I am solving electromagnetic problem using edge elements (N1Curl function space of order 1).

My question is, Is it possible to plot the solution obtained (using external software like paraview)?

What have i tried so far:

  1. Tried to export the solution and geometry to xdmf file, which works fine in scalar case but fails using edge elements. Error: Only lagrange elements are supported, interpolate or project before exporting.
  2. L2 projection onto the Continuous Lagrange space of order 2, the issue is how can i visualize the orientation in this case?

Is it possible to also see the orientation of the field?

Thank you in advance

As the error message states, you should interpolate or project to a suitable Lagrange space.
For N1curl functions, continuous Lagrange is not a suitable space. One should use discontinuous Lagrange (preferably use interpolate rather than project, as it is way faster) and use a writer that supports arbitrary order continuous or discontinuous Lagrange, i.e VTXWriter or VTKFile.

i am not sure what you mean by orientation, do you mean the vectors? Then you can use the Glyph filter in paraview to look at the vectors.