Skip to content

Read connectivity of elements and index them #40

@ashwinvis

Description

@ashwinvis

Options

In the order of increasing complexity...

  • Reader for ma2 files?
  • Third party library networkx / trimesh, ... ?
  • Native genmap reader / cffi interface?

ma2 files structure

See subroutine dmp_mapfile (pmap,nel,depth,cell,nv,nrnk,npts,noutflow) in Nek5000/tools/genmap/genmap.f and the header of the ma2 file corresponding to:

$ strings abl.ma2
#v001         392         490           8         256        3136         490           0       
                                    
$ xxd -b abl.ma2 | less
00000000: 00100011 01110110 00110000 00110000 00110001 00100000  #v001 
00000006: 00100000 00100000 00100000 00100000 00100000 00100000        
0000000c: 00100000 00100000 00110011 00111001 00110010 00100000    392 
00000012: 00100000 00100000 00100000 00100000 00100000 00100000        
00000018: 00100000 00100000 00110100 00111001 00110000 00100000    490 
0000001e: 00100000 00100000 00100000 00100000 00100000 00100000        
00000024: 00100000 00100000 00100000 00100000 00111000 00100000      8 
0000002a: 00100000 00100000 00100000 00100000 00100000 00100000        
00000030: 00100000 00100000 00110010 00110101 00110110 00100000    256 
00000036: 00100000 00100000 00100000 00100000 00100000 00100000        
0000003c: 00100000 00110011 00110001 00110011 00110110 00100000   3136 
00000042: 00100000 00100000 00100000 00100000 00100000 00100000        
00000048: 00100000 00100000 00110100 00111001 00110000 00100000    490 
0000004e: 00100000 00100000 00100000 00100000 00100000 00100000        
00000054: 00100000 00100000 00100000 00100000 00110000 00100000      0 
0000005a: 00100000 00100000 00100000 00100000 00100000 00100000        
00000060: 00100000 00100000 00100000 00100000 00100000 00100000        
00000066: 00100000 00100000 00100000 00100000 00100000 00100000        
0000006c: 00100000 00100000 00100000 00100000 00100000 00100000        
00000072: 00100000 00100000 00100000 00100000 00100000 00100000        
00000078: 00100000 00100000 00100000 00100000 00100000 00100000        
0000007e: 00100000 00100000 00100000 00100000 00100000 00100000        
00000084: 11111010 01100001 11010001 01000000 11000101 00000000  .a.@..
0000008a: 00000000 00000000 10001000 00000001 00000000 00000000  ......
00000090: 00110101 00000001 00000000 00000000 10000111 00000001  5.....
00000096: 00000000 00000000 00110100 00000001 00000000 00000000  ..4...
0000009c: 10000110 00000001 00000000 00000000 00110011 00000001  ....3.
000000a2: 00000000 00000000 10000101 00000001 00000000 00000000  ......
000000a8: 00110001 00000001 00000000 00000000 11010111 00000000  1.....
000000ae: 00000000 00000000 00110101 00000001 00000000 00000000  ..5...
000000b4: 00100101 00000001 00000000 00000000 00110100 00000001  %...4.
000000ba: 00000000 00000000 00100100 00000001 00000000 00000000  ..$...
000000c0: 00110011 00000001 00000000 00000000 00110010 00000001  3...2.
000000c6: 00000000 00000000 00110001 00000001 00000000 00000000  ..1...
000000cc: 00110000 00000001 00000000 00000000 11010111 00000000  0.....
000000d2: 00000000 00000000 00100101 00000001 00000000 00000000  ..%...
000000d8: 01101100 00000001 00000000 00000000 00100100 00000001  l...$.
000000de: 00000000 00000000 01101010 00000001 00000000 00000000  ..j...
000000e4: 00110010 00000001 00000000 00000000 01101000 00000001  2...h.
000000ea: 00000000 00000000 00110000 00000001 00000000 00000000  ..0...
000000f0: 01100110 00000001 00000000 00000000 11111011 00000000  f.....
000000f6: 00000000 00000000 01101100 00000001 00000000 00000000  ..l...
000000fc: 01101011 00000001 00000000 00000000 01101010 00000001  k...j.
00000102: 00000000 00000000 01101001 00000001 00000000 00000000  ..i...
00000108: 01101000 00000001 00000000 00000000 01100111 00000001  h...g.
0000010e: 00000000 00000000 01100110 00000001 00000000 00000000  ..f...
00000114: 01100101 00000001 00000000 00000000 11110011 00000000  e.....
0000011a: 00000000 00000000 01101011 00000001 00000000 00000000  ..k...
00000120: 00111110 00000001 00000000 00000000 01101001 00000001  >...i.
00000126: 00000000 00000000 01000110 00000001 00000000 00000000  ..F...
0000012c: 01100111 00000001 00000000 00000000 01000100 00000001  g...D.
00000132: 00000000 00000000 01100101 00000001 00000000 00000000  ..e...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions