lehrfempp icon indicating copy to clipboard operation
lehrfempp copied to clipboard

Adapt `lf::io` to support higher order polynomials

Open craffael opened this issue 6 years ago • 3 comments
trafficstars

At the moment the function write_tikz outputs nodes of the mesh and connects them with straight line segments (codim=1 entities). I propose to add another option to WriteTikz named TikzOutputControl::SecondOrder which will connect the nodes using parabolas.

This functionality is mainly interesting for Geometry Elements that use second order (or higher) geometry approximation in which case the trias/quads can be represented exactly. But Implementing this functionality is not trivial because the Geometry interface doesn't provide us with the parametrization of the parabola directly. I propose to solve this problem as follows:

For every edge connecting two nodes we evaluate the edge geometry element at three points: at the two endpoints and at the point in the middle (average of the endpoints). We then construct a parabola that goes through these three points and give this parametrization to tikz.

craffael avatar Mar 03 '19 16:03 craffael

I will implement the same functionality for lf::io::writeMatplotlib. As I am not very well versed in MATLAB, I think it would be easier if you extend lf::io::writeMatlab @hiptmair. What do you think?

anianruoss avatar Mar 03 '19 17:03 anianruoss

I will take care of the MATLAB visualization tool, but only in the near future, because it will be an afternoon's work to implement and test everything.

hiptmair avatar Mar 03 '19 21:03 hiptmair

I have seen that Paraview supports up to order 10 lagrangian elements since about a year. I will update the VTKWriter accordingly.

craffael avatar Mar 07 '19 22:03 craffael