Skip to content

Commit fb59ee7

Browse files
committed
delete a load of code that didnt work
1 parent bc5245b commit fb59ee7

9 files changed

Lines changed: 33 additions & 126 deletions

File tree

Common/include/CConfig.hpp

Lines changed: 5 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,7 @@ class CConfig {
146146
su2double dCMx_dCL; /*!< \brief Fixed Cl mode derivate. */
147147
su2double dCMy_dCL; /*!< \brief Fixed Cl mode derivate. */
148148
su2double dCMz_dCL; /*!< \brief Fixed Cl mode derivate. */
149-
su2double dCD_dCMy; /*!< \brief Fixed Cl mode derivate. */
150149
su2double CL_Target; /*!< \brief Fixed Cl mode Target Cl. */
151-
su2double CM_Target; /*!< \brief Fixed Cl mode Target CM. */
152-
su2double *HTP_Min_XCoord,
153-
*HTP_Min_YCoord; /*!< \brief Identification of the HTP. */
154150
TIME_MARCHING TimeMarching; /*!< \brief Steady or unsteady (time stepping or dual time stepping) computation. */
155151
unsigned short Dynamic_Analysis; /*!< \brief Static or dynamic structural analysis. */
156152
unsigned short nStartUpIter; /*!< \brief Start up iterations using the fine grid. */
@@ -640,11 +636,9 @@ class CConfig {
640636
iH, AoS, AoA_Offset,
641637
AoS_Offset, AoA_Sens; /*!< \brief Angle of sideSlip (just external flow). */
642638
bool Fixed_CL_Mode; /*!< \brief Activate fixed CL mode (external flow only). */
643-
bool Fixed_CM_Mode; /*!< \brief Activate fixed CL mode (external flow only). */
644639
bool Eval_dOF_dCX; /*!< \brief Activate fixed CL mode (external flow only). */
645640
bool Discard_InFiles; /*!< \brief Discard angle of attack in solution and geometry files. */
646641
su2double Target_CL; /*!< \brief Specify a target CL instead of AoA (external flow only). */
647-
su2double Target_CM; /*!< \brief Specify a target CM instead of AoA (external flow only). */
648642
su2double Total_CM; /*!< \brief Specify a Total CM instead of AoA (external flow only). */
649643
su2double Total_CD; /*!< \brief Specify a target CD instead of AoA (external flow only). */
650644
su2double dCL_dAlpha; /*!< \brief value of dCl/dAlpha. */
@@ -660,7 +654,6 @@ class CConfig {
660654
bool Update_AoA; /*!< \brief Boolean flag for whether to update the AoA for fixed lift mode on a given iteration. */
661655
unsigned long Update_AoA_Iter_Limit; /*!< \brief Limit on number of iterations between AoA updates for fixed lift mode. */
662656
bool Finite_Difference_Mode; /*!< \brief Flag to run the finite difference mode in fixed Cl mode. */
663-
bool Update_HTPIncidence; /*!< \brief Boolean flag for whether to update the AoA for fixed lift mode on a given iteration. */
664657
su2double ChargeCoeff; /*!< \brief Charge coefficient (just for poisson problems). */
665658
unsigned short Cauchy_Func_Flow, /*!< \brief Function where to apply the convergence criteria in the flow problem. */
666659
Cauchy_Func_AdjFlow, /*!< \brief Function where to apply the convergence criteria in the adjoint problem. */
@@ -1069,7 +1062,6 @@ class CConfig {
10691062
rampOutPres_coeff[3], /*!< \brief ramp outlet pressure coefficients for the COption class. */
10701063
jst_adj_coeff[2], /*!< \brief artificial dissipation (adjoint) array for the COption class. */
10711064
ad_coeff_heat[2], /*!< \brief artificial dissipation (heat) array for the COption class. */
1072-
obj_coeff[5], /*!< \brief objective array for the COption class. */
10731065
mesh_box_length[3], /*!< \brief mesh box length for the COption class. */
10741066
mesh_box_offset[3], /*!< \brief mesh box offset for the COption class. */
10751067
geo_loc[2], /*!< \brief SU2_GEO section locations array for the COption class. */
@@ -1151,7 +1143,7 @@ class CConfig {
11511143
POD_KIND POD_Basis_Gen; /*!< \brief Type of POD basis generation (static or incremental). */
11521144
unsigned short maxBasisDim, /*!< \brief Maximum number of POD basis dimensions. */
11531145
rom_save_freq; /*!< \brief Frequency of unsteady time steps to save. */
1154-
1146+
11551147
/* other NEMO configure options*/
11561148
unsigned short nSpecies, /*!< \brief No of species present in flow */
11571149
iWall_Catalytic,
@@ -1554,12 +1546,6 @@ class CConfig {
15541546
*/
15551547
bool GetCFL_Adapt(void) const { return CFL_Adapt; }
15561548

1557-
/*!
1558-
* \brief Get the values of the CFL adapation.
1559-
* \return Value of CFL adapation
1560-
*/
1561-
su2double GetHTP_Axis(unsigned short val_index) const { return htp_axis[val_index]; }
1562-
15631549
/*!
15641550
* \brief Get the value of the limits for the sections.
15651551
* \return Value of the limits for the sections.
@@ -5191,15 +5177,6 @@ class CConfig {
51915177
*/
51925178
void SetWeight_ObjFunc(unsigned short val_obj, su2double val) { Weight_ObjFunc[val_obj] = val; }
51935179

5194-
/*!
5195-
* \author H. Kline
5196-
* \brief Get the coefficients of the objective defined by the chain rule with primitive variables.
5197-
* \note This objective is only applicable to gradient calculations. Objective value must be
5198-
* calculated using the area averaged outlet values of density, velocity, and pressure.
5199-
* Gradients are w.r.t density, velocity[3], and pressure. when 2D gradient w.r.t. 3rd component of velocity set to 0.
5200-
*/
5201-
su2double GetCoeff_ObjChainRule(unsigned short iVar) const { return obj_coeff[iVar]; }
5202-
52035180
/*!
52045181
* \brief Get the kind of sensitivity smoothing technique.
52055182
* \return Kind of sensitivity smoothing technique.
@@ -6253,18 +6230,6 @@ class CConfig {
62536230
*/
62546231
su2double GetFixAzimuthalLine(void) const { return FixAzimuthalLine; }
62556232

6256-
/*!
6257-
* \brief Value of the weight of the CD, CL, CM optimization.
6258-
* \return Value of the weight of the CD, CL, CM optimization.
6259-
*/
6260-
su2double GetdCD_dCMy(void) const { return dCD_dCMy; }
6261-
6262-
/*!
6263-
* \brief Value of the weight of the CD, CL, CM optimization.
6264-
* \return Value of the weight of the CD, CL, CM optimization.
6265-
*/
6266-
su2double GetCM_Target(void) const { return CM_Target; }
6267-
62686233
/*!
62696234
* \brief Value of the weight of the CD, CL, CM optimization.
62706235
* \return Value of the weight of the CD, CL, CM optimization.
@@ -6325,12 +6290,6 @@ class CConfig {
63256290
*/
63266291
void SetdCM_diH(su2double val_dcm_dhi) { dCM_diH = val_dcm_dhi; }
63276292

6328-
/*!
6329-
* \brief Value of the weight of the CD, CL, CM optimization.
6330-
* \return Value of the weight of the CD, CL, CM optimization.
6331-
*/
6332-
void SetdCD_dCMy(su2double val_dcd_dcmy) { dCD_dCMy = val_dcd_dcmy; }
6333-
63346293
/*!
63356294
* \brief Value of the weight of the CD, CL, CM optimization.
63366295
* \return Value of the weight of the CD, CL, CM optimization.
@@ -8347,12 +8306,6 @@ class CConfig {
83478306
*/
83488307
bool GetFixed_CL_Mode(void) const { return Fixed_CL_Mode; }
83498308

8350-
/*!
8351-
* \brief Get information about whether to use fixed CL mode.
8352-
* \return <code>TRUE</code> if fixed CL mode is active; otherwise <code>FALSE</code>.
8353-
*/
8354-
bool GetFixed_CM_Mode(void) const { return Fixed_CM_Mode; }
8355-
83568309
/*!
83578310
* \brief Get information about whether to use fixed CL mode.
83588311
* \return <code>TRUE</code> if fixed CL mode is active; otherwise <code>FALSE</code>.
@@ -9500,25 +9453,25 @@ class CConfig {
95009453
* \return True if specified in config file.
95019454
*/
95029455
bool GetSave_libROM(void) const {return libROM; }
9503-
9456+
95049457
/*!
95059458
* \brief Get the name of the file for libROM to save.
95069459
* \return Filename prefix for libROM to save to (default: "su2").
95079460
*/
95089461
string GetlibROMbase_FileName(void) const { return libROMbase_FileName; }
9509-
9462+
95109463
/*!
95119464
* \brief Static or incremental toggle for POD basis generation type.
95129465
* \return Type of POD generation type
95139466
*/
95149467
POD_KIND GetKind_PODBasis(void) const { return POD_Basis_Gen; }
9515-
9468+
95169469
/*!
95179470
* \brief Get maximum number of POD basis dimensions (default: 100).
95189471
* \return Maximum number of POD basis vectors.
95199472
*/
95209473
unsigned short GetMax_BasisDim(void) const { return maxBasisDim; }
9521-
9474+
95229475
/*!
95239476
* \brief Get frequency of unsteady time steps to save (default: 1).
95249477
* \return Save frequency for unsteady time steps.

Common/include/option_structure.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -716,17 +716,13 @@ enum ENUM_GRIDMOVEMENT {
716716
NO_MOVEMENT = 0, /*!< \brief Simulation on a static mesh. */
717717
RIGID_MOTION = 2, /*!< \brief Simulation with rigid mesh motion (plunging/pitching/rotation). */
718718
ROTATING_FRAME = 8, /*!< \brief Simulation in a rotating frame. */
719-
ELASTICITY = 9, /*!< \brief Linear Elasticity. */
720719
STEADY_TRANSLATION = 11, /*!< \brief Simulation in a steadily translating frame. */
721720
GUST = 12, /*!< \brief Simulation on a static mesh with a gust. */
722-
MOVING_HTP = 13, /*!< \brief Simulation with moving HTP (rotation). */
723721
};
724722
static const MapType<std::string, ENUM_GRIDMOVEMENT> GridMovement_Map = {
725723
MakePair("NONE", NO_MOVEMENT)
726724
MakePair("RIGID_MOTION", RIGID_MOTION)
727725
MakePair("ROTATING_FRAME", ROTATING_FRAME)
728-
MakePair("ELASTICITY", ELASTICITY)
729-
MakePair("MOVING_HTP", MOVING_HTP)
730726
MakePair("STEADY_TRANSLATION", STEADY_TRANSLATION)
731727
MakePair("GUST", GUST)
732728
};

Common/src/CConfig.cpp

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,16 +1354,12 @@ void CConfig::SetConfig_Options() {
13541354
addDoubleOption("AOA", AoA, 0.0);
13551355
/* DESCRIPTION: Activate fixed CL mode (specify a CL instead of AoA). */
13561356
addBoolOption("FIXED_CL_MODE", Fixed_CL_Mode, false);
1357-
/* DESCRIPTION: Activate fixed CM mode (specify a CM instead of iH). */
1358-
addBoolOption("FIXED_CM_MODE", Fixed_CM_Mode, false);
13591357
/* DESCRIPTION: Evaluate the dOF_dCL or dOF_dCMy during run time. */
13601358
addBoolOption("EVAL_DOF_DCX", Eval_dOF_dCX, false);
13611359
/* DESCRIPTION: DIscard the angle of attack in the solution and the increment in the geometry files. */
13621360
addBoolOption("DISCARD_INFILES", Discard_InFiles, false);
13631361
/* DESCRIPTION: Specify a fixed coefficient of lift instead of AoA (only for compressible flows) */
13641362
addDoubleOption("TARGET_CL", Target_CL, 0.0);
1365-
/* DESCRIPTION: Specify a fixed coefficient of lift instead of AoA (only for compressible flows) */
1366-
addDoubleOption("TARGET_CM", Target_CM, 0.0);
13671363
/* DESCRIPTION: Damping factor for fixed CL mode. */
13681364
addDoubleOption("DCL_DALPHA", dCL_dAlpha, 0.2);
13691365
/* DESCRIPTION: Damping factor for fixed CL mode. */
@@ -1942,16 +1938,6 @@ void CConfig::SetConfig_Options() {
19421938
/* DESCRIPTION: parameter for the definition of a complex objective function */
19431939
addDoubleOption("DCMZ_DCL_VALUE", dCMz_dCL, 0.0);
19441940

1945-
/* DESCRIPTION: parameter for the definition of a complex objective function */
1946-
addDoubleOption("DCD_DCMY_VALUE", dCD_dCMy, 0.0);
1947-
1948-
obj_coeff[0]=0.0; obj_coeff[1]=0.0; obj_coeff[2]=0.0; obj_coeff[3]=0.0; obj_coeff[4]=0.0;
1949-
/*!\brief OBJ_CHAIN_RULE_COEFF
1950-
* \n DESCRIPTION: Coefficients defining the objective function gradient using the chain rule
1951-
* with area-averaged outlet primitive variables. This is used with the genereralized outflow
1952-
* objective. \ingroup Config */
1953-
addDoubleArrayOption("OBJ_CHAIN_RULE_COEFF", 5, obj_coeff);
1954-
19551941
geo_loc[0] = 0.0; geo_loc[1] = 1.0;
19561942
/* DESCRIPTION: Definition of the airfoil section */
19571943
addDoubleArrayOption("GEO_BOUNDS", 2, geo_loc);
@@ -3375,12 +3361,6 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
33753361
}
33763362
}
33773363

3378-
/*--- Fixed CM mode requires a static movement of the grid ---*/
3379-
3380-
if (Fixed_CM_Mode) {
3381-
Kind_GridMovement = MOVING_HTP;
3382-
}
3383-
33843364
/*--- Initialize the AoA and Sideslip variables for the incompressible
33853365
solver. This is typically unused (often internal flows). Also fixed CL
33863366
mode for incompressible flows is not implemented ---*/
@@ -4531,7 +4511,6 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
45314511
the AoA with each iteration to false ---*/
45324512

45334513
if (Fixed_CL_Mode) Update_AoA = false;
4534-
if (Fixed_CM_Mode) Update_HTPIncidence = false;
45354514

45364515
if (DirectDiff != NO_DERIVATIVE) {
45374516
#ifndef CODI_FORWARD_TYPE
@@ -4600,11 +4579,6 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
46004579

46014580
if (!ContinuousAdjoint & !DiscreteAdjoint) {
46024581
if (Fixed_CL_Mode) nInnerIter += Iter_dCL_dAlpha;
4603-
4604-
if (Fixed_CM_Mode) {
4605-
nInnerIter += Iter_dCL_dAlpha;
4606-
MinLogResidual = -24;
4607-
}
46084582
}
46094583

46104584
/* --- Set Finite Difference mode to false by default --- */
@@ -5884,10 +5858,6 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
58845858
if (Fixed_CL_Mode) {
58855859
cout << "Fixed CL mode, target value: " << Target_CL << "." << endl;
58865860
}
5887-
if (Fixed_CM_Mode) {
5888-
cout << "Fixed CM mode, target value: " << Target_CM << "." << endl;
5889-
cout << "HTP rotation axis (X,Z): ("<< htp_axis[0] <<", "<< htp_axis[1] <<")."<< endl;
5890-
}
58915861
}
58925862

58935863
if (EquivArea) {
@@ -5901,7 +5871,6 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
59015871
switch (Kind_GridMovement) {
59025872
case NO_MOVEMENT: cout << "no direct movement." << endl; break;
59035873
case RIGID_MOTION: cout << "rigid mesh motion." << endl; break;
5904-
case MOVING_HTP: cout << "HTP moving." << endl; break;
59055874
case ROTATING_FRAME: cout << "rotating reference frame." << endl; break;
59065875
case EXTERNAL: cout << "externally prescribed motion." << endl; break;
59075876
}
@@ -6246,7 +6215,6 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
62466215
switch (Kind_ObjFunc[0]) {
62476216
case DRAG_COEFFICIENT: cout << "CD objective function";
62486217
if (Fixed_CL_Mode) { cout << " using fixed CL mode, dCD/dCL = " << dCD_dCL << "." << endl; }
6249-
else if (Fixed_CM_Mode) { cout << " using fixed CMy mode, dCD/dCMy = " << dCD_dCMy << "." << endl; }
62506218
else { cout << "." << endl; }
62516219
break;
62526220
case LIFT_COEFFICIENT: cout << "CL objective function." << endl; break;

Common/src/geometry/CGeometry.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2544,8 +2544,7 @@ void CGeometry::ComputeSurf_Straightness(CConfig *config,
25442544
other GridMovements are rigid. ---*/
25452545
if ((config->GetMarker_All_KindBC(iMarker) == SYMMETRY_PLANE ||
25462546
config->GetMarker_All_KindBC(iMarker) == EULER_WALL) &&
2547-
config->GetMarker_Moving_Bool(Local_TagBound) == false &&
2548-
config->GetKind_GridMovement() != ELASTICITY) {
2547+
!config->GetMarker_Moving_Bool(Local_TagBound)) {
25492548

25502549
/*--- Loop over all global markers, and find the local-global pair via
25512550
matching unique string tags. ---*/

SU2_CFD/src/drivers/CMultizoneDriver.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ CMultizoneDriver::CMultizoneDriver(char* confFile, unsigned short val_nZone, SU2
8686
heat_zone = true;
8787
break;
8888
default:
89-
break;
89+
break;
9090
}
9191
}
9292

@@ -105,9 +105,7 @@ CMultizoneDriver::CMultizoneDriver(char* confFile, unsigned short val_nZone, SU2
105105
switch (config_container[iZone]->GetKind_GridMovement()){
106106
case RIGID_MOTION:
107107
prefixed_motion[iZone] = true; break;
108-
case STEADY_TRANSLATION: case ROTATING_FRAME:
109-
case NO_MOVEMENT: case GUST: default:
110-
case ELASTICITY:
108+
default:
111109
prefixed_motion[iZone] = false; break;
112110
}
113111
if (config_container[iZone]->GetSurface_Movement(AEROELASTIC) ||

SU2_CFD/src/output/CFlowOutput.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1734,7 +1734,7 @@ void CFlowOutput::Set_NearfieldInverseDesign(CSolver *solver, const CGeometry *g
17341734

17351735
void CFlowOutput::WriteAdditionalFiles(CConfig *config, CGeometry *geometry, CSolver **solver_container){
17361736

1737-
if (config->GetFixed_CL_Mode() || config->GetFixed_CM_Mode()){
1737+
if (config->GetFixed_CL_Mode()){
17381738
WriteMetaData(config);
17391739
}
17401740

SU2_CFD/src/solvers/CAdjEulerSolver.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -689,9 +689,7 @@ void CAdjEulerSolver::SetForceProj_Vector(CGeometry *geometry, CSolver **solver_
689689
su2double dCMx_dCL = config->GetdCMx_dCL();
690690
su2double dCMy_dCL = config->GetdCMy_dCL();
691691
su2double dCMz_dCL = config->GetdCMz_dCL();
692-
su2double dCD_dCMy = config->GetdCD_dCMy();
693692
bool Fixed_CL = config->GetFixed_CL_Mode();
694-
bool Fixed_CM = config->GetFixed_CM_Mode();
695693

696694
ForceProj_Vector = new su2double[nDim];
697695

@@ -757,7 +755,6 @@ void CAdjEulerSolver::SetForceProj_Vector(CGeometry *geometry, CSolver **solver_
757755
/*--- Modification to run at a fixed CL and CM value ---*/
758756

759757
if (Fixed_CL) { ForceProj_Vector[0] += dCD_dCL*Weight_ObjFunc*sin(Alpha); ForceProj_Vector[1] -= dCD_dCL*Weight_ObjFunc*cos(Alpha); }
760-
if (Fixed_CM) { ForceProj_Vector[0] -= dCD_dCMy*Weight_ObjFunc*(y - y_origin)/RefLength; ForceProj_Vector[1] += dCD_dCMy*Weight_ObjFunc*(x - x_origin)/RefLength; }
761758

762759
}
763760
if (nDim == 3) {
@@ -769,7 +766,6 @@ void CAdjEulerSolver::SetForceProj_Vector(CGeometry *geometry, CSolver **solver_
769766
/*--- Modification to run at a fixed CL value ---*/
770767

771768
if (Fixed_CL) { ForceProj_Vector[0] += dCD_dCL*Weight_ObjFunc*sin(Alpha); ForceProj_Vector[1] -= 0.0; ForceProj_Vector[2] -= dCD_dCL*Weight_ObjFunc*cos(Alpha); }
772-
if (Fixed_CM) { ForceProj_Vector[0] += dCD_dCMy*Weight_ObjFunc*(z - z_origin)/RefLength; ForceProj_Vector[1] += 0.0; ForceProj_Vector[2] -= dCD_dCMy*Weight_ObjFunc*(x - x_origin)/RefLength; }
773769

774770
}
775771
break;

SU2_CFD/src/solvers/CEulerSolver.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ CEulerSolver::CEulerSolver(CGeometry *geometry, CConfig *config,
7676
/*--- Check for a restart file to evaluate if there is a change in the angle of attack
7777
before computing all the non-dimesional quantities. ---*/
7878

79-
if (!(!restart || (iMesh != MESH_0) || nZone > 1) &&
80-
(config->GetFixed_CL_Mode() || config->GetFixed_CM_Mode())) {
79+
if (!(!restart || (iMesh != MESH_0) || nZone > 1) && config->GetFixed_CL_Mode()) {
8180

8281
/*--- Modify file name for a dual-time unsteady restart ---*/
8382

@@ -4227,27 +4226,28 @@ void CEulerSolver::Evaluate_ObjFunc(const CConfig *config) {
42274226

42284227
/*--- Loop over all monitored markers, add to the 'combo' objective ---*/
42294228

4230-
for (iMarker_Monitoring = 0; iMarker_Monitoring < config->GetnMarker_Monitoring(); iMarker_Monitoring++) {
4229+
if (config->GetFixed_CL_Mode()) {
4230+
for (iMarker_Monitoring = 0; iMarker_Monitoring < config->GetnMarker_Monitoring(); iMarker_Monitoring++) {
42314231

4232-
Weight_ObjFunc = config->GetWeight_ObjFunc(iMarker_Monitoring);
4233-
Kind_ObjFunc = config->GetKind_ObjFunc(iMarker_Monitoring);
4232+
Weight_ObjFunc = config->GetWeight_ObjFunc(iMarker_Monitoring);
4233+
Kind_ObjFunc = config->GetKind_ObjFunc(iMarker_Monitoring);
42344234

4235-
switch(Kind_ObjFunc) {
4236-
case DRAG_COEFFICIENT:
4237-
if (config->GetFixed_CL_Mode()) Total_ComboObj -= Weight_ObjFunc*config->GetdCD_dCL()*(SurfaceCoeff.CL[iMarker_Monitoring]);
4238-
if (config->GetFixed_CM_Mode()) Total_ComboObj -= Weight_ObjFunc*config->GetdCD_dCMy()*(SurfaceCoeff.CMy[iMarker_Monitoring]);
4239-
break;
4240-
case MOMENT_X_COEFFICIENT:
4241-
if (config->GetFixed_CL_Mode()) Total_ComboObj -= Weight_ObjFunc*config->GetdCMx_dCL()*(SurfaceCoeff.CL[iMarker_Monitoring]);
4242-
break;
4243-
case MOMENT_Y_COEFFICIENT:
4244-
if (config->GetFixed_CL_Mode()) Total_ComboObj -= Weight_ObjFunc*config->GetdCMy_dCL()*(SurfaceCoeff.CL[iMarker_Monitoring]);
4245-
break;
4246-
case MOMENT_Z_COEFFICIENT:
4247-
if (config->GetFixed_CL_Mode()) Total_ComboObj -= Weight_ObjFunc*config->GetdCMz_dCL()*(SurfaceCoeff.CL[iMarker_Monitoring]);
4248-
break;
4249-
default:
4250-
break;
4235+
switch(Kind_ObjFunc) {
4236+
case DRAG_COEFFICIENT:
4237+
Total_ComboObj -= Weight_ObjFunc*config->GetdCD_dCL()*(SurfaceCoeff.CL[iMarker_Monitoring]);
4238+
break;
4239+
case MOMENT_X_COEFFICIENT:
4240+
Total_ComboObj -= Weight_ObjFunc*config->GetdCMx_dCL()*(SurfaceCoeff.CL[iMarker_Monitoring]);
4241+
break;
4242+
case MOMENT_Y_COEFFICIENT:
4243+
Total_ComboObj -= Weight_ObjFunc*config->GetdCMy_dCL()*(SurfaceCoeff.CL[iMarker_Monitoring]);
4244+
break;
4245+
case MOMENT_Z_COEFFICIENT:
4246+
Total_ComboObj -= Weight_ObjFunc*config->GetdCMz_dCL()*(SurfaceCoeff.CL[iMarker_Monitoring]);
4247+
break;
4248+
default:
4249+
break;
4250+
}
42514251
}
42524252
}
42534253

0 commit comments

Comments
 (0)