Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Common/src/linear_algebra/CSysMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void CSysMatrix<ScalarType>::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);
}

Expand Down
2 changes: 1 addition & 1 deletion Common/src/wall_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
10 changes: 5 additions & 5 deletions SU2_CFD/src/solvers/CEulerSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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()){
Expand Down
4 changes: 2 additions & 2 deletions SU2_CFD/src/solvers/CHeatSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ void CHeatSolver::Heat_Fluxes(CGeometry *geometry, CSolver **solver_container, C
for (auto iDim = 0u; iDim < nDim; iDim++) dist += (Coord_Normal[iDim]-Coord[iDim])*(Coord_Normal[iDim]-Coord[iDim]);
dist = sqrt(dist);

dTdn = (Twall - nodes->GetTemperature(iPointNormal))/dist;
dTdn = (Twall - nodes->GetTemperature(iPointNormal))/fmax(dist, EPS);
Comment thread
pcarruscag marked this conversation as resolved.
Outdated

HeatFlux[iMarker][iVertex] = thermal_diffusivity*dTdn*config->GetHeat_Flux_Ref();

Expand Down Expand Up @@ -668,7 +668,7 @@ void CHeatSolver::Heat_Fluxes(CGeometry *geometry, CSolver **solver_container, C
for (auto iDim = 0u; iDim < nDim; iDim++) dist += (Coord_Normal[iDim]-Coord[iDim])*(Coord_Normal[iDim]-Coord[iDim]);
dist = sqrt(dist);

dTdn = (Twall - nodes->GetTemperature(iPointNormal))/dist;
dTdn = (Twall - nodes->GetTemperature(iPointNormal))/fmax(dist, EPS);

HeatFlux[iMarker][iVertex] = thermal_diffusivity*dTdn*config->GetHeat_Flux_Ref();

Expand Down
2 changes: 1 addition & 1 deletion SU2_CFD/src/solvers/CIncEulerSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion SU2_CFD/src/solvers/CNEMOEulerSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---*/
Expand Down
2 changes: 1 addition & 1 deletion SU2_CFD/src/solvers/CNEMONSSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions SU2_CFD/src/solvers/CRadP1Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion SU2_PY/SU2/eval/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Comment thread
pcarruscag marked this conversation as resolved.

# func_name_string is only used to check whether the function has already been evaluated.
func_name_string = func_name
Expand Down
4 changes: 2 additions & 2 deletions SU2_PY/SU2/eval/gradients.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down
Loading