Skip to content

Grid: add cells_connectivity and cells_definition

Sebastian Müller requested to merge add_grid_cells_connectivity into main

This PR adds two missing Grid properties:

  • cells_connectivity: connectivity array as used by ESMF and VTK
  • cells_definition: cell definition as used by PyVista and legacy VTK
  • cells_offset: location of the start of each cell in cells_connectivity

I also added convenience functions and constants to grid_tools:

  • get_cells_matrix: convert cells_connectivity or cells_definition back to the default cells matrix used in the Grid class (can be used to convert VTK-grids into FINAM-grids)
  • INV_VTK_TYPE_MAP: Inverse mapping to VTK_TYPE_MAP: FINAM cell type to VTK cell type
  • VTK_CELL_DIM: parametric dimension for each VTK cell type
Edited by Sebastian Müller

Merge request reports

Loading