MmgTools / ParMmg

Distributed parallelization of 3D volume mesh adaptation
Other
34 stars 19 forks source link

Fix some bugs in *.pvtu output #94

Closed laetitia-m closed 1 year ago

laetitia-m commented 1 year ago
  1. In inoutcpp_pmmg.c file: Fix bug in snprintf in PMMG_savePvtuMesh and PMMG_savePvtuMesh_and_allData. snprintf cannot support to have input and output filename using the same variable. Use an intermediate filename to overcome this issue.
  2. Fix typo in inoutcpp_pmmg.c file: founded -> found + update regex in accordance in cmake/testing/pmmg_tests.cmake.
  3. For output file at *.pvtu format:
    • In inoutcpp_pmmg.c file: if the output filename has dots "." in the basename, replace them with dashes "-". Why? In VTK function SetFileName(filename), the first dot "." in the filename is interpreted as the extension start. So, whatever the user specifies after the first dot "." will be ignored by VTK. To overcome this, dots are replaced by dashes.
    • In parmmg.c file: a warning is displayed to the user if the basename is changed.
    • In cmake/testing/pmmg_tests.cmake: Add test to check if the basename is well modified in this case.
Algiane commented 1 year ago

Thanks