SU2 icon indicating copy to clipboard operation
SU2 copied to clipboard

Support output directory

Open lcheng9 opened this issue 2 years ago • 6 comments

The final and temporary files such as *.vtu, *.cvs, *.dat, etc. are generated in the current folder. Can an executable option be added to redirect all output files to a designated directory? and directory string length could be more than 200 characters. Thanks.

Command like: SU2_CFD --directory /home/xxx/output/ xxx.cfg

lcheng9 avatar Jun 06 '22 15:06 lcheng9

You can use paths for the inputs and outputs of the code, e.g. RESTART_FILENAME= ./test/restart.dat or MESH_FILENAME= ../mesh.su2 I think it is much safer if you use paths for inputs and change directory to where you want the files written.

pcarruscag avatar Jun 06 '22 19:06 pcarruscag

@pcarruscag Thank you for your reply. I will try this method.

lcheng9 avatar Jun 06 '22 19:06 lcheng9

Will you consider supporting the paths method for Windows OS? The path below seems to cause a reading difficulty in Windows: MESH_FILENAME= D:\executable22\401_cfd_2d\proj5\mesh.su2 This path will be interpreted as D:\\executable22\\401_cfd_2d\\proj5\\mesh.su2 internally. The characters \\ and : are treated as line continuation and delimiters in SetConfig_Parsing() and TokenizeString(), respectively.

lcheng9 avatar Jun 10 '22 21:06 lcheng9

Try wrapping the path in single quotes MESH_FILENAME= 'D:\executable22\401_cfd_2d\proj5\mesh.su2'

pcarruscag avatar Jun 10 '22 21:06 pcarruscag

@pcarruscag Thank you for your quick response. The quotes solve the : delimiter problem, but the \\ issue still persists. The output message is pasted below.

` Error in "void __cdecl CConfig::SetConfig_Parsing(class std::basic_istream<char,struct std::char_traits > &)":

Line 75: Statement found after continuation character. MESH_FILENAME: multiple values for type string Line 77: Statement found after continuation character. Line 78: Statement found after continuation character. Line 79: Statement found after continuation character. MESH_OUT_FILENAME: multiple values for type string Line 81: Statement found after continuation character. Line 82: Statement found after continuation character. Line 83: Statement found after continuation character. Line 84: Statement found after continuation character. Line 85: Statement found after continuation character. Line 86: Statement found after continuation character. Line 87: Statement found after continuation character. Line 88: Statement found after continuation character. CONV_FILENAME: multiple values for type string

------------------------------ Error Exit ------------------------------- `

lcheng9 avatar Jun 11 '22 00:06 lcheng9

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still a relevant issue please comment on it to restart the discussion. Thank you for your contributions.

stale[bot] avatar Aug 13 '22 06:08 stale[bot]