Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for integral finite elements #280

Merged
merged 9 commits into from
Jul 17, 2024
Merged

Support for integral finite elements #280

merged 9 commits into from
Jul 17, 2024

Conversation

najlkin
Copy link
Contributor

@najlkin najlkin commented May 23, 2024

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

Status:

  • Fixed the crash for scalar grid functions (by turning off normals)
  • Compute normals for smooth surface visualization (approximated by value-based FEs)
  • Adjust the refinement to respect mesh curvature -> Higher auto-refinement limits #285
  • Vector grid functions in 2D (No smooth visualization of vector fields in 2D 😞 )
  • Vector grid functions in 3D (No smooth visualization with value-based displacement 😞 )

@tzanio tzanio mentioned this pull request Jun 19, 2024
22 tasks
@najlkin najlkin changed the title [WIP] Support for integral finite elements Support for integral finite elements Jul 8, 2024
@tzanio
Copy link
Member

tzanio commented Jul 8, 2024

Mention in CHANGELOG?

Copy link
Contributor

@termi-official termi-official left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?
  2. 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.

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

lib/vssolution.cpp Outdated Show resolved Hide resolved
lib/vssolution3d.cpp Outdated Show resolved Hide resolved
@najlkin
Copy link
Contributor Author

najlkin commented Jul 9, 2024

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 😉). 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.

Copy link
Contributor

@termi-official termi-official left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for elaborating @najlkin and also thanks for working on this!

Copy link
Member

@tzanio tzanio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding this, @najlkin!

@tzanio tzanio merged commit 5e14977 into master Jul 17, 2024
2 of 10 checks passed
@tzanio tzanio deleted the integ-elem-dev branch July 17, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants