core icon indicating copy to clipboard operation
core copied to clipboard

Wrong vertex classification on a partitioned mesh starting from a gmsh generated mesh

Open zhangchonglin opened this issue 2 years ago • 4 comments

This may be related to issue #415.

For a simple partitioned mesh: rectangular domain with 4 mesh parts, the vertex classification on some mesh parts are incorrect. Below is a mesh part with wrong vertex classification. @cwsmith: do you have any idea what could be wrong? Thanks!

  • All non-boundary vertices in this mesh part are inside the domain, so they should be classified on the model face. This corresponds to a class_dim of 2.
  • But in the figure, many of the vertices have class_id=0.

Flatplate_vertex_class_dim_nparts=4

The procedures to generate the mesh partition file are as follows:

  • First start with a gmsh v4 mesh file .msh, and use from_gmsh tool to generate dmg and smb files:
from_gmsh none 2d_flatplate.msh 2d_flatplate-serial.smb 2d_flatplate.dmg
  • Next use print_pumipic_partition to generate the mesh partition with 4 mesh parts:
print_pumipic_partition 2d_flatplate.dmg 2d_flatplate-serial.smb 4 2d_flatplate

The gmsh mesh file is generated by doing the following:

location_of_gmsh/gmsh 2d_flatplate.geo -2

where the content of 2d_flatplate.geo is given below:

// points
Point(1) = {0, 0, 0, 0.02};
Point(2) = {1, 0, 0, 0.02};
Point(3) = {1, 0.8, 0, 0.02};
Point(4) = {0, 0.8, 0, 0.02};

// lines and circle
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
// define 1d geometry
Line Loop(1) = {4, 1, 2, 3};
// define 2d geometry
Plane Surface(1) = {1};

// define model
Physical Line("inlet") = {4};
Physical Line("outlet") = {2, 3};
Physical Line("wall") = {1};
Physical Surface("sim_domain") = {1};

// meshing the geometry
Mesh 2;

zhangchonglin avatar Feb 26 '24 21:02 zhangchonglin

@zhangchonglin Is the classification of the serial mesh created by from_gmsh correct?

cwsmith avatar Feb 27 '24 00:02 cwsmith

@cwsmith: the classification of the series mesh created by gmsh was correct. In that case, the gmsh mesh file .msh is directly read in.

zhangchonglin avatar Feb 27 '24 02:02 zhangchonglin

@zhangchonglin OK. Then the problem seems to be with print_pumipic_partition or something that happens afterwards.

cwsmith avatar Feb 27 '24 02:02 cwsmith

@cwsmith: I think that's probably is the case. Of all the 4 mesh parts, two of the mesh parts (same as the full mesh) have correct vertex classifications. See below for two mesh parts, where one has correct vertex classification, while the other has wrong vertex classification. mesh_ownership_class_dim

zhangchonglin avatar Feb 27 '24 03:02 zhangchonglin

  • The issue only happens when using bfs bfs buffer and safe methods;
  • When using full full buffer and safe methods, the classification looks fine.
  • This may suggest that the partition file is created properly, but when the mesh is read into omega_h and PUMIPic, some inconsistency happened when different buffer and safe methods are used.

zhangchonglin avatar Mar 25 '24 21:03 zhangchonglin

  • Additionally, with full bfs buffer and safe method, the classification looks fine.
  • This indeed suggests that the issue is not related to partition file and print_pumipic_partition.
  • It is likely related to mesh read in omega_h and PUMIPic.

Flatplate_owneship_vertex_class_dim_nparts=4

zhangchonglin avatar Mar 25 '24 21:03 zhangchonglin