Skip to content

Commit cde8892

Browse files
authored
Merge pull request #2381 from su2code/fix_segfaults
Add some checks for bad setup
2 parents c2da451 + a590f82 commit cde8892

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Common/src/CConfig.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3481,6 +3481,22 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
34813481
if (Kind_Solver == MAIN_SOLVER::INC_RANS && Kind_Turb_Model == TURB_MODEL::NONE){
34823482
SU2_MPI::Error("A turbulence model must be specified with KIND_TURB_MODEL if SOLVER= INC_RANS", CURRENT_FUNCTION);
34833483
}
3484+
if (Kind_Turb_Model == TURB_MODEL::NONE && Kind_Trans_Model != TURB_TRANS_MODEL::NONE) {
3485+
SU2_MPI::Error("KIND_TURB_MODEL cannot be NONE to use a transition model", CURRENT_FUNCTION);
3486+
}
3487+
switch (Kind_Solver) {
3488+
case MAIN_SOLVER::EULER:
3489+
case MAIN_SOLVER::INC_EULER:
3490+
case MAIN_SOLVER::FEM_EULER:
3491+
case MAIN_SOLVER::NEMO_EULER:
3492+
if (nMarker_HeatFlux + nMarker_Isothermal + nMarker_HeatTransfer +
3493+
nMarker_Smoluchowski_Maxwell + nMarker_CHTInterface > 0) {
3494+
SU2_MPI::Error("Euler solvers are only compatible with slip walls (MARKER_EULER)", CURRENT_FUNCTION);
3495+
}
3496+
break;
3497+
default:
3498+
break;
3499+
}
34843500

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

0 commit comments

Comments
 (0)