@@ -121,7 +121,6 @@ CEulerSolver::CEulerSolver(CGeometry *geometry, CConfig *config,
121121 /* --- Centered schemes only need gradients for viscous fluxes (T and v). ---*/
122122 nPrimVarGrad = EulerNPrimVarGrad (config, nDim);
123123 nSecondaryVar = nSecVar;
124- nSecondaryVarGrad = 2 ;
125124
126125 /* --- Initialize nVarGrad for deallocation ---*/
127126
@@ -1883,8 +1882,11 @@ void CEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_contain
18831882
18841883 /* --- Get primitive and secondary variables ---*/
18851884
1886- auto V_i = nodes->GetPrimitive (iPoint); auto V_j = nodes->GetPrimitive (jPoint);
1887- auto S_i = nodes->GetSecondary (iPoint); auto S_j = nodes->GetSecondary (jPoint);
1885+ auto V_i = nodes->GetPrimitive (iPoint);
1886+ auto V_j = nodes->GetPrimitive (jPoint);
1887+
1888+ const su2double* S_i = ideal_gas? nullptr : nodes->GetSecondary (iPoint);
1889+ const su2double* S_j = ideal_gas? nullptr : nodes->GetSecondary (jPoint);
18881890
18891891 /* --- Set them with or without high order reconstruction using MUSCL strategy. ---*/
18901892
@@ -5081,9 +5083,11 @@ void CEulerSolver::BC_Riemann(CGeometry *geometry, CSolver **solver_container,
50815083
50825084 const string Marker_Tag = config->GetMarker_All_TagBound (val_marker);
50835085 const bool viscous = config->GetViscous (),
5084- implicit = ( config->GetKind_TimeIntScheme () == EULER_IMPLICIT) ,
5086+ implicit = config->GetKind_TimeIntScheme () == EULER_IMPLICIT,
50855087 gravity = config->GetGravityForce (),
5086- tkeNeeded = (config->GetKind_Turb_Model () == TURB_MODEL::SST);
5088+ tkeNeeded = config->GetKind_Turb_Model () == TURB_MODEL::SST,
5089+ ideal_gas = config->GetKind_FluidModel () == STANDARD_AIR ||
5090+ config->GetKind_FluidModel () == IDEAL_GAS;
50875091
50885092 su2double **P_Tensor = new su2double*[nVar],
50895093 **invP_Tensor = new su2double*[nVar];
@@ -5451,7 +5455,7 @@ void CEulerSolver::BC_Riemann(CGeometry *geometry, CSolver **solver_container,
54515455
54525456 /* --- Secondary variables ---*/
54535457
5454- auto S_domain = nodes->GetSecondary (iPoint);
5458+ const su2double* S_domain = ideal_gas? nullptr : nodes->GetSecondary (iPoint);
54555459
54565460 /* --- Compute secondary thermodynamic properties (partial derivatives...) ---*/
54575461 su2double S_boundary[8 ];
@@ -5527,6 +5531,8 @@ void CEulerSolver::BC_TurboRiemann(CGeometry *geometry, CSolver **solver_contain
55275531 bool viscous = config->GetViscous ();
55285532 bool gravity = (config->GetGravityForce ());
55295533 bool tkeNeeded = (config->GetKind_Turb_Model () == TURB_MODEL::SST);
5534+ const bool ideal_gas = config->GetKind_FluidModel () == STANDARD_AIR ||
5535+ config->GetKind_FluidModel () == IDEAL_GAS;
55305536
55315537 su2double *Normal, *turboNormal, *UnitNormal, *FlowDirMix, FlowDirMixMag, *turboVelocity;
55325538 Normal = new su2double[nDim];
@@ -5947,7 +5953,7 @@ void CEulerSolver::BC_TurboRiemann(CGeometry *geometry, CSolver **solver_contain
59475953
59485954 /* --- Secondary variables ---*/
59495955
5950- S_domain = nodes->GetSecondary (iPoint);
5956+ S_domain = ideal_gas ? nullptr : nodes->GetSecondary (iPoint);
59515957
59525958 /* --- Compute secondary thermodynamic properties (partial derivatives...) ---*/
59535959
@@ -6203,6 +6209,8 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu
62036209 bool implicit = (config->GetKind_TimeIntScheme () == EULER_IMPLICIT);
62046210 string Marker_Tag = config->GetMarker_All_TagBound (val_marker);
62056211 bool viscous = config->GetViscous ();
6212+ const bool ideal_gas = config->GetKind_FluidModel () == STANDARD_AIR ||
6213+ config->GetKind_FluidModel () == IDEAL_GAS;
62066214 unsigned short nSpanWiseSections = geometry->GetnSpanWiseSections (config->GetMarker_All_TurbomachineryFlag (val_marker));
62076215 su2double relfacAvgCfg = config->GetGiles_RelaxFactorAverage (Marker_Tag);
62086216 su2double relfacFouCfg = config->GetGiles_RelaxFactorFourier (Marker_Tag);
@@ -6538,8 +6546,7 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu
65386546 V_domain = nodes->GetPrimitive (iPoint);
65396547
65406548 /* --- Retrieve domain Secondary variables ---*/
6541- S_domain = nodes->GetSecondary (iPoint);
6542-
6549+ S_domain = ideal_gas? nullptr : nodes->GetSecondary (iPoint);
65436550
65446551 /* --- Compute the internal state u_i ---*/
65456552 Velocity2_i = 0 ;
0 commit comments