mdolab / adflow

ADflow is a finite volume RANS solver tailored for gradient-based aerodynamic design optimization.
Other
229 stars 100 forks source link

Duplicate nodal data in Tecplot surface files #366

Open lamkina opened 2 weeks ago

lamkina commented 2 weeks ago

Description

The Tecplot writer is duplicating the nodal data of the entire surface mesh for every zone in the Tecplot file. This doesn't show up when opening the file in Tecplot because it's indexed by the connectivity, which contains the correct number of elements and indexing for the global node array.

This duplicated nodal data is bloating our Tecplot surface files on the order of the number of mesh zones times the total number of nodes in the surface mesh.

Ideally, we should only write the nodes needed for each zone, or use a shared data array when writing the file. The connectivity may have to be updated as well depending on the chosen solution strategy.

Steps to reproduce issue

Use the Tecplot reader from this PR: https://github.com/mdolab/baseclasses/pull/95

Print the length of the nodal data stored in each variable for each zone to see they are all the size of the full surface mesh.

Plotting a scatter of the nodal data will show that all nodes are stored for every zone.