2626 */
2727
2828#include " ../../include/grid_movement/CSurfaceMovement.hpp"
29- #include < iostream>
3029#include " ../../include/toolboxes/C1DInterpolation.hpp"
3130#include " ../../include/toolboxes/geometry_toolbox.hpp"
3231
@@ -3713,8 +3712,7 @@ void CSurfaceMovement::SetHicksHenneCamber(CGeometry* boundary, CConfig* config)
37133712 // --- Check if the type of design variables is only HICKS_HENNE_CAMBER ---// // TODO: Extend to CAMBER + THICKNESS
37143713 for (unsigned short iDV = 0 ; iDV < config->GetnDV (); iDV++)
37153714 if (config->GetDesign_Variable (iDV) != HICKS_HENNE_CAMBER) {
3716- cout << " 'HicksHenneCamber' can not be combined with other design variables." ;
3717- cin.get ();
3715+ SU2_MPI::Error (" 'HicksHenneCamber' can not be combined with other design variables." , CURRENT_FUNCTION);
37183716 } else {
37193717 nDV_Camber++;
37203718 }
@@ -3759,7 +3757,7 @@ void CSurfaceMovement::SetHicksHenneCamber(CGeometry* boundary, CConfig* config)
37593757 }
37603758
37613759 /* --- Correct the TP coordinates if the trailing edge is blunt ---*/
3762- if ((USTPCoord[0 ] != LSTPCoord[0 ]) || (USTPCoord[1 ] != LSTPCoord[1 ])) {
3760+ if ((fabs ( USTPCoord[0 ] - LSTPCoord[0 ]) > EPS) || (fabs ( USTPCoord[1 ] - LSTPCoord[1 ]) > EPS )) {
37633761 TPCoord[0 ] = (USTPCoord[0 ] + LSTPCoord[0 ]) / 2.0 ;
37643762 TPCoord[1 ] = (USTPCoord[1 ] + LSTPCoord[1 ]) / 2.0 ;
37653763 } else {
@@ -3772,7 +3770,7 @@ void CSurfaceMovement::SetHicksHenneCamber(CGeometry* boundary, CConfig* config)
37723770 if (config->GetMarker_All_DV (iMarker) == YES) {
37733771 for (iVertex = 0 ; iVertex < boundary->nVertex [iMarker]; iVertex++) {
37743772 CoordTrans = boundary->vertex [iMarker][iVertex]->GetCoord ();
3775- Distance = sqrt ( pow (CoordTrans[ 0 ] - TPCoord[ 0 ], 2.0 ) + pow ( CoordTrans[ 1 ] - TPCoord[ 1 ], 2.0 ) );
3773+ Distance = GeometryToolbox::Distance ( 2 , CoordTrans, TPCoord );
37763774 if (Chord < Distance) {
37773775 Chord = Distance;
37783776 LPCoord[0 ] = CoordTrans[0 ];
0 commit comments