Skip to content

Commit bb0b8e6

Browse files
committed
Merge branch 'develop' into py_wrapper_outputs
2 parents b4368db + 3f68501 commit bb0b8e6

124 files changed

Lines changed: 501 additions & 971 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Common/include/option_structure.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,6 @@ enum class UPWIND {
820820
MSW, /*!< \brief Modified Steger-Warming method. */
821821
TURKEL, /*!< \brief Roe-Turkel's upwind numerical method. */
822822
SLAU, /*!< \brief Simple Low-Dissipation AUSM numerical method. */
823-
CUSP, /*!< \brief Convective upwind and split pressure numerical method. */
824823
CONVECTIVE_TEMPLATE, /*!< \brief Template for new numerical method . */
825824
L2ROE, /*!< \brief L2ROE numerical method . */
826825
LMROE, /*!< \brief Rieper's Low Mach ROE numerical method . */
@@ -844,7 +843,6 @@ static const MapType<std::string, UPWIND> Upwind_Map = {
844843
MakePair("HLLC", UPWIND::HLLC)
845844
MakePair("SW", UPWIND::SW)
846845
MakePair("MSW", UPWIND::MSW)
847-
MakePair("CUSP", UPWIND::CUSP)
848846
MakePair("SCALAR_UPWIND", UPWIND::SCALAR_UPWIND)
849847
MakePair("BOUNDED_SCALAR", UPWIND::BOUNDED_SCALAR)
850848
MakePair("CONVECTIVE_TEMPLATE", UPWIND::CONVECTIVE_TEMPLATE)

Common/src/CConfig.cpp

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,7 +1909,7 @@ void CConfig::SetConfig_Options() {
19091909
* \n DESCRIPTION: Convective numerical method for the adjoint solver.
19101910
* \n OPTIONS: See \link Upwind_Map \endlink , \link Centered_Map \endlink. Note: not all methods are guaranteed to be implemented for the adjoint solver. \ingroup Config */
19111911
addConvectOption("CONV_NUM_METHOD_ADJFLOW", Kind_ConvNumScheme_AdjFlow, Kind_Centered_AdjFlow, Kind_Upwind_AdjFlow);
1912-
/*!\brief MUSCL_FLOW \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/
1912+
/*!\brief MUSCL_ADJFLOW \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/
19131913
addBoolOption("MUSCL_ADJFLOW", MUSCL_AdjFlow, true);
19141914
/*!\brief SLOPE_LIMITER_ADJFLOW
19151915
* DESCRIPTION: Slope limiter for the adjoint solution. \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config*/
@@ -1920,7 +1920,7 @@ void CConfig::SetConfig_Options() {
19201920
/*!\brief LAX_SENSOR_COEFF \n DESCRIPTION: 1st order artificial dissipation coefficients for the adjoint Lax-Friedrichs method. \ingroup Config*/
19211921
addDoubleOption("ADJ_LAX_SENSOR_COEFF", Kappa_1st_AdjFlow, 0.15);
19221922

1923-
/*!\brief MUSCL_FLOW \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/
1923+
/*!\brief MUSCL_TURB \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/
19241924
addBoolOption("MUSCL_TURB", MUSCL_Turb, false);
19251925
/*!\brief SLOPE_LIMITER_TURB
19261926
* \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config*/
@@ -1929,7 +1929,7 @@ void CConfig::SetConfig_Options() {
19291929
* \n DESCRIPTION: Convective numerical method \ingroup Config*/
19301930
addConvectOption("CONV_NUM_METHOD_TURB", Kind_ConvNumScheme_Turb, Kind_Centered_Turb, Kind_Upwind_Turb);
19311931

1932-
/*!\brief MUSCL_FLOW \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/
1932+
/*!\brief MUSCL_ADJTURB \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/
19331933
addBoolOption("MUSCL_ADJTURB", MUSCL_AdjTurb, false);
19341934
/*!\brief SLOPE_LIMITER_ADJTURB
19351935
* \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config */
@@ -1944,7 +1944,7 @@ void CConfig::SetConfig_Options() {
19441944
/*!\brief CONV_NUM_METHOD_SPECIES \n DESCRIPTION: Convective numerical method for species transport \ingroup Config*/
19451945
addConvectOption("CONV_NUM_METHOD_SPECIES", Kind_ConvNumScheme_Species, Kind_Centered_Species, Kind_Upwind_Species);
19461946

1947-
/*!\brief MUSCL_FLOW \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/
1947+
/*!\brief MUSCL_HEAT \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/
19481948
addBoolOption("MUSCL_HEAT", MUSCL_Heat, false);
19491949
/*!\brief SLOPE_LIMITER_HEAT \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT NONE \ingroup Config*/
19501950
addEnumOption("SLOPE_LIMITER_HEAT", Kind_SlopeLimit_Heat, Limiter_Map, LIMITER::NONE);
@@ -3560,6 +3560,21 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
35603560
SetScalarDefaults(MUSCL_Heat, Kind_ConvNumScheme_Heat, Kind_Upwind_Heat, Kind_SlopeLimit_Heat);
35613561
SetScalarDefaults(MUSCL_Species, Kind_ConvNumScheme_Species, Kind_Upwind_Species, Kind_SlopeLimit_Species);
35623562

3563+
if (MUSCL_Flow && (Kind_ConvNumScheme_Flow == SPACE_CENTERED)) {
3564+
if (OptionIsSet("MUSCL_FLOW")) {
3565+
SU2_MPI::Error("Centered schemes do not use MUSCL reconstruction (use MUSCL_FLOW= NO).", CURRENT_FUNCTION);
3566+
} else {
3567+
MUSCL_Flow = false;
3568+
}
3569+
}
3570+
if (MUSCL_AdjFlow && (Kind_ConvNumScheme_AdjFlow == SPACE_CENTERED)) {
3571+
if (OptionIsSet("MUSCL_ADJFLOW")) {
3572+
SU2_MPI::Error("Centered schemes do not use MUSCL reconstruction (use MUSCL_ADJFLOW= NO).", CURRENT_FUNCTION);
3573+
} else {
3574+
MUSCL_AdjFlow = false;
3575+
}
3576+
}
3577+
35633578
if (!MUSCL_Flow || (Kind_ConvNumScheme_Flow == SPACE_CENTERED)) Kind_SlopeLimit_Flow = LIMITER::NONE;
35643579
if (!MUSCL_AdjFlow || (Kind_ConvNumScheme_AdjFlow == SPACE_CENTERED)) Kind_SlopeLimit_AdjFlow = LIMITER::NONE;
35653580
if (!MUSCL_AdjTurb || (Kind_ConvNumScheme_AdjTurb == SPACE_CENTERED)) Kind_SlopeLimit_AdjTurb = LIMITER::NONE;
@@ -5142,8 +5157,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
51425157
Mesh_Box_Size[1] = 33;
51435158
Mesh_Box_Size[2] = 33;
51445159
} else if (nMesh_Box_Size != 3) {
5145-
SU2_MPI::Error(string("MESH_BOX_SIZE specified without 3 values.\n"),
5146-
CURRENT_FUNCTION);
5160+
SU2_MPI::Error("MESH_BOX_SIZE specified without 3 values.\n", CURRENT_FUNCTION);
51475161
}
51485162

51495163
/* Force the lowest memory preconditioner when direct solvers are used. */
@@ -5160,8 +5174,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
51605174
if (DiscreteAdjoint) {
51615175
#if !defined CODI_REVERSE_TYPE
51625176
if (Kind_SU2 == SU2_COMPONENT::SU2_CFD) {
5163-
SU2_MPI::Error(string("SU2_CFD: Config option MATH_PROBLEM= DISCRETE_ADJOINT requires AD support!\n") +
5164-
string("Please use SU2_CFD_AD (configuration/compilation is done using the preconfigure.py script)."),
5177+
SU2_MPI::Error("SU2_CFD: Config option MATH_PROBLEM= DISCRETE_ADJOINT requires AD support!\n"
5178+
"Please use SU2_CFD_AD (configuration/compilation is done using the preconfigure.py script).",
51655179
CURRENT_FUNCTION);
51665180
}
51675181
#endif
@@ -5175,8 +5189,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
51755189
Restart_Flow = false;
51765190

51775191
if (Unst_AdjointIter- long(nTimeIter) < 0){
5178-
SU2_MPI::Error(string("Invalid iteration number requested for unsteady adjoint.\n" ) +
5179-
string("Make sure EXT_ITER is larger or equal than UNST_ADJOINT_ITER."),
5192+
SU2_MPI::Error("Invalid iteration number requested for unsteady adjoint.\n"
5193+
"Make sure EXT_ITER is larger or equal than UNST_ADJOINT_ITER.",
51805194
CURRENT_FUNCTION);
51815195
}
51825196

@@ -5235,8 +5249,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
52355249
turbulence model. */
52365250

52375251
if (MUSCL_AdjTurb) {
5238-
SU2_MPI::Error(string("MUSCL_ADJTURB= YES not currently supported.\n") +
5239-
string("Please select MUSCL_ADJTURB= NO (first-order)."),
5252+
SU2_MPI::Error("MUSCL_ADJTURB= YES not currently supported.\nPlease select MUSCL_ADJTURB= NO (first-order).",
52405253
CURRENT_FUNCTION);
52415254
}
52425255

@@ -5257,9 +5270,11 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
52575270
we also want to avoid recomputation. */
52585271

52595272
ReconstructionGradientRequired = false;
5260-
Kind_Gradient_Method_Recon = Kind_Gradient_Method;
5273+
Kind_Gradient_Method_Recon = Kind_Gradient_Method;
52615274
}
52625275

5276+
} else {
5277+
ReconstructionGradientRequired = false;
52635278
}
52645279

52655280
if (ReconstructionGradientRequired && GetFluidProblem() && Kind_ConvNumScheme_Flow == SPACE_CENTERED)
@@ -6642,7 +6657,6 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
66426657
if (Kind_Upwind_Flow == UPWIND::HLLC) cout << "HLLC solver for the flow inviscid terms."<< endl;
66436658
if (Kind_Upwind_Flow == UPWIND::SW) cout << "Steger-Warming solver for the flow inviscid terms."<< endl;
66446659
if (Kind_Upwind_Flow == UPWIND::MSW) cout << "Modified Steger-Warming solver for the flow inviscid terms."<< endl;
6645-
if (Kind_Upwind_Flow == UPWIND::CUSP) cout << "CUSP solver for the flow inviscid terms."<< endl;
66466660
if (Kind_Upwind_Flow == UPWIND::L2ROE) cout << "L2ROE Low Mach ROE solver for the flow inviscid terms."<< endl;
66476661
if (Kind_Upwind_Flow == UPWIND::LMROE) cout << "Rieper Low Mach ROE solver for the flow inviscid terms."<< endl;
66486662
if (Kind_Upwind_Flow == UPWIND::SLAU) cout << "Simple Low-Dissipation AUSM solver for the flow inviscid terms."<< endl;

QuickStart/inv_NACA0012.cfg

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,9 @@ MG_DAMP_PROLONGATION= 1.0
146146

147147
% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------%
148148
%
149-
% Convective numerical method (JST, LAX-FRIEDRICH, CUSP, ROE, AUSM, HLLC,
150-
% TURKEL_PREC, MSW)
151-
CONV_NUM_METHOD_FLOW= JST
152-
%
153-
% Monotonic Upwind Scheme for Conservation Laws (TVD) in the flow equations.
154-
% Required for 2nd order upwind schemes (NO, YES)
155-
MUSCL_FLOW= YES
149+
% Convective numerical method
156150
%
157-
% Slope limiter (NONE, VENKATAKRISHNAN, VENKATAKRISHNAN_WANG,
158-
% BARTH_JESPERSEN, VAN_ALBADA_EDGE)
159-
SLOPE_LIMITER_FLOW= VENKATAKRISHNAN_WANG
151+
CONV_NUM_METHOD_FLOW= JST
160152
%
161153
% 2nd and 4th order artificial dissipation coefficients
162154
JST_SENSOR_COEFF= ( 0.5, 0.02 )
@@ -169,14 +161,6 @@ TIME_DISCRE_FLOW= EULER_IMPLICIT
169161
% Convective numerical method (JST, LAX-FRIEDRICH, ROE)
170162
CONV_NUM_METHOD_ADJFLOW= JST
171163
%
172-
% Monotonic Upwind Scheme for Conservation Laws (TVD) in the adjoint flow equations.
173-
% Required for 2nd order upwind schemes (NO, YES)
174-
MUSCL_ADJFLOW= YES
175-
%
176-
% Slope limiter (NONE, VENKATAKRISHNAN, BARTH_JESPERSEN, VAN_ALBADA_EDGE,
177-
% SHARP_EDGES, WALL_DISTANCE)
178-
SLOPE_LIMITER_ADJFLOW= NONE
179-
%
180164
% Reduction factor of the CFL coefficient in the adjoint problem
181165
CFL_REDUCTION_ADJFLOW= 0.01
182166
%

SU2_CFD/include/numerics/flow/convection/cusp.hpp

Lines changed: 0 additions & 69 deletions
This file was deleted.

SU2_CFD/include/output/CAdjFlowCompOutput.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ class CAdjFlowCompOutput final: public CAdjFlowOutput {
9292
* \param[in] config - Definition of the particular problem.
9393
* \return <TRUE> if the residuals should be initialized.
9494
*/
95-
bool SetInit_Residuals(const CConfig *config) override;
95+
bool SetInitResiduals(const CConfig *config) override ;
9696

9797
};

SU2_CFD/include/output/CAdjFlowIncOutput.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,6 @@ class CAdjFlowIncOutput final: public CAdjFlowOutput {
9999
* \param[in] config - Definition of the particular problem.
100100
* \return <TRUE> if the residuals should be initialized.
101101
*/
102-
bool SetInit_Residuals(const CConfig *config) override;
102+
bool SetInitResiduals(const CConfig *config) override ;
103103

104104
};

SU2_CFD/include/output/CAdjFlowOutput.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,32 +64,32 @@ class CAdjFlowOutput : public COutput {
6464
/*!
6565
* \brief Add scalar (turbulence/species) history fields for the linear solver (FVMComp, FVMInc, FVMNEMO).
6666
*/
67-
void AddHistoryOutputFields_AdjScalarLinsol(const CConfig* config);
67+
void AddHistoryOutputFieldsAdjScalarLinsol(const CConfig* config);
6868

6969
/*!
7070
* \brief Set all scalar (turbulence/species) history field values.
7171
*/
72-
void LoadHistoryData_AdjScalar(const CConfig* config, const CSolver* const* solver);
72+
void LoadHistoryDataAdjScalar(const CConfig* config, const CSolver* const* solver);
7373

7474
/*!
7575
* \brief Add scalar (turbulence/species) volume solution fields for a point (FVMComp, FVMInc, FVMNEMO).
7676
* \note The order of fields in restart files is fixed. Therefore the split-up.
7777
* \param[in] config - Definition of the particular problem.
7878
*/
79-
void SetVolumeOutputFields_AdjScalarSolution(const CConfig* config);
79+
void SetVolumeOutputFieldsAdjScalarSolution(const CConfig* config);
8080

8181
/*!
8282
* \brief Add scalar (turbulence/species) volume solution fields for a point (FVMComp, FVMInc, FVMNEMO).
8383
* \note The order of fields in restart files is fixed. Therefore the split-up.
8484
* \param[in] config - Definition of the particular problem.
8585
*/
86-
void SetVolumeOutputFields_AdjScalarResidual(const CConfig* config);
86+
void SetVolumeOutputFieldsAdjScalarResidual(const CConfig* config);
8787

8888
/*!
8989
* \brief Set all scalar (turbulence/species) volume field values for a point.
9090
* \param[in] config - Definition of the particular problem.
9191
* \param[in] solver - The container holding all solution data.
9292
* \param[in] iPoint - Index of the point.
9393
*/
94-
void LoadVolumeData_AdjScalar(const CConfig* config, const CSolver* const* solver, const unsigned long iPoint);
94+
void LoadVolumeDataAdjScalar(const CConfig* config, const CSolver* const* solver, const unsigned long iPoint);
9595
};

SU2_CFD/include/output/CElasticityOutput.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ class CElasticityOutput final: public COutput {
8282
* \param[in] config - Definition of the particular problem.
8383
* \return <TRUE> if the residuals should be initialized.
8484
*/
85-
bool SetInit_Residuals(const CConfig *config) override;
85+
bool SetInitResiduals(const CConfig *config) override ;
8686

8787
};

SU2_CFD/include/output/CFlowCompFEMOutput.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,6 @@ class CFlowCompFEMOutput final: public CFlowOutput {
8989
* \param[in] config - Definition of the particular problem.
9090
* \return <TRUE> if the residuals should be initialized.
9191
*/
92-
bool SetInit_Residuals(const CConfig *config) override;
92+
bool SetInitResiduals(const CConfig *config) override ;
9393

9494
};

SU2_CFD/include/output/CFlowCompOutput.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class CFlowCompOutput final: public CFlowOutput {
7979
* \param[in] config - Definition of the particular problem.
8080
* \return <TRUE> if the residuals should be initialized.
8181
*/
82-
bool SetInit_Residuals(const CConfig *config) override;
82+
bool SetInitResiduals(const CConfig *config) override ;
8383

8484
/*!
8585
* \brief Write any additional output defined for the current solver.
@@ -91,5 +91,5 @@ class CFlowCompOutput final: public CFlowOutput {
9191
* \brief Determines if the history file output.
9292
* \param[in] config - Definition of the particular problem.
9393
*/
94-
bool WriteHistoryFile_Output(const CConfig *config) override;
94+
bool WriteHistoryFileOutput(const CConfig *config) override ;
9595
};

0 commit comments

Comments
 (0)