# read sparse array in paraview

**URL:** https://discourse.paraview.org/t/read-sparse-array-in-paraview/13687
**Category:** ParaView Support
**Tags:** vtk
**Created:** [January 12, 2024, 4:44pm UTC](https://discourse.paraview.org/t/read-sparse-array-in-paraview/13687 "2024-01-12T16:44:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![AtzoriMarco](https://discourse.paraview.org/user_avatar/discourse.paraview.org/atzorimarco/32/1788_2.png) [@AtzoriMarco](https://discourse.paraview.org/u/AtzoriMarco)
#### Post date: [January 12, 2024, 4:44pm UTC](https://discourse.paraview.org/t/read-sparse-array-in-paraview/13687/1 "2024-01-12T16:44:19Z")

</div>

Dear all,

I am trying to understand if Paraview/VTK has a convenient way of representing data organized as sparse arrays. I would like to save results of a 3D simulation organized in a Cartesian grid which is mainly empty: I understand that one possible solution to visualize this sort of data with Paraview is to treat the data as unstructured and add coordinates and connectivity to the list of non-zero values. However, this is much more information than necessary for this sort of case, because it is in fact a simple 3D structured grid for which the list of non-empty grid points should be enough, in principle, to reconstruct the mesh. Is there an obvious solution for this?

Cheers!

Marco Atzori

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 15, 2024, 7:34am UTC](https://discourse.paraview.org/t/read-sparse-array-in-paraview/13687/2 "2024-01-15T07:34:51Z")

</div>

Hi @AtzoriMarco

While not perfect for sparse array, implicit composite array can be used:  
[https://www.kitware.com/vtkimplicitarrays-a-new-vtk-framework-for-manipulating-array-like-data/](https://www.kitware.com/vtkimplicitarrays-a-new-vtk-framework-for-manipulating-array-like-data/)

Actually implementating a sparse array using implicit array framework would be pretty trivial though, feel free to go for it or reach out if you are not a developer.

Best,

---

<div class="post-metadata">

### Author: ![AtzoriMarco](https://discourse.paraview.org/user_avatar/discourse.paraview.org/atzorimarco/32/1788_2.png) [@AtzoriMarco](https://discourse.paraview.org/u/AtzoriMarco)
#### Post date: [January 15, 2024, 10:10am UTC](https://discourse.paraview.org/t/read-sparse-array-in-paraview/13687/3 "2024-01-15T10:10:13Z")

</div>

Hi! Thanks a lot for your replay!  
I am not an expert on VTK but I will have a look and send update/questions if I have difficulties!  
Cheers!  
Marco
