I have written a C++ plugin to read data from a grid-based Hydro code (called Disco: https://arxiv.org/abs/1605.03577). The code utilizes a moving mesh where grid cells can move on “tracks” and shear past each other and outputs in a custom HDF5 format.
Disco’s grid is written in Cartesian, cylindrical, or spherical coordinates. In Cartesian mode, the cell “tracks” are fixed to a rectilinear grid in X-Z, while the cells independently move in Y. In cylindrical or spherical mode, the tracks are in a logically cartesian grid in R-Z or R-Theta, while the cells move freely in Phi. Each Disco cell is a coordinate box, for instance: (R1,R2)x(Theta1,Theta2)x(Phi1,Phi2).
I have a basic serial version of the reader running using an UnstructuredGrid, where each Disco cell is split into several hexahedral VTK cells. Currently the splitting is not necessarily consistent between adjacent tracks, resulting in a not-quite water tight mesh (some cells slightly overlap, others may have small voids between them). Perhaps as a result of this, when I try to plot stream lines many terminate prematurely within the domain.
I was worried that splitting each disco cell into several VTK cells would cause memory issues, especially since the cell data for each disco cell would be copied into several VTK cells, so I also wrote a not-quite-watertight polyhedral setup. This, however, ended up being significantly slower than the hexahedral mesh.
My questions for the community:
- What can cause stream-lines to terminate prematurely? Does the stream line filter require a water-tight mesh?
- Is a water-tight mesh critical for most filters?
- What are the performance/memory trade-offs between a mesh of hexahedral cells vs polyhedra? Does one tend to perform better?
- Are there general guidelines for constructing efficient Polyhedral meshes?
Any help would be greatly appreciated!