Skip to content

Commit 58e66ea

Browse files
fix warning
1 parent 5477a05 commit 58e66ea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

SU2_CFD/src/solvers/CIncEulerSolver.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,6 +2098,8 @@ void CIncEulerSolver::SetPreconditioner(const CConfig *config, unsigned long iPo
20982098

20992099
if (variable_density) {
21002100
dRhodh = -Density / (Cp * Temperature);
2101+
} else {
2102+
dRhodh = 0.0;
21012103
}
21022104

21032105
/*--- Calculating the inverse of the preconditioning matrix
@@ -2128,8 +2130,7 @@ void CIncEulerSolver::SetPreconditioner(const CConfig *config, unsigned long iPo
21282130
}
21292131

21302132
Preconditioner[0][nDim+1] = dRhodh;
2131-
for (iDim = 0; iDim < nDim; iDim++)
2132-
Preconditioner[iDim+1][nDim+1] = Velocity[iDim]*dRhodh;
2133+
for (iDim = 0; iDim < nDim; iDim++) Preconditioner[iDim+1][nDim+1] = Velocity[iDim] * dRhodh;
21332134

21342135
if (energy) {
21352136
Preconditioner[nDim+1][nDim+1] = dRhodh * Enthalpy + Density;

0 commit comments

Comments
 (0)