@@ -95,7 +95,6 @@ CFlowCompOutput::CFlowCompOutput(const CConfig *config, unsigned short nDim) : C
9595 cauchySerie.resize (convFields.size (), vector<su2double>(nCauchy_Elems, 0.0 ));
9696 }
9797 }
98-
9998}
10099
101100void CFlowCompOutput::SetHistoryOutputFields (CConfig *config){
@@ -480,7 +479,6 @@ void CFlowCompOutput::LoadHistoryData(CConfig *config, CGeometry *geometry, CSol
480479 SetCustomOutputs (solver, geometry, config);
481480
482481 SetCustomAndComboObjectives (FLOW_SOL, config, solver);
483-
484482}
485483
486484bool CFlowCompOutput::SetInitResiduals (const CConfig *config){
@@ -635,15 +633,11 @@ void CFlowCompOutput::WriteTurboSpanwisePerformance(std::shared_ptr<CTurboOutput
635633
636634 /* --- Writing Span wise inflow thermodynamic quantities. ---*/
637635 spanwise_performance_filename = " TURBOMACHINERY/inflow_spanwise_thermodynamic_values.dat" ;
638- char buffer[50 ];
639- if (nZone > 1 ){
640- unsigned short lastindex = spanwise_performance_filename.find_last_of (" ." );
641- spanwise_performance_filename = spanwise_performance_filename.substr (0 , lastindex);
642- SPRINTF (buffer, " _%d.dat" , SU2_TYPE::Int (val_iZone));
643- spanwise_performance_filename.append (string (buffer));
636+ if (nZone > 1 ) {
637+ spanwise_performance_filename.append (" _" + std::to_string (val_iZone) + " .dat" );
638+ } else {
639+ spanwise_performance_filename.append (" .dat" );
644640 }
645-
646-
647641 file.open (spanwise_performance_filename.data (), ios::out | ios::trunc);
648642 file.setf (ios::scientific);
649643 file.precision (12 );
@@ -682,13 +676,11 @@ void CFlowCompOutput::WriteTurboSpanwisePerformance(std::shared_ptr<CTurboOutput
682676
683677 /* --- Writing Span wise outflow thermodynamic quantities. ---*/
684678 spanwise_performance_filename = " TURBOMACHINERY/outflow_spanwise_thermodynamic_values.dat" ;
685- if (nZone > 1 ){
686- unsigned short lastindex = spanwise_performance_filename.find_last_of (" ." );
687- spanwise_performance_filename = spanwise_performance_filename.substr (0 , lastindex);
688- SPRINTF (buffer, " _%d.dat" , SU2_TYPE::Int (val_iZone));
689- spanwise_performance_filename.append (string (buffer));
679+ if (nZone > 1 ) {
680+ spanwise_performance_filename.append (" _" + std::to_string (val_iZone) + " .dat" );
681+ } else {
682+ spanwise_performance_filename.append (" .dat" );
690683 }
691-
692684 file.open (spanwise_performance_filename.data (), ios::out | ios::trunc);
693685 file.setf (ios::scientific);
694686 file.precision (12 );
@@ -728,13 +720,11 @@ void CFlowCompOutput::WriteTurboSpanwisePerformance(std::shared_ptr<CTurboOutput
728720
729721 /* --- Writing Span wise inflow kinematic quantities. ---*/
730722 spanwise_performance_filename = " TURBOMACHINERY/inflow_spanwise_kinematic_values.dat" ;
731- if (nZone > 1 ){
732- unsigned short lastindex = spanwise_performance_filename.find_last_of (" ." );
733- spanwise_performance_filename = spanwise_performance_filename.substr (0 , lastindex);
734- SPRINTF (buffer, " _%d.dat" , SU2_TYPE::Int (val_iZone));
735- spanwise_performance_filename.append (string (buffer));
723+ if (nZone > 1 ) {
724+ spanwise_performance_filename.append (" _" + std::to_string (val_iZone) + " .dat" );
725+ } else {
726+ spanwise_performance_filename.append (" .dat" );
736727 }
737-
738728 file.open (spanwise_performance_filename.data (), ios::out | ios::trunc);
739729 file.setf (ios::scientific);
740730 file.precision (12 );
@@ -793,14 +783,12 @@ void CFlowCompOutput::WriteTurboSpanwisePerformance(std::shared_ptr<CTurboOutput
793783 file.close ();
794784
795785 /* --- Writing Span wise outflow thermodynamic quantities. ---*/
796- spanwise_performance_filename = " TURBOMACHINERY/outflow_spanwise_kinematic_values.dat" ;
797- if (nZone > 1 ){
798- unsigned short lastindex = spanwise_performance_filename.find_last_of (" ." );
799- spanwise_performance_filename = spanwise_performance_filename.substr (0 , lastindex);
800- SPRINTF (buffer, " _%d.dat" , SU2_TYPE::Int (val_iZone));
801- spanwise_performance_filename.append (string (buffer));
802- }
803-
786+ spanwise_performance_filename = " TURBOMACHINERY/outflow_spanwise_kinematic_values" ;
787+ if (nZone > 1 ) {
788+ spanwise_performance_filename.append (" _" + std::to_string (val_iZone) + " .dat" );
789+ } else {
790+ spanwise_performance_filename.append (" .dat" );
791+ }
804792 file.open (spanwise_performance_filename.data (), ios::out | ios::trunc);
805793 file.setf (ios::scientific);
806794 file.precision (12 );
0 commit comments