SCOREC / core

parallel finite element unstructured meshes
Other
182 stars 62 forks source link

matchedNodeElementReader and serial mesh support for > 2B entities #380

Closed cwsmith closed 1 year ago

cwsmith commented 1 year ago

mner, convert, and > 2B node mesh support

mner, previously matchedNodeElmReader, was initially designed to take a set of text files of connectivity, coordinates, vertex classification and optionally matching, fathers, and solution. At that time it implicitly assumed that the mesh was a box and called routine to create a .dmg box model. That original version of the code was therefore limited to meshes of a topological box. The aforementioned vertex classification used hard coded maps to relate one numbering of the .dmg box entities to the one created internally. mner also previously handled multi-topology by a monolithic, rectangular connectivity with repetition of the last element node for elements having less nodes than the maximum present. convert, previously converted a Simmetrix .sms mesh to a .smb MDS formatted mesh. For cases with more than 2B entities mner failed with address overflows.

In addition to addressing the >2B entities, this merge adds several features needed to support extrusions of arbitrary shape (Simmetrix->convert->MGEN->mner->chef) while preserving MATLAB-Boxes (MATLAB->MGEN (optionally to support unstructured boxes ->mner->chef)) workflows. We drew the other workflows in because the test cases needed to work with non-rectangular representations of multi-topology connectivities added with emerging CGNS file IO. As mner now handles arbitrary extruded models, the .dmg model that mner’s inputs are classified against must be created (e.g., mdlConvert or simTranslate, or other) and is now a required input to mner.

To make all this generality work, the vertex classification data that mner reads in was generalized to carry the tag and dimension of the model entity each mesh vertex is classified on e.g., modelDim*1000000+dmg_model_tag. So,

convert was previously enhanced to extract the coordinates and connectivity of the extrusion root. This allows other mesh extrusion programs to perform the extrusion and prepare inputs for mner. To make that process more general, in this merge, convert exports four extra columns beyond the usual x, y, coordinates in the .crd file. The third column is the dimension of the model entity the vertex at that x,y, is classified on (on the root). The fourth column is that root model tag number. The fifth column is the entity (d+1) that extrudes from that root model tag. Finally, the 6th column is the model tag of the entity terminating the extrusion. This information allows new entities created by an external meshing program carrying out the extrusion to be properly classified and written to the classification file that mner requires.

@KennethEJansen, @cwsmith

cwsmith commented 1 year ago

As of ~3231a65~ ~ea1f25f~ ~ef72e44~ ~622d8ac~ 8d9b08c, the following tests are failing using a build with simmetrix on and MDS_ID=int. Building with MDS_ID=long may produce different results...

<testCase, status=failing|fixed>

46:matchedNodeElementReader_p1, fixed

Update 2/3/2023 fixed with new inputs 8d9b08c

Inputs likely incorrect.

numVerts 350812                                                                                                                                                                                                                                                                 
0 readMatches numvtx 350812 localnumvtx 350812                                                                                                                                                                                                                                  
0 176133 8                                                                                                                                                                                                                                                                      
0 170556 6                                                                                                                                                                                                                                                                      
isMatched 1                                                                                                                                                                                                                                                                     
constructResidence: self=0,gid=0,ifirst=0                                                                                                                                                                                                                                       
constructResidence: self=0,gid=0,ifirst=0,max=350811                                                                                                                                                                                                                            
CR1 mysize=350812                                                                                                                                                                                                                                                               
CR5: self=0,myOffset=0,quotient=350812                                                                                                                                                                                                                                          
0 after residence                                                                                                                                                                                                                                                               
0 done inside remotes                                                                                                                                                                                                                                                           
setCoords int overflow of: self=0,mySize=350812,total=350812, n=350812,to=0, quotient=350812, remainder=0 start=0, peers=1, sizeToSend=8419488, nverts=350812
vertex failed at /space/cwsmith/pumiKenPrs/core/test/matchedNodeElmReader.cc + 71    

