Skip to content

Improved handling of Gmsh mesh format reading #75

Open
@tcew

Description

@tcew

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions