Skip to content

Commit 9cbb0a0

Browse files
committed
Addressed Comments
1 parent 281d976 commit 9cbb0a0

3 files changed

Lines changed: 5 additions & 11 deletions

File tree

SU2_CFD/src/solvers/CNEMOEulerSolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ void CNEMOEulerSolver::CommonPreprocessing(CGeometry *geometry, CSolver **solver
256256
config->SetNonphysical_Points(ErrorCounter);
257257

258258
if ((rank == MASTER_NODE) && (ErrorCounter != 0))
259-
cout << "Warning. The original solution contains "<< ErrorCounter << " points that are not physical." << endl;
259+
cout << "Warning. The initial solution contains "<< ErrorCounter << " points that are not physical." << endl;
260260
}
261261

262262
/*--- Artificial dissipation ---*/

SU2_CFD/src/solvers/CSolverFactory.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,6 @@ CSolver* CSolverFactory::CreateFlowSolver(SUB_SOLVER_TYPE kindFlowSolver, CSolve
429429
break;
430430
case SUB_SOLVER_TYPE::NEMO_EULER:
431431
flowSolver = new CNEMOEulerSolver(geometry, config, iMGLevel);
432-
//flowSolver->Preprocessing(geometry, solver, config, iMGLevel, NO_RK_ITER, RUNTIME_FLOW_SYS, false);
433432
break;
434433
case SUB_SOLVER_TYPE::NEMO_NAVIER_STOKES:
435434
flowSolver = new CNEMONSSolver(geometry, config, iMGLevel);

SU2_CFD/src/variables/CNEMOEulerVariable.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ CNEMOEulerVariable::CNEMOEulerVariable(su2double val_pressure,
4545
config ),
4646
Gradient_Reconstruction(config->GetReconstructionGradientRequired() ? Gradient_Aux : Gradient_Primitive) {
4747

48-
vector<su2double> energies;
4948
unsigned short iDim, iSpecies;
50-
su2double soundspeed, rho;
51-
su2double sqvel = 0.0;
5249

5350
/*--- Setting variable amounts ---*/
5451
nDim = ndim;
@@ -148,12 +145,10 @@ CNEMOEulerVariable::CNEMOEulerVariable(su2double val_pressure,
148145
fluidmodel->SetTDStatePTTv(val_pressure, val_massfrac, val_temperature, val_temperature_ve);
149146

150147
/*--- Compute necessary quantities ---*/
151-
rho = fluidmodel->GetDensity();
152-
soundspeed = fluidmodel->ComputeSoundSpeed();
153-
for (iDim = 0; iDim < nDim; iDim++){
154-
sqvel += val_mach[iDim]*soundspeed * val_mach[iDim]*soundspeed;
155-
}
156-
energies = fluidmodel->ComputeMixtureEnergies();
148+
const su2double rho = fluidmodel->GetDensity();
149+
const su2double soundspeed = fluidmodel->ComputeSoundSpeed();
150+
const su2double sqvel = GeometryToolbox::SquaredNorm(nDim, val_mach) * pow(soundspeed,2);
151+
const auto& energies = fluidmodel->ComputeMixtureEnergies();
157152

158153
/*--- Loop over all points --*/
159154
for(unsigned long iPoint = 0; iPoint < nPoint; ++iPoint){

0 commit comments

Comments
 (0)