46:matchedNodeElementReader_p4, fixed

Update 2/1/2023 fixed with pumi-meshes @ 8ba7e95 and 472d8de

Need to update inputs. Only the serial case was updated.

98:embedded_edges, fixed

Update 2/1/2023 fixed with 65f661a

Cause of failure is not known.

mesh /space/cwsmith/core/pumi-meshes/embeddedEdges/edges-embedded-in-3D.smb loaded in 0.000920 seconds                                                          
number of tet 0 hex 0 prism 0 pyramid 0                                                                                                                         
mesh entity counts: v 280 e 385 f 0 r 0                                                                                                                         
APF warning: 1 empty parts                                                                                                                                      
1                                                                                                                                                               
false failed at /space/cwsmith/core/apf/apfConstruct.cc + 56        

6:bezierMesh, fixed

Update 2/1/2023 fixed, see commit message, https://github.com/SCOREC/core/pull/380/commits/ef72e440ab9eb6280dd5916344603c57b81ab594

Cause unknown. Could be problem with changes to mds buildBox or integer length to support > 2B ents.

mesh verified in 0.000035 seconds                                                                                                                               
mesh verified in 0.000021 seconds                                                                                                                               
  - verifying tags: coordinates_ver                                                                                                                             
mesh verified in 0.000030 seconds                                                                                                                               
mesh verified in 0.000020 seconds                                                                                                                               

MeshAdapt: Curved Adaptation Version 2.0 !                                                                                                                      
gmi failed: analytic reparam can't find topology path   

8:bezierRefine, fixed

Update 2/1/2023 fixed, see commit message, https://github.com/SCOREC/core/pull/380/commits/ef72e440ab9eb6280dd5916344603c57b81ab594

Cause unknown.

MeshAdapt: mesh adapted in 0.003184 seconds                                                                                                                     
number of triangle 14 quad 0                                                                                                                                    
mesh entity counts: v 11 e 24 f 14 r 0                                                                                                                          
std::fabs(v1-v0) < 0.05 failed at /space/cwsmith/core/test/bezierRefine.cc + 235             

9:bezierSubdivision, fixed

Update 2/1/2023 fixed, see commit message, https://github.com/SCOREC/core/pull/380/commits/ef72e440ab9eb6280dd5916344603c57b81ab594

Cause unknown.

mesh verified in 0.000036 seconds                                                                                                                               
mesh verified in 0.000014 seconds                                                                                                                               
  - verifying tags: coordinates_tet, coordinates_tri, coordinates_edg, coordinates_ver                                                                          
mesh verified in 0.000042 seconds                                                                                                                               
std::abs((ptOld-pt).getLength()) < 1e-15 failed at /space/cwsmith/core/test/bezierSubdivision.cc + 331   

10:bezierValidity, fixed

Update 2/1/2023 fixed, see commit message, https://github.com/SCOREC/core/pull/380/commits/ef72e440ab9eb6280dd5916344603c57b81ab594

Cause unknown.

mesh verified in 0.000061 seconds                                                                                                                               
validityTag == 1 failed at /space/cwsmith/core/test/bezierValidity.cc + 223              

28:chef-BL_query-diff, fixed

Update 2/1/2023 Ken confirmed new outputs are OK. Pushed to pumi-meshes repo.https://github.com/SCOREC/pumi-meshes/commit/14e53b82141b9fff475245e4e87824c17ab9b6a6

The diff of expected and 'new' geombc files fails. Ken is checking the generated phasta files. It could just be a difference caused by the increased int length to support > 2B ents.

31:convertExtrudedRoots_diff_crd, fixed

Update 2/1/2023 fixed with update to 'crd' file: https://github.com/SCOREC/pumi-meshes/commit/4d1a3df43eb9fcef65e2c8fef2a43e969d8fb7b0

Likely OK. Need to manually check diff.