You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Safe usage of t8_forest_write_vtk_ext with data for external applications #2454
t8_vtk_data_type_ttype; /**< Describes of which type the data array is */
chardescription[BUFSIZ]; /**< String that describes the data. */
double*data;
/**< An array of length n*num_local_elements doubles with
n = 1 if type = T8_VTK_SCALAR, n = 3 if type = T8_VTK_VECTOR */
} t8_vtk_data_field_t;
Its member description has fixed width BUFSIZ, which is platform dependent. I checked Windows, mac, and linux, and got 512, 1024, and 8192, respectively, but it could also vary among different compilers IIUC.
This becomes problematic when an external application linking against t8code tries to assemble such a data field and pass it to t8_forest_write_vtk_ext. One has to make sure to use a BUFSIZ which is consistent to the one used when t8code was compiled.
A simple solution would be to use a fixed, non platform dependent, constant. Another option might be to make the internally used BUFSIZ accessible from outside.
Estimated priority
Which of these is most applicable (remove the others):
"Priority: medium" Should be solved within half a year
Activity