@@ -437,11 +437,16 @@ CMultiGridGeometry::CMultiGridGeometry(CGeometry* fine_grid, CConfig* config, un
437437 unsigned long n_corrupted_implicit_CVs = 0 ;
438438 for (auto iCV = Index_CoarseCV_before_implicit_lines; iCV < Index_CoarseCV_after_implicit_lines; iCV++) {
439439 const auto nChildren = nodes->GetnChildren_CV (iCV);
440- if (nChildren == 1 ) nCVs_1child++;
441- else if (nChildren == 2 ) nCVs_2child++;
442- else if (nChildren == 3 ) nCVs_3child++;
443- else if (nChildren == 4 ) nCVs_4child++;
444- else nCVs_other++;
440+ if (nChildren == 1 )
441+ nCVs_1child++;
442+ else if (nChildren == 2 )
443+ nCVs_2child++;
444+ else if (nChildren == 3 )
445+ nCVs_3child++;
446+ else if (nChildren == 4 )
447+ nCVs_4child++;
448+ else
449+ nCVs_other++;
445450
446451 if (nChildren != 2 && !config->GetMGOptions ().MG_Implicit_Lines_Isotropic ) {
447452 n_corrupted_implicit_CVs++;
@@ -459,9 +464,8 @@ CMultiGridGeometry::CMultiGridGeometry(CGeometry* fine_grid, CConfig* config, un
459464 if (n_corrupted_implicit_CVs > 0 ) {
460465 cout << " AFTER DOMAIN AGGLOMERATION: " << n_corrupted_implicit_CVs
461466 << " implicit line CVs were corrupted (child count != 2)" << endl;
462- cout << " Distribution in implicit line CVs: 1-child=" << nCVs_1child
463- << " , 2-child=" << nCVs_2child << " , 3-child=" << nCVs_3child
464- << " , 4-child=" << nCVs_4child;
467+ cout << " Distribution in implicit line CVs: 1-child=" << nCVs_1child << " , 2-child=" << nCVs_2child
468+ << " , 3-child=" << nCVs_3child << " , 4-child=" << nCVs_4child;
465469 if (nCVs_other > 0 ) cout << " , other=" << nCVs_other;
466470 cout << endl;
467471 }
@@ -546,11 +550,16 @@ CMultiGridGeometry::CMultiGridGeometry(CGeometry* fine_grid, CConfig* config, un
546550 unsigned long n_corrupted_after_hanging = 0 ;
547551 for (auto iCV = Index_CoarseCV_before_implicit_lines; iCV < Index_CoarseCV_after_implicit_lines; iCV++) {
548552 const auto nChildren = nodes->GetnChildren_CV (iCV);
549- if (nChildren == 1 ) nCVs_1child++;
550- else if (nChildren == 2 ) nCVs_2child++;
551- else if (nChildren == 3 ) nCVs_3child++;
552- else if (nChildren == 4 ) nCVs_4child++;
553- else nCVs_other++;
553+ if (nChildren == 1 )
554+ nCVs_1child++;
555+ else if (nChildren == 2 )
556+ nCVs_2child++;
557+ else if (nChildren == 3 )
558+ nCVs_3child++;
559+ else if (nChildren == 4 )
560+ nCVs_4child++;
561+ else
562+ nCVs_other++;
554563
555564 if (nChildren != 2 && !config->GetMGOptions ().MG_Implicit_Lines_Isotropic ) {
556565 n_corrupted_after_hanging++;
@@ -559,9 +568,8 @@ CMultiGridGeometry::CMultiGridGeometry(CGeometry* fine_grid, CConfig* config, un
559568 if (n_corrupted_after_hanging > 0 ) {
560569 cout << " AFTER HANGING NODE CORRECTION: " << n_corrupted_after_hanging
561570 << " implicit line CVs corrupted (child count != 2)" << endl;
562- cout << " Distribution in implicit line CVs: 1-child=" << nCVs_1child
563- << " , 2-child=" << nCVs_2child << " , 3-child=" << nCVs_3child
564- << " , 4-child=" << nCVs_4child;
571+ cout << " Distribution in implicit line CVs: 1-child=" << nCVs_1child << " , 2-child=" << nCVs_2child
572+ << " , 3-child=" << nCVs_3child << " , 4-child=" << nCVs_4child;
565573 if (nCVs_other > 0 ) cout << " , other=" << nCVs_other;
566574 cout << endl;
567575 }
@@ -575,20 +583,25 @@ CMultiGridGeometry::CMultiGridGeometry(CGeometry* fine_grid, CConfig* config, un
575583 unsigned long nCVs_1child = 0 , nCVs_2child = 0 , nCVs_3child = 0 , nCVs_4child = 0 , nCVs_other = 0 ;
576584 for (auto iCV = 0ul ; iCV < nPointDomain; iCV++) {
577585 const auto nChildren = nodes->GetnChildren_CV (iCV);
578- if (nChildren == 1 ) nCVs_1child++;
579- else if (nChildren == 2 ) nCVs_2child++;
580- else if (nChildren == 3 ) nCVs_3child++;
581- else if (nChildren == 4 ) nCVs_4child++;
582- else nCVs_other++;
586+ if (nChildren == 1 )
587+ nCVs_1child++;
588+ else if (nChildren == 2 )
589+ nCVs_2child++;
590+ else if (nChildren == 3 )
591+ nCVs_3child++;
592+ else if (nChildren == 4 )
593+ nCVs_4child++;
594+ else
595+ nCVs_other++;
583596 }
584- cout << " CV distribution: 1-child=" << nCVs_1child << " , 2-child=" << nCVs_2child
585- << " , 3-child= " << nCVs_3child << " , 4-child=" << nCVs_4child;
597+ cout << " CV distribution: 1-child=" << nCVs_1child << " , 2-child=" << nCVs_2child << " , 3-child= " << nCVs_3child
598+ << " , 4-child=" << nCVs_4child;
586599 if (nCVs_other > 0 ) cout << " , other=" << nCVs_other;
587600 cout << endl;
588601
589602 if (nCVs_3child > 0 || (!config->GetMGOptions ().MG_Implicit_Lines_Isotropic && nCVs_4child > 0 )) {
590- cout << " WARNING: Detected unexpected CV child counts (3-child=" << nCVs_3child
591- << " , 4-child= " << nCVs_4child << " in ANISO mode)" << endl;
603+ cout << " WARNING: Detected unexpected CV child counts (3-child=" << nCVs_3child << " , 4-child= " << nCVs_4child
604+ << " in ANISO mode)" << endl;
592605 }
593606 }
594607
@@ -1378,9 +1391,9 @@ void CMultiGridGeometry::AgglomerateImplicitLines(unsigned long& Index_CoarseCV,
13781391 const bool ISOTROPIC = config->GetMGOptions ().MG_Implicit_Lines_Isotropic ;
13791392
13801393 const unsigned long nPointFine = fine_grid->GetnPoint ();
1381- const unsigned long starting_Index_CoarseCV = Index_CoarseCV; /* --- Track how many CVs we create ---*/
1382- const bool DEBUG_OUTPUT = (rank == MASTER_NODE ); /* --- Enable detailed diagnostic output ---*/
1383- const unsigned long DEBUG_CV_LIMIT = 20 ; /* --- Show details for first N CVs ---*/
1394+ const unsigned long starting_Index_CoarseCV = Index_CoarseCV; /* --- Track how many CVs we create ---*/
1395+ const bool DEBUG_OUTPUT = (rank == MASTER_NODE ); /* --- Enable detailed diagnostic output ---*/
1396+ const unsigned long DEBUG_CV_LIMIT = 20 ; /* --- Show details for first N CVs ---*/
13841397
13851398 /* --- Collect implicit lines starting at viscous (no-slip) wall vertices only.
13861399 * Seeding from non-wall boundaries (farfield, inlet, outlet, symmetry) would
@@ -1484,7 +1497,8 @@ void CMultiGridGeometry::AgglomerateImplicitLines(unsigned long& Index_CoarseCV,
14841497 avg_len += L.size ();
14851498 }
14861499 if (!lines.empty ()) avg_len /= lines.size ();
1487- cout << " Line lengths: min=" << min_len << " , max=" << max_len << " , avg=" << std::setprecision (1 ) << std::fixed << avg_len << endl;
1500+ cout << " Line lengths: min=" << min_len << " , max=" << max_len << " , avg=" << std::setprecision (1 ) << std::fixed
1501+ << avg_len << endl;
14881502
14891503 /* --- Show first few lines for debugging ---*/
14901504 cout << " First 5 lines (showing first 4 nodes):" << endl;
@@ -1597,8 +1611,8 @@ void CMultiGridGeometry::AgglomerateImplicitLines(unsigned long& Index_CoarseCV,
15971611 if (DEBUG_OUTPUT && Index_CoarseCV < starting_Index_CoarseCV + DEBUG_CV_LIMIT ) {
15981612 const auto * coord_a = fine_grid->nodes ->GetCoord (a);
15991613 const auto * coord_b = fine_grid->nodes ->GetCoord (b);
1600- cout << " CV " << Index_CoarseCV << " (ISO): nodes " << a << " +" << b << " +" << c << " +" << d
1601- << " | lines[ " << li1 << " ][" << idx1 << " ," << idx2 << " ]+lines[" << li2_best << " ][" << idx1 << " ," << idx2 << " ]"
1614+ cout << " CV " << Index_CoarseCV << " (ISO): nodes " << a << " +" << b << " +" << c << " +" << d << " | lines[ "
1615+ << li1 << " ][" << idx1 << " ," << idx2 << " ]+lines[" << li2_best << " ][" << idx1 << " ," << idx2 << " ]"
16021616 << " | coord_a=(" << coord_a[0 ] << " ," << coord_a[1 ] << " )"
16031617 << " coord_b=(" << coord_b[0 ] << " ," << coord_b[1 ] << " )" << endl;
16041618 }
@@ -1670,17 +1684,20 @@ void CMultiGridGeometry::AgglomerateImplicitLines(unsigned long& Index_CoarseCV,
16701684 const auto wall_b = lines[li2_best][0 ];
16711685 const auto * coord_wall_a = fine_grid->nodes ->GetCoord (wall_a);
16721686 const auto * coord_wall_b = fine_grid->nodes ->GetCoord (wall_b);
1673- su2double wall_dist = sqrt ( pow (coord_wall_a[ 0 ] - coord_wall_b[ 0 ], 2 ) +
1674- pow (coord_wall_a[1 ] - coord_wall_b[1 ], 2 ));
1687+ su2double wall_dist =
1688+ sqrt ( pow (coord_wall_a[ 0 ] - coord_wall_b[ 0 ], 2 ) + pow (coord_wall_a[1 ] - coord_wall_b[1 ], 2 ));
16751689
16761690 /* --- Check if wall vertices are neighbors ---*/
16771691 bool walls_are_neighbors = false ;
16781692 for (auto neighbor : fine_grid->nodes ->GetPoints (wall_a)) {
1679- if (neighbor == wall_b) { walls_are_neighbors = true ; break ; }
1693+ if (neighbor == wall_b) {
1694+ walls_are_neighbors = true ;
1695+ break ;
1696+ }
16801697 }
16811698
1682- cout << " Pairing lines " << li1 << " + " << li2_best << " at pos=" << pos
1683- << " | wall_dist= " << wall_dist << " | walls_neighbors=" << (walls_are_neighbors ? " YES" : " NO" ) << endl;
1699+ cout << " Pairing lines " << li1 << " + " << li2_best << " at pos=" << pos << " | wall_dist= " << wall_dist
1700+ << " | walls_neighbors=" << (walls_are_neighbors ? " YES" : " NO" ) << endl;
16841701 }
16851702
16861703 /* --- Create 2-child coarse CV (anisotropic: same position, different lines) ---*/
@@ -1697,12 +1714,15 @@ void CMultiGridGeometry::AgglomerateImplicitLines(unsigned long& Index_CoarseCV,
16971714 su2double dist = sqrt (pow (coord_a[0 ] - coord_b[0 ], 2 ) + pow (coord_a[1 ] - coord_b[1 ], 2 ));
16981715 bool are_neighbors = false ;
16991716 for (auto neighbor : fine_grid->nodes ->GetPoints (a)) {
1700- if (neighbor == b) { are_neighbors = true ; break ; }
1717+ if (neighbor == b) {
1718+ are_neighbors = true ;
1719+ break ;
1720+ }
17011721 }
1702- cout << " CV " << Index_CoarseCV << " (ANISO): nodes " << a << " +" << b
1703- << " | lines[ " << li1 << " ][ " << pos << " ]+lines[" << li2_best << " ][" << pos << " ]"
1704- << " | dist=" << dist << " | neighbors=" << (are_neighbors ? " YES" : " NO" )
1705- << " | coords A=( " << coord_a[0 ] << " ," << coord_a[1 ] << " )"
1722+ cout << " CV " << Index_CoarseCV << " (ANISO): nodes " << a << " +" << b << " | lines[ " << li1 << " ][ " << pos
1723+ << " ]+lines[" << li2_best << " ][" << pos << " ]"
1724+ << " | dist=" << dist << " | neighbors=" << (are_neighbors ? " YES" : " NO" ) << " | coords A=( "
1725+ << coord_a[0 ] << " ," << coord_a[1 ] << " )"
17061726 << " B=(" << coord_b[0 ] << " ," << coord_b[1 ] << " )" << endl;
17071727 }
17081728
0 commit comments