GLVis / glvis

Lightweight OpenGL tool for accurate and flexible finite element visualization
http://glvis.org
BSD 3-Clause "New" or "Revised" License
263 stars 53 forks source link

Support for integral finite elements #280

Closed najlkin closed 4 months ago

najlkin commented 6 months ago

This PR adds support for integral finite elements, which were loaded, but crashed GLVis 💣 .

Status:

tzanio commented 4 months ago

Mention in CHANGELOG?

najlkin commented 4 months ago

Two questions left from my side (beside the comments).

  1. H(div) and H(curl) elements can be interpreted as integral elements. I assume they still crash on this branch. Can we add meaningful error messages for these?

H(div) and H(curl) are vector finite elements, so they are visualized as vector fields by a completely different object. Unfortunately, GLVis does not have smooth (i.e. interpolated normals) visualization of any vector fields, as I mentioned in #284 .

  1. Can add some comment on the local projection (in the code)? For me it is not really obvious why this is the correct way to handle the visualization.

I added a little comment, but it is really simple. The point value of integral elements is the DOF value divided by the Jacobian, see MapType documentation.

Furthermore, is there some way to add a simple regression test on this?

Regression testing is poor in GLVis, it only checks against saved streams from runs of example codes. It does not cover a great fraction of the options. I have proposed to improve it, but it does not have a priority (but if you want to take it, go for it :wink:). Anyway, it is a different repo, so it even cannot be added here, and also we do not have examples with integral elements, I think.