Skip to content

Commit 63bf74c

Browse files
committed
small clean up
1 parent 6ad89f7 commit 63bf74c

File tree

8 files changed

+15
-96
lines changed

8 files changed

+15
-96
lines changed

Common/include/CConfig.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,8 +923,7 @@ class CConfig {
923923
*MarkerPitching_Ampl, /*!< \brief Pitching amplitude of marker. */
924924
*MarkerPitching_Phase, /*!< \brief Pitching phase offset of marker. */
925925
*MarkerPlunging_Omega, /*!< \brief Angular frequency of marker.. */
926-
*MarkerPlunging_Ampl, /*!< \brief Plunging amplitude of marker. */
927-
*Marker_1D_Monitor; /*!< \brief list of coordinates for 1D monitor points */
926+
*MarkerPlunging_Ampl; /*!< \brief Plunging amplitude of marker. */
928927

929928
unsigned short
930929
nMarkerMotion_Origin, /*!< \brief Number of values provided for mesh motion origin of marker. */

Common/src/CConfig.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5618,9 +5618,6 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) {
56185618
}
56195619

56205620
for (iMarker_HeatFlux = 0; iMarker_HeatFlux < nMarker_HeatFlux; iMarker_HeatFlux++) {
5621-
5622-
cout << endl << endl << "nijso : marker tag for heatflux wall : " << iMarker_CfgFile << endl << endl;
5623-
56245621
Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_HeatFlux[iMarker_HeatFlux];
56255622
Marker_CfgFile_KindBC[iMarker_CfgFile] = HEAT_FLUX;
56265623
iMarker_CfgFile++;
@@ -7856,7 +7853,6 @@ CConfig::~CConfig(void) {
78567853
delete[] Marker_DV;
78577854
delete[] Marker_Moving;
78587855
delete[] Marker_Monitoring;
7859-
delete[] Marker_1D_Monitor;
78607856
delete[] Marker_Designing;
78617857
delete[] Marker_GeoEval;
78627858
delete[] Marker_Plotting;

Common/src/geometry/CPhysicalGeometry.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3965,6 +3965,7 @@ void CPhysicalGeometry::LoadUnpartitionedSurfaceElements(CConfig *config,
39653965
nElem_Bound[iMarker] = surfElems;
39663966

39673967
/*--- Report the number and name of the marker to the console. ---*/
3968+
39683969
cout << nElem_Bound[iMarker] << " boundary elements in index ";
39693970
cout << iMarker <<" (Marker = " <<Marker_Tag<< ")." << endl;
39703971

Common/src/grid_movement/CFreeFormDefBox.cpp

Lines changed: 9 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -978,9 +978,9 @@ bool CFreeFormDefBox::GetPointFFD(CGeometry *geometry, CConfig *config, unsigned
978978
bool spherical = (config->GetFFD_CoordSystem() == SPHERICAL);
979979
bool polar = (config->GetFFD_CoordSystem() == POLAR);
980980

981-
982-
// nijso: subdivide the box into separate tetrahedrons
983-
//unsigned short Index[5][7] = {
981+
982+
// subdivide the box into separate tetrahedrons
983+
// unsigned short Index[5][7] = {
984984
// {0, 1, 2, 5, 0, 1, 2},
985985
// {0, 2, 7, 5, 0, 2, 7},
986986
// {0, 2, 3, 7, 0, 2, 3},
@@ -996,9 +996,12 @@ bool CFreeFormDefBox::GetPointFFD(CGeometry *geometry, CConfig *config, unsigned
996996
{4,5,1,0,4}, // bottom side
997997
{4,7,6,5,4}}; // back side
998998

999-
// nijso: better to subdivide each of the 6 faces into 4 triangles by defining a supporting middle point
1000-
// note that the definition of the FFD box is as follows: we first define one face counterclockwise when looking from outside of the ffd box
1001-
// then we define the second face counterclockwise when looking from the inside of the ffd box
999+
/*--- The current approach is to subdivide each of the 6 faces of the hexahedral FFD box into 4 triangles
1000+
by defining a supporting middle point. This allows nonplanar FFD boxes.
1001+
Note that the definition of the FFD box is as follows: the FFD box is a 6-sided die and we are looking at the side "1".
1002+
The opposite side is side "6".
1003+
If we are looking at side "1", we define the nodes counterclockwise.
1004+
If we are looking at side "6", we define the face clockwise ---*/
10021005

10031006

10041007
unsigned short nDim = geometry->GetnDim();
@@ -1047,56 +1050,11 @@ bool CFreeFormDefBox::GetPointFFD(CGeometry *geometry, CConfig *config, unsigned
10471050
P);
10481051
if (Distance_Point < 0) {
10491052
Inside = false;
1050-
cout << "outside of the FFD box" << endl;
10511053
return Inside;
10521054
}
1053-
// cout <<"__new: "<< Coord[0] << ", "<< Coord[1] << ", "<< Coord[2] << ", " << endl;
1054-
// cout <<"__new: "<< Coord_Corner_Points[Index[iVar][jVar]][0] << ", "<< Coord_Corner_Points[Index[iVar][jVar]][1] << ", "<< Coord_Corner_Points[Index[iVar][jVar]][2] << ", " << endl;
1055-
// cout <<"__new: "<< Coord_Corner_Points[Index[iVar][jVar+1]][0] << ", "<< Coord_Corner_Points[Index[iVar][jVar+1]][1] << ", "<< Coord_Corner_Points[Index[iVar][jVar+1]][2] << ", " << endl;
1056-
// cout <<"__new: "<< P[0] << ", "<< P[1] << ", "<< P[2] << ", " << endl;
1057-
// cout << "__ dp = " << Distance_Point << endl;
1058-
}
1059-
}
1060-
1061-
1062-
1063-
1064-
/*--- 1st tetrahedron {V0, V1, V2, V5}
1065-
2nd tetrahedron {V0, V2, V7, V5}
1066-
3th tetrahedron {V0, V2, V3, V7}
1067-
4th tetrahedron {V0, V5, V7, V4}
1068-
5th tetrahedron {V2, V7, V5, V6} ---*/
1069-
1070-
// loop over the tetrahedrons
1071-
/*
1072-
for (iVar = 0; iVar < 5; iVar++) {
1073-
Inside = true;
1074-
for (jVar = 0; jVar < 4; jVar++) {
1075-
su2double Distance_Point = geometry->Point2Plane_Distance(Coord,
1076-
Coord_Corner_Points[Index[iVar][jVar+1]],
1077-
Coord_Corner_Points[Index[iVar][jVar+2]],
1078-
Coord_Corner_Points[Index[iVar][jVar+3]]);
1079-
1080-
su2double Distance_Vertex = geometry->Point2Plane_Distance(Coord_Corner_Points[Index[iVar][jVar]],
1081-
Coord_Corner_Points[Index[iVar][jVar+1]],
1082-
Coord_Corner_Points[Index[iVar][jVar+2]],
1083-
Coord_Corner_Points[Index[iVar][jVar+3]]);
1084-
if (Distance_Point*Distance_Vertex < 0.0) Inside = false;
1085-
1086-
cout <<"__ "<<iVar << " , " << jVar << " , "
1087-
<< Coord[0] << ", "<< Coord[1] << ", "<< Coord[2] << ", " << endl;
1088-
cout <<"__ "<< Coord_Corner_Points[Index[iVar][jVar]][0] << ", "<< Coord_Corner_Points[Index[iVar][jVar]][1] << ", "<< Coord_Corner_Points[Index[iVar][jVar]][2] << ", " << endl;
1089-
cout <<"__ "<< Coord_Corner_Points[Index[iVar][jVar+1]][0] << ", "<< Coord_Corner_Points[Index[iVar][jVar+1]][1] << ", "<< Coord_Corner_Points[Index[iVar][jVar+1]][2] << ", " << endl;
1090-
cout <<"__ "<< Coord_Corner_Points[Index[iVar][jVar+2]][0] << ", "<< Coord_Corner_Points[Index[iVar][jVar+2]][1] << ", "<< Coord_Corner_Points[Index[iVar][jVar+2]][2] << ", " << endl;
1091-
cout <<"__ "<< Coord_Corner_Points[Index[iVar][jVar+3]][0] << ", "<< Coord_Corner_Points[Index[iVar][jVar+3]][1] << ", "<< Coord_Corner_Points[Index[iVar][jVar+3]][2] << ", " << endl;
1092-
cout << "__ dp = " << Distance_Point << " , " << Distance_Vertex << ", inside="<<Inside << endl;
1093-
10941055
}
1095-
if (Inside) break;
10961056
}
1097-
*/
10981057

1099-
cout << "inside = " << Inside << endl;
11001058
return Inside;
11011059

11021060
}

Common/src/grid_movement/CSurfaceMovement.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ vector<vector<su2double> > CSurfaceMovement::SetSurface_Deformation(CGeometry *g
9595
}
9696

9797

98-
cout << "nijso" << endl;
99-
10098
/*--- Create a unitary FFDBox as baseline for other FFDBoxes shapes ---*/
10199

102100
CFreeFormDefBox FFDBox_unitary(Degree_Unitary, BSpline_Unitary, BEZIER);
@@ -118,7 +116,6 @@ cout << "nijso" << endl;
118116

119117
/*--- Compute the parametric coordinates, it also find the points in
120118
the FFDBox using the parametrics coordinates ---*/
121-
cout << "nijso: setparametriccoord" << endl;
122119
SetParametricCoord(geometry, config, FFDBox[iFFDBox], iFFDBox);
123120

124121

@@ -744,13 +741,11 @@ void CSurfaceMovement::SetParametricCoord(CGeometry *geometry, CConfig *config,
744741
bool cylindrical = (config->GetFFD_CoordSystem() == CYLINDRICAL);
745742
bool spherical = (config->GetFFD_CoordSystem() == SPHERICAL);
746743
bool polar = (config->GetFFD_CoordSystem() == POLAR);
747-
cout << "nijso: set parametric coord" << endl;
748744
/*--- Change order and control points reduce the
749745
complexity of the point inversion (this only works with boxes,
750746
in case of Bezier curves, and we maintain an internal copy)---*/
751747

752748
if (BoxFFD && (config->GetFFD_Blending() == BEZIER)) {
753-
cout << "nijso: blending is bezier" << endl;
754749
for (iOrder = 0; iOrder < 2; iOrder++) {
755750
for (jOrder = 0; jOrder < 2; jOrder++) {
756751
for (kOrder = 0; kOrder < 2; kOrder++) {
@@ -787,12 +782,8 @@ cout << "nijso: blending is bezier" << endl;
787782
TotalVertex++;
788783

789784
for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) {
790-
cout <<"nijso, marker = " << iMarker<< " , "<< config->GetMarker_All_DV(iMarker) << endl;
791785
if (config->GetMarker_All_DV(iMarker) == YES) {
792-
cout <<"nijso, considering marker = " << iMarker << endl;
793-
794786
for (iVertex = 0; iVertex < geometry->nVertex[iMarker]; iVertex++) {
795-
cout <<"nijso, considering vertex = " << iVertex << endl;
796787

797788
/*--- Get the cartesian coordinates ---*/
798789

SU2_CFD/include/solvers/CFVMFlowSolverBase.inl

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -689,34 +689,8 @@ void CFVMFlowSolverBase<V, R>::SetInletAtVertex(const su2double* val_inlet, unsi
689689
unsigned short P_position = nDim + 1;
690690
unsigned short FlowDir_position = nDim + 2;
691691

692-
/*--- Check that the norm of the flow unit vector is actually 1 ---*/
692+
/*--- Note that it is not necessary anymore to use normalized normals for the inlet velocity ---*/
693693

694-
su2double norm = 0.0;
695-
for (unsigned short iDim = 0; iDim < nDim; iDim++) {
696-
norm += pow(val_inlet[FlowDir_position + iDim], 2);
697-
}
698-
norm = sqrt(norm);
699-
700-
/*--- The tolerance here needs to be loose. When adding a very
701-
* small number (1e-10 or smaller) to a number close to 1.0, floating
702-
* point roundoff errors can occur. ---*/
703-
704-
/*
705-
if (abs(norm - 1.0) > 1e-6) {
706-
ostringstream error_msg;
707-
error_msg << "ERROR: Found these values in columns ";
708-
error_msg << FlowDir_position << " - ";
709-
error_msg << FlowDir_position + nDim - 1 << endl;
710-
error_msg << std::scientific;
711-
error_msg << " [" << val_inlet[FlowDir_position];
712-
error_msg << ", " << val_inlet[FlowDir_position + 1];
713-
if (nDim == 3) error_msg << ", " << val_inlet[FlowDir_position + 2];
714-
error_msg << "]" << endl;
715-
error_msg << " These values should be components of a unit vector for direction," << endl;
716-
error_msg << " but their magnitude is: " << norm << endl;
717-
SU2_MPI::Error(error_msg.str(), CURRENT_FUNCTION);
718-
}
719-
*/
720694

721695
/*--- Store the values in our inlet data structures. ---*/
722696

SU2_CFD/src/output/CFlowOutput.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3295,10 +3295,9 @@ bool CFlowOutput::WriteVolume_Output(CConfig *config, unsigned long Iter, bool f
32953295
FileFormat[iFile] == OUTPUT_TYPE::CSV)
32963296
writeRestart = true;
32973297

3298-
// nijso: we should only do this for restarts
3298+
/* only write 'double' files for the restart files */
32993299
if ((config->GetTime_Marching() == TIME_MARCHING::DT_STEPPING_2ND) &&
3300-
((Iter == 0) ||
3301-
(Iter % VolumeFrequencies[iFile] == 0) ||
3300+
((Iter == 0) || (Iter % VolumeFrequencies[iFile] == 0) ||
33023301
(((Iter+1) % VolumeFrequencies[iFile] == 0) && writeRestart==true) || // Restarts need 2 old solutions.
33033302
(((Iter+2) == config->GetnTime_Iter()) && writeRestart==true))){ // The last timestep is written anyway but one needs the step before for restarts.
33043303
return true;

SU2_CFD/src/output/COutput.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ void COutput::Load_Data(CGeometry *geometry, CConfig *config, CSolver** solver_c
359359
}
360360

361361
void COutput::WriteToFile(CConfig *config, CGeometry *geometry, OUTPUT_TYPE format, string fileName){
362+
362363
CFileWriter *fileWriter = nullptr;
363364

364365
/*--- if it is still present, strip the extension (suffix) from the filename ---*/

0 commit comments

Comments
 (0)