diff --git a/Common/src/linear_algebra/CSysMatrix.cpp b/Common/src/linear_algebra/CSysMatrix.cpp index 9af4802ee35..4414645385a 100644 --- a/Common/src/linear_algebra/CSysMatrix.cpp +++ b/Common/src/linear_algebra/CSysMatrix.cpp @@ -157,7 +157,7 @@ void CSysMatrix::Initialize(unsigned long npoint, unsigned long npoi }; GPUAllocAndInit(d_matrix, nnz * nVar * nEqn); - GPUAllocAndCopy(d_row_ptr, row_ptr, (nPointDomain + 1.0)); + GPUAllocAndCopy(d_row_ptr, row_ptr, (nPointDomain + 1)); GPUAllocAndCopy(d_col_ind, col_ind, nnz); } diff --git a/Common/src/wall_model.cpp b/Common/src/wall_model.cpp index e62e7aeb1e0..75b3cac0ccb 100644 --- a/Common/src/wall_model.cpp +++ b/Common/src/wall_model.cpp @@ -371,7 +371,7 @@ void CWallModelLogLaw::WallShearStressAndHeatFlux(const su2double tExchange, con (-(1.0 / 11.0) * h_wm * exp(-0.33 * y_plus) / nu_wall + (1.0 / 11.0) * h_wm * exp(-(1.0 / 11.0) * y_plus) / nu_wall + (1.0 / 33.0) * u_tau0 * pow(h_wm, 2.0) * exp(-0.33 * y_plus) / pow(nu_wall, 2.0)) - - 1.0 * h_wm / (nu_wall * (karman * y_plus + 1.0)); + h_wm / (nu_wall * (karman * y_plus + 1.0)); /* Newton method */ diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index dcca14edd19..10df71fbe5a 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -246,7 +246,7 @@ CEulerSolver::CEulerSolver(CGeometry *geometry, CConfig *config, Energy_Inf = config->GetEnergy_FreeStreamND(); Mach_Inf = config->GetMach(); - /*--- Initialize the secondary values for direct derivative approxiations ---*/ + /*--- Initialize the secondary values for direct derivative approximations ---*/ switch(direct_diff) { case NO_DERIVATIVE: @@ -5571,8 +5571,8 @@ void CEulerSolver::BC_TurboRiemann(CGeometry *geometry, CSolver **solver_contain switch(config->GetKind_Data_Riemann(Marker_Tag)) { - //TODO(turbo), generilize for 3D case - //TODO(turbo), generilize for Inlet and Outlet in for backflow treatment + //TODO(turbo), generalize for 3D case + //TODO(turbo), generalize for Inlet and Outlet in for backflow treatment //TODO(turbo), implement not uniform inlet and radial equilibrium for the outlet case TOTAL_CONDITIONS_PT: @@ -6535,8 +6535,8 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu switch(config->GetKind_Data_Giles(Marker_Tag)) { - //Done, generilize for 3D case - //TODO(turbo), generilize for Inlet and Outlet in for backflow treatment + //Done, generalize for 3D case + //TODO(turbo), generalize for Inlet and Outlet in for backflow treatment case TOTAL_CONDITIONS_PT: case MIXING_IN:case TOTAL_CONDITIONS_PT_1D: case MIXING_IN_1D: if(config->GetSpatialFourier()){ diff --git a/SU2_CFD/src/solvers/CIncEulerSolver.cpp b/SU2_CFD/src/solvers/CIncEulerSolver.cpp index 956af94ab58..6cc5675443a 100644 --- a/SU2_CFD/src/solvers/CIncEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CIncEulerSolver.cpp @@ -171,7 +171,7 @@ CIncEulerSolver::CIncEulerSolver(CGeometry *geometry, CConfig *config, unsigned GetFluidModel()->SetTDState_T(Temperature_Inf, scalar_init); Enthalpy_Inf = GetFluidModel()->GetEnthalpy(); - /*--- Initialize the secondary values for direct derivative approxiations ---*/ + /*--- Initialize the secondary values for direct derivative approximations ---*/ switch (config->GetDirectDiff()) { case NO_DERIVATIVE: diff --git a/SU2_CFD/src/solvers/CNEMOEulerSolver.cpp b/SU2_CFD/src/solvers/CNEMOEulerSolver.cpp index 65f3ea81f12..accf9b0252c 100644 --- a/SU2_CFD/src/solvers/CNEMOEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CNEMOEulerSolver.cpp @@ -146,7 +146,7 @@ CNEMOEulerSolver::CNEMOEulerSolver(CGeometry *geometry, CConfig *config, Temperature_Inf = config->GetTemperature_FreeStreamND(); Temperature_ve_Inf = config->GetTemperature_ve_FreeStreamND(); - /*--- Initialize the secondary values for direct derivative approxiations ---*/ + /*--- Initialize the secondary values for direct derivative approximations ---*/ switch(direct_diff) { case NO_DERIVATIVE: /*--- Default ---*/ diff --git a/SU2_CFD/src/solvers/CNEMONSSolver.cpp b/SU2_CFD/src/solvers/CNEMONSSolver.cpp index f2232c7692f..68ec925f52b 100644 --- a/SU2_CFD/src/solvers/CNEMONSSolver.cpp +++ b/SU2_CFD/src/solvers/CNEMONSSolver.cpp @@ -42,7 +42,7 @@ CNEMONSSolver::CNEMONSSolver(CGeometry *geometry, CConfig *config, unsigned shor Prandtl_Lam = config->GetPrandtl_Lam(); Prandtl_Turb = config->GetPrandtl_Turb(); - /*--- Initialize the secondary values for direct derivative approxiations ---*/ + /*--- Initialize the secondary values for direct derivative approximations ---*/ switch(config->GetDirectDiff()) { case D_VISCOSITY: SU2_TYPE::SetDerivative(Viscosity_Inf, 1.0); diff --git a/SU2_CFD/src/solvers/CRadP1Solver.cpp b/SU2_CFD/src/solvers/CRadP1Solver.cpp index ffa4875a49c..7b70ead35fc 100644 --- a/SU2_CFD/src/solvers/CRadP1Solver.cpp +++ b/SU2_CFD/src/solvers/CRadP1Solver.cpp @@ -84,7 +84,7 @@ CRadP1Solver::CRadP1Solver(CGeometry* geometry, CConfig *config) : CRadSolver(ge /*--- Read farfield conditions from config ---*/ Temperature_Inf = config->GetTemperature_FreeStreamND(); - /*--- Initialize the secondary values for direct derivative approxiations ---*/ + /*--- Initialize the secondary values for direct derivative approximations ---*/ switch(direct_diff){ case NO_DERIVATIVE: case D_DENSITY: @@ -320,7 +320,7 @@ void CRadP1Solver::BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_cont /*--- Compute the radiative heat flux. ---*/ Radiative_Energy = nodes->GetSolution(iPoint, 0); - Radiative_Heat_Flux = 1.0*Theta*(Ib_w - Radiative_Energy); + Radiative_Heat_Flux = Theta*(Ib_w - Radiative_Energy); /*--- Compute the Viscous contribution to the residual ---*/ Res_Visc[0] = Radiative_Heat_Flux*Area; @@ -394,7 +394,7 @@ void CRadP1Solver::BC_Far_Field(CGeometry *geometry, CSolver **solver_container, /*--- Compute the radiative heat flux. ---*/ Radiative_Energy = nodes->GetSolution(iPoint, 0); - Radiative_Heat_Flux = 1.0*Theta*(Ib_w - Radiative_Energy); + Radiative_Heat_Flux = Theta*(Ib_w - Radiative_Energy); /*--- Compute the Viscous contribution to the residual ---*/ Res_Visc[0] = Radiative_Heat_Flux*Area; diff --git a/SU2_PY/SU2/eval/functions.py b/SU2_PY/SU2/eval/functions.py index 99372a9ebe7..4ecd3bd11d2 100644 --- a/SU2_PY/SU2/eval/functions.py +++ b/SU2_PY/SU2/eval/functions.py @@ -75,7 +75,7 @@ def function(func_name, config, state=None): state = su2io.State(state) # check for multiple objectives - multi_objective = type(func_name) == list + multi_objective = isinstance(func_name, list) # func_name_string is only used to check whether the function has already been evaluated. func_name_string = func_name diff --git a/SU2_PY/SU2/eval/gradients.py b/SU2_PY/SU2/eval/gradients.py index af6539ab5d0..db3a64cd331 100644 --- a/SU2_PY/SU2/eval/gradients.py +++ b/SU2_PY/SU2/eval/gradients.py @@ -76,7 +76,7 @@ def gradient(func_name, method, config, state=None): if func_name == "ALL": raise Exception("func_name = 'ALL' not yet supported") func_output = func_name - if type(func_name) == list: + if isinstance(func_name, list): if config.OPT_COMBINE_OBJECTIVE == "YES": func_output = "COMBO" else: @@ -184,7 +184,7 @@ def adjoint(func_name, config, state=None): # When a list of objectives is used, they are combined # and the output name is 'COMBO' - multi_objective = type(func_name) == list + multi_objective = isinstance(func_name, list) func_output = func_name if multi_objective: func_output = "COMBO"