Skip to content

Commit 5e1b61c

Browse files
author
shbhmexe
committed
Merge branch 'fix/solver-initialization-and-logic-bugs' of https://github.com/shbhmexe/SU2 into fix/solver-initialization-and-logic-bugs
2 parents 8143f4f + 79db825 commit 5e1b61c

9 files changed

Lines changed: 16 additions & 16 deletions

File tree

Common/src/linear_algebra/CSysMatrix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void CSysMatrix<ScalarType>::Initialize(unsigned long npoint, unsigned long npoi
157157
};
158158

159159
GPUAllocAndInit(d_matrix, nnz * nVar * nEqn);
160-
GPUAllocAndCopy(d_row_ptr, row_ptr, (nPointDomain + 1.0));
160+
GPUAllocAndCopy(d_row_ptr, row_ptr, (nPointDomain + 1));
161161
GPUAllocAndCopy(d_col_ind, col_ind, nnz);
162162
}
163163

Common/src/wall_model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ void CWallModelLogLaw::WallShearStressAndHeatFlux(const su2double tExchange, con
371371
(-(1.0 / 11.0) * h_wm * exp(-0.33 * y_plus) / nu_wall +
372372
(1.0 / 11.0) * h_wm * exp(-(1.0 / 11.0) * y_plus) / nu_wall +
373373
(1.0 / 33.0) * u_tau0 * pow(h_wm, 2.0) * exp(-0.33 * y_plus) / pow(nu_wall, 2.0)) -
374-
1.0 * h_wm / (nu_wall * (karman * y_plus + 1.0));
374+
h_wm / (nu_wall * (karman * y_plus + 1.0));
375375

376376
/* Newton method
377377
*/

SU2_CFD/src/solvers/CEulerSolver.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ CEulerSolver::CEulerSolver(CGeometry *geometry, CConfig *config,
246246
Energy_Inf = config->GetEnergy_FreeStreamND();
247247
Mach_Inf = config->GetMach();
248248

249-
/*--- Initialize the secondary values for direct derivative approxiations ---*/
249+
/*--- Initialize the secondary values for direct derivative approximations ---*/
250250

251251
switch(direct_diff) {
252252
case NO_DERIVATIVE:
@@ -5571,8 +5571,8 @@ void CEulerSolver::BC_TurboRiemann(CGeometry *geometry, CSolver **solver_contain
55715571

55725572
switch(config->GetKind_Data_Riemann(Marker_Tag))
55735573
{
5574-
//TODO(turbo), generilize for 3D case
5575-
//TODO(turbo), generilize for Inlet and Outlet in for backflow treatment
5574+
//TODO(turbo), generalize for 3D case
5575+
//TODO(turbo), generalize for Inlet and Outlet in for backflow treatment
55765576
//TODO(turbo), implement not uniform inlet and radial equilibrium for the outlet
55775577
case TOTAL_CONDITIONS_PT:
55785578

@@ -6535,8 +6535,8 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu
65356535
switch(config->GetKind_Data_Giles(Marker_Tag))
65366536
{
65376537

6538-
//Done, generilize for 3D case
6539-
//TODO(turbo), generilize for Inlet and Outlet in for backflow treatment
6538+
//Done, generalize for 3D case
6539+
//TODO(turbo), generalize for Inlet and Outlet in for backflow treatment
65406540

65416541
case TOTAL_CONDITIONS_PT: case MIXING_IN:case TOTAL_CONDITIONS_PT_1D: case MIXING_IN_1D:
65426542
if(config->GetSpatialFourier()){

SU2_CFD/src/solvers/CIncEulerSolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ CIncEulerSolver::CIncEulerSolver(CGeometry *geometry, CConfig *config, unsigned
171171
GetFluidModel()->SetTDState_T(Temperature_Inf, scalar_init);
172172
Enthalpy_Inf = GetFluidModel()->GetEnthalpy();
173173

174-
/*--- Initialize the secondary values for direct derivative approxiations ---*/
174+
/*--- Initialize the secondary values for direct derivative approximations ---*/
175175

176176
switch (config->GetDirectDiff()) {
177177
case NO_DERIVATIVE:

SU2_CFD/src/solvers/CNEMOEulerSolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ CNEMOEulerSolver::CNEMOEulerSolver(CGeometry *geometry, CConfig *config,
146146
Temperature_Inf = config->GetTemperature_FreeStreamND();
147147
Temperature_ve_Inf = config->GetTemperature_ve_FreeStreamND();
148148

149-
/*--- Initialize the secondary values for direct derivative approxiations ---*/
149+
/*--- Initialize the secondary values for direct derivative approximations ---*/
150150
switch(direct_diff) {
151151
case NO_DERIVATIVE:
152152
/*--- Default ---*/

SU2_CFD/src/solvers/CNEMONSSolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ CNEMONSSolver::CNEMONSSolver(CGeometry *geometry, CConfig *config, unsigned shor
4242
Prandtl_Lam = config->GetPrandtl_Lam();
4343
Prandtl_Turb = config->GetPrandtl_Turb();
4444

45-
/*--- Initialize the secondary values for direct derivative approxiations ---*/
45+
/*--- Initialize the secondary values for direct derivative approximations ---*/
4646
switch(config->GetDirectDiff()) {
4747
case D_VISCOSITY:
4848
SU2_TYPE::SetDerivative(Viscosity_Inf, 1.0);

SU2_CFD/src/solvers/CRadP1Solver.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ CRadP1Solver::CRadP1Solver(CGeometry* geometry, CConfig *config) : CRadSolver(ge
8484
/*--- Read farfield conditions from config ---*/
8585
Temperature_Inf = config->GetTemperature_FreeStreamND();
8686

87-
/*--- Initialize the secondary values for direct derivative approxiations ---*/
87+
/*--- Initialize the secondary values for direct derivative approximations ---*/
8888

8989
switch(direct_diff){
9090
case NO_DERIVATIVE: case D_DENSITY:
@@ -320,7 +320,7 @@ void CRadP1Solver::BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_cont
320320

321321
/*--- Compute the radiative heat flux. ---*/
322322
Radiative_Energy = nodes->GetSolution(iPoint, 0);
323-
Radiative_Heat_Flux = 1.0*Theta*(Ib_w - Radiative_Energy);
323+
Radiative_Heat_Flux = Theta*(Ib_w - Radiative_Energy);
324324

325325
/*--- Compute the Viscous contribution to the residual ---*/
326326
Res_Visc[0] = Radiative_Heat_Flux*Area;
@@ -394,7 +394,7 @@ void CRadP1Solver::BC_Far_Field(CGeometry *geometry, CSolver **solver_container,
394394

395395
/*--- Compute the radiative heat flux. ---*/
396396
Radiative_Energy = nodes->GetSolution(iPoint, 0);
397-
Radiative_Heat_Flux = 1.0*Theta*(Ib_w - Radiative_Energy);
397+
Radiative_Heat_Flux = Theta*(Ib_w - Radiative_Energy);
398398

399399
/*--- Compute the Viscous contribution to the residual ---*/
400400
Res_Visc[0] = Radiative_Heat_Flux*Area;

SU2_PY/SU2/eval/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def function(func_name, config, state=None):
7575
state = su2io.State(state)
7676

7777
# check for multiple objectives
78-
multi_objective = type(func_name) == list
78+
multi_objective = isinstance(func_name, list)
7979

8080
# func_name_string is only used to check whether the function has already been evaluated.
8181
func_name_string = func_name

SU2_PY/SU2/eval/gradients.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def gradient(func_name, method, config, state=None):
7676
if func_name == "ALL":
7777
raise Exception("func_name = 'ALL' not yet supported")
7878
func_output = func_name
79-
if type(func_name) == list:
79+
if isinstance(func_name, list):
8080
if config.OPT_COMBINE_OBJECTIVE == "YES":
8181
func_output = "COMBO"
8282
else:
@@ -184,7 +184,7 @@ def adjoint(func_name, config, state=None):
184184

185185
# When a list of objectives is used, they are combined
186186
# and the output name is 'COMBO'
187-
multi_objective = type(func_name) == list
187+
multi_objective = isinstance(func_name, list)
188188
func_output = func_name
189189
if multi_objective:
190190
func_output = "COMBO"

0 commit comments

Comments
 (0)