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

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

Merged
merged 186 commits into from
Feb 4, 2023

Conversation

cwsmith
Copy link
Contributor

@cwsmith cwsmith commented Dec 9, 2022

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,

  • mesh vertices classified on model regions are 3000000+the model region tag number given by parasolid or by the .dmg file (either from mdlConvert or boxModel) ,
  • mesh vertices classified on model faces are 2000000+the model face tag number ...,
  • mesh vertices classified on model edges are 1000000+ the model edge tag number ..., and
  • mesh vertices classified on model vertices are 0 + the model vertex tag number … .

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

KennethEJansen and others added 9 commits January 27, 2023 08:25
… pass. Note the bigger changes were in getting the bump version of MGEN to write in the new (modelDim)*1M+dmg_model_dim approach. Some retooling was necessary since the box model has 0 values for tags of all 4 dimensions so error flags had to move to -1.
@cwsmith
Copy link
Contributor Author

cwsmith commented Feb 1, 2023

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, ef72e44

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, ef72e44

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, ef72e44

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, ef72e44

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.SCOREC/pumi-meshes@14e53b8

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: SCOREC/pumi-meshes@4d1a3df

Likely OK. Need to manually check diff.

@cwsmith cwsmith marked this pull request as ready for review February 4, 2023 02:49
@cwsmith cwsmith merged commit e35b8d9 into develop Feb 4, 2023
@cwsmith cwsmith deleted the PRmatch2B branch February 4, 2023 19:25
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

Successfully merging this pull request may close these issues.

3 participants