Skip to content

Commit

Permalink
Merge pull request #2381 from su2code/fix_segfaults
Browse files Browse the repository at this point in the history
Add some checks for bad setup
  • Loading branch information
pcarruscag authored Nov 16, 2024
2 parents c2da451 + a590f82 commit cde8892
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3481,6 +3481,22 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
if (Kind_Solver == MAIN_SOLVER::INC_RANS && Kind_Turb_Model == TURB_MODEL::NONE){
SU2_MPI::Error("A turbulence model must be specified with KIND_TURB_MODEL if SOLVER= INC_RANS", CURRENT_FUNCTION);
}
if (Kind_Turb_Model == TURB_MODEL::NONE && Kind_Trans_Model != TURB_TRANS_MODEL::NONE) {
SU2_MPI::Error("KIND_TURB_MODEL cannot be NONE to use a transition model", CURRENT_FUNCTION);
}
switch (Kind_Solver) {
case MAIN_SOLVER::EULER:
case MAIN_SOLVER::INC_EULER:
case MAIN_SOLVER::FEM_EULER:
case MAIN_SOLVER::NEMO_EULER:
if (nMarker_HeatFlux + nMarker_Isothermal + nMarker_HeatTransfer +
nMarker_Smoluchowski_Maxwell + nMarker_CHTInterface > 0) {
SU2_MPI::Error("Euler solvers are only compatible with slip walls (MARKER_EULER)", CURRENT_FUNCTION);
}
break;
default:
break;
}

/*--- Postprocess SST_OPTIONS into structure. ---*/
if (Kind_Turb_Model == TURB_MODEL::SST) {
Expand Down

0 comments on commit cde8892

Please sign in to comment.