diff --git a/SU2_CFD/src/CMarkerProfileReaderFVM.cpp b/SU2_CFD/src/CMarkerProfileReaderFVM.cpp index b9b27a176aa9..b6b1e36479fc 100644 --- a/SU2_CFD/src/CMarkerProfileReaderFVM.cpp +++ b/SU2_CFD/src/CMarkerProfileReaderFVM.cpp @@ -302,6 +302,10 @@ void CMarkerProfileReaderFVM::MergeProfileMarkers() { by the master and sorted by marker tag in one large n-dim. array. ---*/ su2double *Coords_Local; jPoint = 0; + + /*--- Index to the string in columNames and columnValues ---*/ + unsigned short columnIndex=0; + for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { if (config->GetMarker_All_KindBC(iMarker) == markerType) { @@ -338,12 +342,12 @@ void CMarkerProfileReaderFVM::MergeProfileMarkers() { /*--- Store the column names ---*/ SPRINTF(&Buffer_Send_Name[jPoint*MAX_STRING_SIZE], "%s", - columnNames[iMarker].c_str()); + columnNames[columnIndex].c_str()); /*--- Store the column values ---*/ SPRINTF(&Buffer_Send_Value[jPoint*MAX_STRING_SIZE], "%s", - columnValues[iMarker].c_str()); + columnValues[columnIndex].c_str()); /*--- Increment jPoint as the counter. We need this because iPoint may include halo nodes that we skip over during this loop. ---*/ @@ -352,6 +356,7 @@ void CMarkerProfileReaderFVM::MergeProfileMarkers() { } } + columnIndex++; } }