@@ -2834,6 +2834,7 @@ void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) {
28342834
28352835 int err_count = 0 ; // How many errors have we found in the config file
28362836 int max_err_count = 30 ; // Maximum number of errors to print before stopping
2837+ int line_count = 1 ;
28372838
28382839 map<string, bool > included_options;
28392840
@@ -2848,13 +2849,38 @@ void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) {
28482849 throw (1 );
28492850 }
28502851
2852+ PrintingToolbox::trim (text_line);
2853+
2854+ /* --- Check if there is a line continuation character at the
2855+ * end of the current line or somewhere in between (the rest is ignored then).
2856+ * If yes, read until there is a line without one or an empty line.
2857+ * If there is a statement after a cont. char
2858+ * throw an error. ---*/
2859+
2860+ if (text_line.front () != ' %' ){
2861+ while (text_line.back () == ' \\ ' ||
2862+ (PrintingToolbox::split (text_line, ' \\ ' ).size () > 1 )){
2863+ string tmp;
2864+ getline (config_buffer, tmp);
2865+ line_count++;
2866+ if (tmp.find_first_of (' =' ) != string::npos){
2867+ errorString.append (" Line " + to_string (line_count) + " : Statement found after continuation character.\n " );
2868+ }
2869+ PrintingToolbox::trim (tmp);
2870+ if (tmp.front () != ' %' ){
2871+ text_line = PrintingToolbox::split (text_line, ' \\ ' )[0 ];
2872+ text_line += " " + tmp;
2873+ }
2874+ }
2875+ }
2876+
28512877 if (TokenizeString (text_line, option_name, option_value)) {
28522878
28532879 /* --- See if it's a python option ---*/
28542880
28552881 if (option_map.find (option_name) == option_map.end ()) {
28562882 string newString;
2857- newString.append (option_name);
2883+ newString.append (" Line " + to_string (line_count) + " " + option_name);
28582884 newString.append (" : invalid option name" );
28592885 newString.append (" . Check current SU2 options in config_template.cfg." );
28602886 newString.append (" \n " );
@@ -2870,7 +2896,7 @@ void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) {
28702896
28712897 if (included_options.find (option_name) != included_options.end ()) {
28722898 string newString;
2873- newString.append (option_name);
2899+ newString.append (" Line " + to_string (line_count) + " " + option_name);
28742900 newString.append (" : option appears twice" );
28752901 newString.append (" \n " );
28762902 errorString.append (newString);
@@ -2893,6 +2919,7 @@ void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) {
28932919 err_count++;
28942920 }
28952921 }
2922+ line_count++;
28962923 }
28972924
28982925 /* --- See if there were any errors parsing the config file ---*/
@@ -3152,8 +3179,8 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
31523179 nVolumeOutputFiles = 3 ;
31533180 VolumeOutputFiles = new unsigned short [nVolumeOutputFiles];
31543181 VolumeOutputFiles[0 ] = RESTART_BINARY;
3155- VolumeOutputFiles[1 ] = PARAVIEW_BINARY ;
3156- VolumeOutputFiles[2 ] = SURFACE_PARAVIEW_BINARY ;
3182+ VolumeOutputFiles[1 ] = PARAVIEW_XML ;
3183+ VolumeOutputFiles[2 ] = SURFACE_PARAVIEW_XML ;
31573184 }
31583185
31593186 /* --- Check if SU2 was build with TecIO support, as that is required for Tecplot Binary output. ---*/
0 commit comments