Skip to content

Allow CSR-Style Offsets as an Alternative Encoding for Unstructured Topologies #1483

@jlee-kitware

Description

@jlee-kitware

We’ve run into a recurring issue in Catalyst/VTK when consuming Conduit Mesh Blueprint data for unstructured topologies. The Blueprint currently uses two arrays, sizes and offsets, both of length num_cells. Many downstream consumers (VTK, Viskores, GPU kernels, sparse/irregular codes) instead expect a CSR-style prefix-sum array of length num_cells + 1, where the last entry equals the total connectivity length.

Because Conduit does not currently allow a CSR-style representation, Catalyst has to allocate a new array and compute these offsets internally. That defeats zero-copy handling of connectivity, especially for GPU-resident meshes where the original data already exists in the required form.

We would like to ask whether the Mesh Blueprint could optionally accept a CSR-style encoding instead of sizes + offsets. Something like:

topologies:
  topo:
    type: unstructured
    coordset: coords
    elements:
      shape: poly
      connectivity: [...]
      csr_offsets: [...]

This would not add redundant data. It would simply allow the producer to supply the format many consumers already use, and avoid the extra copy.

Would the Blueprint team be open to discussing this? We can provide examples, reasoning, or a prototype PR if helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions