Skip to content

Commit

Permalink
remove cout statements
Browse files Browse the repository at this point in the history
  • Loading branch information
bigfooted committed Mar 29, 2024
1 parent b0f7a21 commit 85ceb0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 29 deletions.
9 changes: 4 additions & 5 deletions SU2_CFD/include/gradients/computeGradientsGreenGauss.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ void computeGradientsGreenGauss(CSolver* solver, MPI_QUANTITIES kindMpiComm, PER
const size_t nPointDomain = geometry.GetnPointDomain();


cout << "Green Gauss: solver name = " << solver->GetSolverName() << endl;
cout << "number of variables = " << varEnd << endl;
cout << "commtype= = " << kindMpiComm << endl;
cout << "viscous = " << config.GetViscous();
// cout << "Green Gauss: solver name = " << solver->GetSolverName() << endl;
// cout << "number of variables = " << varEnd << endl;
// cout << "commtype= = " << kindMpiComm << endl;
// cout << "viscous = " << config.GetViscous();

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
bool isFlowSolver = solver->GetSolverName().find("FLOW") != string::npos;

#ifdef HAVE_OMP
Expand All @@ -93,7 +93,6 @@ void computeGradientsGreenGauss(CSolver* solver, MPI_QUANTITIES kindMpiComm, PER
static constexpr size_t MAXNVAR = 20;
static constexpr size_t MAXNDIM = 3;
static constexpr size_t MAXNSYMS = 5;
//bool sym2 = false;

/*--- Allocation of primitive gradient arrays for viscous fluxes. ---*/
su2activematrix Grad_Reflected(varEnd, nDim);
Expand Down
24 changes: 0 additions & 24 deletions SU2_CFD/include/solvers/CFVMFlowSolverBase.inl
Original file line number Diff line number Diff line change
Expand Up @@ -1110,23 +1110,16 @@ void CFVMFlowSolverBase<V, R>::BC_Sym_Plane(CGeometry* geometry, CSolver** solve
for (size_t iMarker = 0; iMarker < geometry->GetnMarker(); ++iMarker) {
if (config->GetMarker_All_KindBC(iMarker) == SYMMETRY_PLANE) {
Syms[nSym] = iMarker;
//cout << nSym<<", symmetry="<<Syms[nSym] << endl;
nSym++;
}
}
//cout <<"nr of symmetries = " << nSym<<endl;

/*--- Loop over all the vertices on this boundary marker. ---*/

SU2_OMP_FOR_DYN(OMP_MIN_SIZE)
for (auto iVertex = 0ul; iVertex < geometry->nVertex[val_marker]; iVertex++) {
const auto iPoint = geometry->vertex[val_marker][iVertex]->GetNode();

const su2double *coor = geometry->nodes->GetCoord(iPoint);

//if ((coor[0]>-1) && (coor[0] < 0.0) && (coor[1] < 0.001))
// cout <<val_marker<<" , "<<iPoint << ", coordinates = " << coor[0] << " , " << coor[1] << endl;

/*--- Halo points do not need to be considered. ---*/
if (!geometry->nodes->GetDomain(iPoint)) continue;

Expand All @@ -1146,35 +1139,22 @@ void CFVMFlowSolverBase<V, R>::BC_Sym_Plane(CGeometry* geometry, CSolver** solve
// at this point we can find out if the node is shared with another symmetry.
// step 1: do we have other symmetries?
if (nSym>1) {
//cout << "we have multiple symmetries" << endl;
// step 2: are we on a shared node?
for (auto iMarker=0;iMarker<nSym;iMarker++) {
// we do not need the current symmetry
if (val_marker!= Syms[iMarker]) {
//cout << "we are on symmetry " << val_marker << " and checking intersections with symmetry " << Syms[iMarker] << endl;
// loop over all points on the other symmetry and check if current iPoint is on the symmetry
for (auto jVertex = 0ul; jVertex < geometry->nVertex[Syms[iMarker]]; jVertex++) {
const auto jPoint = geometry->vertex[Syms[iMarker]][jVertex]->GetNode();
if (iPoint==jPoint) {
// cout << "point "
// << iPoint
// << ", coords "
// << coor[0]
// << ", "
// << coor[1]
// << " is shared by symmetry"
// << endl;
// Does the other symmetry have a lower ID? Then that is the primary symmetry
if (Syms[iMarker]<val_marker) {
//cout << "current marker ID = " << val_marker << ", other marker ID = " << Syms[iMarker] << endl;
// so we have to get the normal of that other marker
geometry->vertex[Syms[iMarker]][jVertex]->GetNormal(NormalPrim);
su2double AreaPrim = GeometryToolbox::Norm(nDim, NormalPrim);
for(unsigned short iDim = 0; iDim < nDim; iDim++) {
UnitNormalPrim[iDim] = NormalPrim[iDim] / AreaPrim;
}
//cout << "primary normal from "<<UnitNormalPrim[0] << ", "<<UnitNormalPrim[1] <<", "<<UnitNormalPrim[2] << endl;
//cout << "current unit normal from "<<UnitNormal[0] << ", "<<UnitNormal[1] <<", "<<UnitNormal[2] << endl;
// correct the current normal as n2_new = n2 - (n2.n1).n1
su2double ProjNorm = 0.0;
for (auto iDim = 0u; iDim < nDim; iDim++) ProjNorm += UnitNormal[iDim] * UnitNormalPrim[iDim];
Expand All @@ -1185,12 +1165,8 @@ void CFVMFlowSolverBase<V, R>::BC_Sym_Plane(CGeometry* geometry, CSolver** solve
su2double newarea=GeometryToolbox::Norm(nDim, UnitNormal);
for (auto iDim = 0u; iDim < nDim; iDim++) UnitNormal[iDim] = UnitNormal[iDim]/newarea;
}
//cout << "setting shared symmetry to true, Pn="<<ProjNorm << endl;
//cout << " new unit normal "<<UnitNormal[0] << ", "<<UnitNormal[1] <<", "<<UnitNormal[2] << endl;
//sym2 = true;
}
}

}
}
}
Expand Down

0 comments on commit 85ceb0c

Please sign in to comment.