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

Improved handling of Gmsh mesh format reading #75

Open
tcew opened this issue Dec 24, 2021 · 1 comment
Open

Improved handling of Gmsh mesh format reading #75

tcew opened this issue Dec 24, 2021 · 1 comment

Comments

@tcew
Copy link
Contributor

tcew commented Dec 24, 2021

Issue: User provided msh file not properly read by meshParallelReaderQuad2D

Details: To explain this, the boundary faces in the msh file are given for instance by
5 1 2 0 1 1 5
6 1 2 0 1 5 6
7 1 2 0 1 6 7
8 1 2 0 1 7 8

We check to see the element type from the second column

   sscanf(buf, "%*d%d", &ElementType);

    if(ElementType==1){ // boundary face                                                                                                                                                                                             
      sscanf(buf, "%*d%*d %*d" hlongFormat "%*d" hlongFormat hlongFormat,
             boundaryInfo+bcnt*3, &v1, &v2);
      boundaryInfo[bcnt*3+1] = v1-1;
      boundaryInfo[bcnt*3+2] = v2-1;
      ++bcnt;
    }

We ignore the "2" column, which is the number of tags associated with the edge, which is a strong assumption.

In this case we read the tag from the wrong place (the zero) instead of the one. I am not sure how to fix this given that the format is somehow different but the same.

@nnnunnn
Copy link

nnnunnn commented Dec 25, 2021

Issue: User provided msh file not properly read by meshParallelReaderQuad2D

I'll explore. Please send or link the offending file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants