Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Safe MFEM Export #31

Closed
1 of 2 tasks
jzwar opened this issue Aug 15, 2022 · 3 comments
Closed
1 of 2 tasks

Safe MFEM Export #31

jzwar opened this issue Aug 15, 2022 · 3 comments

Comments

@jzwar
Copy link
Collaborator

jzwar commented Aug 15, 2022

MFEM export for multipatch systems

Using Bezman routins

In a current PR in bezman, MFEM export was restructured to only use corner vertices of the splines, and it provides functionality to identify the connectivity, the edge enumeration with identical knot vectors as well as boundary elements. The use of corner-vertices-only makes it available also for arbitrary spline types (which could be handed on the python side).

Problem with misalignment

Still, the MFEM export is not "safe", as is relies on some strong assumptions. MFEM export requires spline patches to be structured, i.e., neighboring elements need to be ordered in the same manner.
Example:

works:
3 --- 2 3 --- 2
|     | |     |
0-----1 0 --- 1
does not work (knot vectors in eta direction misaligned):
3 --- 2 1 --- 0
|     | |     |
0-----1 2 --- 3

This convention is arbitrary, as knotvectors can still be matching between two faces. Further, parametric axis can be arbitrarily changed within a spline. Starting from a random seed, we can propagate this information and permutate axis, which would allow the mfem export for all "structurable" spline patch systems.

Proposal

I would suggest solving this issue in two steps

  • Use bezman's ExtractMFEMInformation routine in splinepy. This could be a fast solution to make splinepy accessible for first tests
  • Implement permute functionality in splinepy and solve mfem export in two steps. If the routine succeeds in a first try, 🥳 if not, retrieve the connectivity from MFEM and use the permutation functions starting from a seed to structure mesh, let it fail if mesh non-restructurable... imo, restructuring is not super expensive, and should probably be done in python (changing and - if required - flipping knotvectors, reordering ctps).

The first step could be done very fast, the second one would be great for the next HACK DAYS ™️

@j042 I would love to hear your opinion on this...

This was referenced Aug 16, 2022
@j042
Copy link
Member

j042 commented Aug 25, 2022

Great

@j042
Copy link
Member

j042 commented Nov 23, 2022

any updates?

@j042
Copy link
Member

j042 commented Apr 24, 2023

isn't this fixed by now from mfem side?

@tataratat tataratat locked and limited conversation to collaborators Apr 24, 2023
@j042 j042 converted this issue into discussion #134 Apr 24, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants