su2code/SU2

"PARAVIEW_MULTIBLOCK" issue with path that contains period

idocruhman opened this issue · 4 comments

I have enabled the writing of the individual surfaces using the "PARAVIEW_MULTIBLOCK" directive.
The folder was created on the wrong place because the path contained periods.
for a simulation run in /foo/bar/polar_M0.6/aoa0/config.cfg
the folder was created in /foo/bar/polar_M0/zone_0
I assume this is due to the foder name being generated by cutting the path at the first period to remove the .cfg from the name.
While I understand that chaging the name will fix the issue, a period is a legal character for a folder name.

  • OS: Centos 7.5
  • C++ compiler and version: not sure
  • MPI implementation and version: not sure
  • SU2 Version: 7.5.0

We actually do a find_last_of('.'), which strips the filename extension, if it exists. But it leads to the problem that you describe if the filename does not have an extension but the folder name does.
The documentation says that VOLUME_FILENAME should be provided without the extension/suffix, so we could also remove the find_last_of('.') to prevent unwanted chopping of the folders and filenames.

We can check for the last "." that is after the last / (if one exists).

Maybe a user wants filenames like flow.a, flow.b, and I think we should allow this.
I think we should not be too smart about it and not strip anything. Then the code does what the documentation says it does.

Ok.