Skip to content

Commit b944184

Browse files
committed
change discrete adjoint defaults
1 parent 2d15a9a commit b944184

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Common/src/CConfig.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,8 +1087,13 @@ void CConfig::SetConfig_Options() {
10871087
addBoolOption("MULTIZONE", Multizone_Problem, NO);
10881088
/*!\brief PHYSICAL_PROBLEM \n DESCRIPTION: Physical governing equations \n Options: see \link Solver_Map \endlink \n DEFAULT: NO_SOLVER \ingroup Config*/
10891089
addEnumOption("MULTIZONE_SOLVER", Kind_MZSolver, Multizone_Map, MZ_BLOCK_GAUSS_SEIDEL);
1090+
#ifdef CODI_REVERSE_TYPE
1091+
const bool discAdjDefault = true;
1092+
#else
1093+
const bool discAdjDefault = false;
1094+
#endif
10901095
/*!\brief MATH_PROBLEM \n DESCRIPTION: Mathematical problem \n Options: DIRECT, ADJOINT \ingroup Config*/
1091-
addMathProblemOption("MATH_PROBLEM", ContinuousAdjoint, false, DiscreteAdjoint, false, Restart_Flow, false);
1096+
addMathProblemOption("MATH_PROBLEM", ContinuousAdjoint, false, DiscreteAdjoint, discAdjDefault, Restart_Flow, false);
10921097
/*!\brief KIND_TURB_MODEL \n DESCRIPTION: Specify turbulence model \n Options: see \link Turb_Model_Map \endlink \n DEFAULT: NO_TURB_MODEL \ingroup Config*/
10931098
addEnumOption("KIND_TURB_MODEL", Kind_Turb_Model, Turb_Model_Map, NO_TURB_MODEL);
10941099
/*!\brief KIND_TRANS_MODEL \n DESCRIPTION: Specify transition model OPTIONS: see \link Trans_Model_Map \endlink \n DEFAULT: NO_TRANS_MODEL \ingroup Config*/
@@ -4847,6 +4852,10 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
48474852
}
48484853
#endif
48494854

4855+
/*--- Use the same linear solver on the primal as the one used in the adjoint. ---*/
4856+
Kind_Linear_Solver = Kind_DiscAdj_Linear_Solver;
4857+
Kind_Linear_Solver_Prec = Kind_DiscAdj_Linear_Prec;
4858+
48504859
/*--- Disable writing of limiters if enabled ---*/
48514860
Wrt_Limiters = false;
48524861

0 commit comments

Comments
 (0)