Skip to content

Commit e93f5c4

Browse files
committed
Add setGlobalParams in all Preprocessing routines
1 parent 04533a5 commit e93f5c4

8 files changed

Lines changed: 13 additions & 4 deletions

File tree

SU2_CFD/src/solvers/CDiscAdjSolver.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ void CDiscAdjSolver::SetSurface_Sensitivity(CGeometry *geometry, CConfig *config
572572

573573
void CDiscAdjSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh,
574574
unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output) {
575+
config->SetGlobalParam(config->GetKind_Solver(), RunTime_EqSystem);
575576

576577
const bool dual_time = (config->GetTime_Marching() == TIME_MARCHING::DT_STEPPING_1ST) ||
577578
(config->GetTime_Marching() == TIME_MARCHING::DT_STEPPING_2ND);

SU2_CFD/src/solvers/CEulerSolver.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,6 +1565,7 @@ void CEulerSolver::CommonPreprocessing(CGeometry *geometry, CSolver **solver_con
15651565

15661566
void CEulerSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh,
15671567
unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output) {
1568+
config->SetGlobalParam(config->GetKind_Solver(), RunTime_EqSystem);
15681569

15691570
const auto InnerIter = config->GetInnerIter();
15701571
const bool muscl = config->GetMUSCL_Flow() && (iMesh == MESH_0);

SU2_CFD/src/solvers/CHeatSolver.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ CHeatSolver::~CHeatSolver(void) {
187187
}
188188

189189
void CHeatSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output) {
190+
config->SetGlobalParam(config->GetKind_Solver(), RunTime_EqSystem);
190191

191192
if (config->GetKind_ConvNumScheme_Heat() == SPACE_CENTERED) {
192193
SetUndivided_Laplacian(geometry, config);
@@ -459,7 +460,7 @@ void CHeatSolver::Viscous_Residual(CGeometry *geometry, CSolver **solver_contain
459460
su2double laminar_viscosity, Prandtl_Lam, Prandtl_Turb, eddy_viscosity_i, eddy_viscosity_j,
460461
thermal_diffusivity_i, thermal_diffusivity_j, Temp_i, Temp_j;
461462

462-
const bool turb = ((config->GetKind_Solver() == MAIN_SOLVER::INC_RANS) || (config->GetKind_Solver() == MAIN_SOLVER::DISC_ADJ_INC_RANS));
463+
const bool turb = ((config->GetKind_Solver() == INC_RANS) || (config->GetKind_Solver() == DISC_ADJ_INC_RANS));
463464

464465
eddy_viscosity_i = 0.0;
465466
eddy_viscosity_j = 0.0;
@@ -1039,7 +1040,7 @@ void CHeatSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container,
10391040
su2double Global_Delta_Time = 0.0, Global_Delta_UnstTimeND = 0.0, Local_Delta_Time = 0.0, Local_Delta_Time_Inv, Local_Delta_Time_Visc, CFL_Reduction, K_v = 0.25;
10401041
const su2double* Normal;
10411042

1042-
const bool turb = ((config->GetKind_Solver() == MAIN_SOLVER::INC_RANS) || (config->GetKind_Solver() == MAIN_SOLVER::DISC_ADJ_INC_RANS));
1043+
const bool turb = ((config->GetKind_Solver() == INC_RANS) || (config->GetKind_Solver() == DISC_ADJ_INC_RANS));
10431044
const bool dual_time = ((config->GetTime_Marching() == TIME_MARCHING::DT_STEPPING_1ST) ||
10441045
(config->GetTime_Marching() == TIME_MARCHING::DT_STEPPING_2ND));
10451046
const bool implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT);

SU2_CFD/src/solvers/CIncEulerSolver.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,7 @@ void CIncEulerSolver::CommonPreprocessing(CGeometry *geometry, CSolver **solver_
913913

914914
void CIncEulerSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh,
915915
unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output) {
916+
config->SetGlobalParam(config->GetKind_Solver(), RunTime_EqSystem);
916917

917918
const auto InnerIter = config->GetInnerIter();
918919
const bool muscl = config->GetMUSCL_Flow() && (iMesh == MESH_0);

SU2_CFD/src/solvers/CNEMOEulerSolver.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ void CNEMOEulerSolver::Preprocessing(CGeometry *geometry, CSolver **solver_conta
292292
CConfig *config, unsigned short iMesh,
293293
unsigned short iRKStep,
294294
unsigned short RunTime_EqSystem, bool Output) {
295+
config->SetGlobalParam(config->GetKind_Solver(), RunTime_EqSystem);
295296

296297
const unsigned long InnerIter = config->GetInnerIter();
297298
const bool muscl = config->GetMUSCL_Flow() && (iMesh == MESH_0);

SU2_CFD/src/solvers/CSpeciesSolver.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ void CSpeciesSolver::LoadRestart(CGeometry** geometry, CSolver*** solver, CConfi
248248
solver[MESH_0][TURB_SOL]->Postprocessing(geometry[MESH_0], solver[MESH_0], config, MESH_0);
249249
// For feature_multicomp this Scalar-Pre only computes the laminar contribution to mass diffusivity
250250
solver[MESH_0][SPECIES_SOL]->Preprocessing(geometry[MESH_0], solver[MESH_0], config, MESH_0, NO_RK_ITER,
251-
RUNTIME_FLOW_SYS, false);
251+
RUNTIME_SPECIES_SYS, false);
252252

253253
/*--- Interpolate the solution down to the coarse multigrid levels ---*/
254254

@@ -282,7 +282,7 @@ void CSpeciesSolver::LoadRestart(CGeometry** geometry, CSolver*** solver, CConfi
282282
solver[iMesh][TURB_SOL]->Postprocessing(geometry[MESH_0], solver[MESH_0], config, MESH_0);
283283

284284
solver[iMesh][SPECIES_SOL]->Preprocessing(geometry[MESH_0], solver[MESH_0], config, MESH_0, NO_RK_ITER,
285-
RUNTIME_FLOW_SYS, false);
285+
RUNTIME_SPECIES_SYS, false);
286286
}
287287

288288
/*--- Go back to single threaded execution. ---*/
@@ -301,6 +301,7 @@ void CSpeciesSolver::LoadRestart(CGeometry** geometry, CSolver*** solver, CConfi
301301
void CSpeciesSolver::Preprocessing(CGeometry* geometry, CSolver** solver_container, CConfig* config,
302302
unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem,
303303
bool Output) {
304+
config->SetGlobalParam(config->GetKind_Solver(), RunTime_EqSystem);
304305

305306
/*--- Set the laminar mass Diffusivity for the species solver. ---*/
306307
SU2_OMP_FOR_STAT(omp_chunk_size)

SU2_CFD/src/solvers/CTurbSASolver.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ CTurbSASolver::CTurbSASolver(CGeometry *geometry, CConfig *config, unsigned shor
181181

182182
void CTurbSASolver::Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config,
183183
unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output) {
184+
config->SetGlobalParam(config->GetKind_Solver(), RunTime_EqSystem);
184185

185186
const auto kind_hybridRANSLES = config->GetKind_HybridRANSLES();
186187

SU2_CFD/src/solvers/CTurbSSTSolver.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh
184184

185185
void CTurbSSTSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config,
186186
unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output) {
187+
config->SetGlobalParam(config->GetKind_Solver(), RunTime_EqSystem);
188+
187189
/*--- Upwind second order reconstruction and gradients ---*/
188190
CommonPreprocessing(geometry, config, Output);
189191
}

0 commit comments

Comments
 (0)