Efficient mesh data writer

Hi,

I would like to write heavy mesh data (GBs) with VTK and view it in ParaView. Could I have some recommendations on what data structure I should use in VTK to manipulate the data? I have tried unstructured grid, but writing in .vtu file is not very efficient in ASCII and binary (binary is even worse).

By the way, I would like to add some attributes to each mesh triangle to illustrate some physical materials.

Thanks for any help in advance!

If your mesh is triangular, use vtkPolyData. If it’s volumetric use vtkUnstructuredGrid.