@@ -357,9 +357,8 @@ void CMarkerProfileReaderFVM::MergeProfileMarkers() {
357357 }
358358 }
359359
360- /* --- Sort and remove the duplicate profile marker strings. ---*/
360+ /* --- Remove the duplicate profile marker strings. From 1 per point to 1 per marker . ---*/
361361
362- sort (profileTags.begin (), profileTags.end ());
363362 profileTags.erase (unique (profileTags.begin (),
364363 profileTags.end ()),
365364 profileTags.end ());
@@ -450,37 +449,41 @@ void CMarkerProfileReaderFVM::WriteMarkerProfileTemplate() {
450449
451450 node_file << " NMARK= " << numberOfProfiles << endl;
452451
453- for (unsigned short iMarker = 0 ; iMarker < numberOfProfiles; iMarker++) {
452+ unsigned short iMarkerCounter = 0 ;
453+ for (unsigned short iMarker = 0 ; iMarker < config->GetnMarker_All (); iMarker++) {
454+ if (config->GetMarker_All_KindBC (iMarker) == markerType) {
454455
455- /* --- Access the default data for this marker. ---*/
456+ /* --- Access the default data for this marker. ---*/
456457
457- string Marker_Tag = profileTags[iMarker ];
458+ string Marker_Tag = profileTags[iMarkerCounter ];
458459
459- /* --- Header information for this marker. ---*/
460+ /* --- Header information for this marker. ---*/
460461
461- node_file << " MARKER_TAG= " << Marker_Tag << endl;
462- node_file << " NROW=" << numberOfRowsInProfile[iMarker ] << endl;
463- node_file << " NCOL=" << nColumns << endl;
462+ node_file << " MARKER_TAG= " << Marker_Tag << endl;
463+ node_file << " NROW=" << numberOfRowsInProfile[iMarkerCounter ] << endl;
464+ node_file << " NCOL=" << nColumns << endl;
464465
465- /* --- header line (names of the columns) --- */
466- node_file << columnNames[iMarker ] << endl;
466+ /* --- header line (names of the columns) --- */
467+ node_file << columnNames[iMarkerCounter ] << endl;
467468
468- node_file << setprecision (15 );
469- node_file << std::scientific;
469+ node_file << setprecision (15 );
470+ node_file << std::scientific;
470471
471- /* --- Loop over the data structure and write the coords and vars. ---*/
472+ /* --- Loop over the data structure and write the coords and vars. ---*/
472473
473- for (unsigned long iPoint = 0 ; iPoint < numberOfRowsInProfile[iMarker ]; iPoint++) {
474+ for (unsigned long iPoint = 0 ; iPoint < numberOfRowsInProfile[iMarkerCounter ]; iPoint++) {
474475
475- for (unsigned short iDim = 0 ; iDim < dimension; iDim++) {
476- node_file << profileCoords[iMarker ][iDim][iPoint] << " \t " ;
477- }
476+ for (unsigned short iDim = 0 ; iDim < dimension; iDim++) {
477+ node_file << profileCoords[iMarkerCounter ][iDim][iPoint] << " \t " ;
478+ }
478479
479- node_file << columnValues[iMarker ] << endl;
480+ node_file << columnValues[iMarkerCounter ] << endl;
480481
481- }
482+ }
482483
483- }
484+ iMarkerCounter++;
485+ }
486+ } // iMarker
484487 node_file.close ();
485488
486489 /* --- Print a message to inform the user about the template file. ---*/
0 commit comments