Skip to content

Commit 5360ece

Browse files
Apply suggestions from code review
Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com>
1 parent 30af929 commit 5360ece

5 files changed

Lines changed: 16 additions & 15 deletions

File tree

Common/src/CConfig.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4332,9 +4332,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
43324332
}
43334333
}
43344334

4335-
if(Kind_TimeIntScheme_Turb==RUNGE_KUTTA_EXPLICIT ||
4336-
Kind_TimeIntScheme_Turb==CLASSICAL_RK4_EXPLICIT ||
4337-
Kind_TimeIntScheme_Turb==ADER_DG){
4335+
if(Kind_TimeIntScheme_Turb != EULER_IMPLICIT &&
4336+
Kind_TimeIntScheme_Turb != EULER_EXPLICIT){
43384337
SU2_MPI::Error("Only TIME_DISCRE_TURB = EULER_IMPLICIT, EULER_EXPLICIT have been implemented.", CURRENT_FUNCTION);
43394338
}
43404339

SU2_CFD/include/solvers/CScalarSolver.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,12 +402,12 @@ void CScalarSolver<VariableType>::ExplicitEuler_Iteration(CGeometry* geometry, C
402402
unsigned long idxMax[MAXNVAR] = {0};
403403

404404
SU2_OMP_FOR_STAT(omp_chunk_size)
405-
for(unsigned long iPoint=0; iPoint<nPointDomain; iPoint++) {
405+
for(unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) {
406406
const su2double dt = nodes->GetLocalCFL(iPoint) / flowNodes->GetLocalCFL(iPoint) * flowNodes->GetDelta_Time(iPoint);
407407
nodes->SetDelta_Time(iPoint, dt);
408408
const su2double Vol = geometry->nodes->GetVolume(iPoint) + geometry->nodes->GetPeriodicVolume(iPoint);
409409

410-
for(auto iVar=0u; iVar < nVar; iVar++){
410+
for(auto iVar = 0u; iVar < nVar; iVar++){
411411
/*--- "Add" residual at (iPoint,iVar) to local residual variables. ---*/
412412
ResidualReductions_PerThread(iPoint, iVar, LinSysRes(iPoint, iVar), resRMS, resMax, idxMax);
413413
/*--- Explicit Euler step: ---*/

SU2_CFD/include/solvers/CSolver.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4330,7 +4330,7 @@ class CSolver {
43304330
}
43314331

43324332
/*!
4333-
* \brief Adds the maximal residual, this is useful for the convergence history (overload).
4333+
* \brief Adds the maximal residual, this is useful for the convergence history.
43344334
* \param[in] val_var - Index of the variable.
43354335
* \param[in] val_residual - Value of the residual to store in the position <i>val_var</i>.
43364336
* \param[in] val_point - Value of the point index for the max residual.

SU2_CFD/src/solvers/CFEASolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1857,7 +1857,7 @@ void CFEASolver::Postprocessing(CGeometry *geometry, CConfig *config, CNumerics
18571857
for (auto iPoint = 0ul; iPoint < nPointDomain; iPoint++) {
18581858
for (auto iVar = 0ul; iVar < nVar; iVar++) {
18591859
/*--- "Add" residual at (iPoint,iVar) to local residual variables. ---*/
1860-
ResidualReductions_PerThread(iPoint,iVar,ResidualAux(iPoint, iVar),resRMS,resMax,idxMax);
1860+
ResidualReductions_PerThread(iPoint, iVar, ResidualAux(iPoint, iVar), resRMS, resMax, idxMax);
18611861
}
18621862
}
18631863
END_SU2_OMP_FOR

TestCases/rans/naca0012/turb_NACA0012_sst_expliciteuler.cfg

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22
% %
33
% SU2 configuration file %
4-
% Case description: Testing explicit solution of flow and turbulence equations
5-
% Author: Max Aehle
6-
% Institution: TU Kaiserslautern
4+
% Case description: Testing explicit solution of flow and turbulence equations %
5+
% Author: Max Aehle %
6+
% Institution: TU Kaiserslautern %
77
% Date: Nov 17th, 2021 %
88
% File Version 7.2.1 "Blackbird" %
99
% %
@@ -65,13 +65,15 @@ CONV_CAUCHY_EPS= 1E-6
6565
% ------------------------- INPUT/OUTPUT INFORMATION --------------------------%
6666
MESH_FILENAME= n0012_113-33.su2
6767
MESH_FORMAT= SU2
68-
MESH_OUT_FILENAME= mesh_out.su2
69-
SOLUTION_FILENAME= solution_flow_sst_expliciteuler.dat
68+
%
69+
SCREEN_OUTPUT= (INNER_ITER, RMS_DENSITY, RMS_TKE, RMS_DISSIPATION, LIFT, DRAG, LINSOL_RESIDUAL)
70+
%
7071
TABULAR_FORMAT= CSV
7172
CONV_FILENAME= history
73+
%
74+
OUTPUT_FILES= (RESTART_ASCII, PARAVIEW, SURFACE_PARAVIEW)
75+
OUTPUT_WRT_FREQ= 10000
7276
RESTART_FILENAME= restart_flow.dat
77+
SOLUTION_FILENAME= solution_flow_sst_expliciteuler.dat
7378
VOLUME_FILENAME= flow
7479
SURFACE_FILENAME= surface_flow
75-
OUTPUT_WRT_FREQ= 10000
76-
SCREEN_OUTPUT= (INNER_ITER, RMS_DENSITY, RMS_TKE, RMS_DISSIPATION, LIFT, DRAG, LINSOL_RESIDUAL)
77-
OUTPUT_FILES= (RESTART_ASCII, PARAVIEW, SURFACE_PARAVIEW)

0 commit comments

Comments
 (0)