@@ -46,10 +46,9 @@ CNEMOEulerSolver::CNEMOEulerSolver(CGeometry *geometry, CConfig *config,
4646 description = " Euler" ;
4747 }
4848
49- unsigned long iPoint, counter_local, counter_global = 0 ;
50- unsigned short iDim, iMarker, iSpecies, nLineLets;
49+ unsigned short iMarker, nLineLets;
5150 unsigned short nZone = geometry->GetnZone ();
52- su2double *Mvec_Inf, Alpha, Beta, Soundspeed_Inf, sqvel ;
51+ su2double *Mvec_Inf, Alpha, Beta;
5352 bool restart = (config->GetRestart () || config->GetRestart_Flow ());
5453 unsigned short direct_diff = config->GetDirectDiff ();
5554 int Unst_RestartIter = 0 ;
@@ -59,8 +58,6 @@ CNEMOEulerSolver::CNEMOEulerSolver(CGeometry *geometry, CConfig *config,
5958 bool adjoint = config->GetDiscrete_Adjoint ();
6059 string filename_ = " flow" ;
6160
62- bool nonPhys;
63-
6461 /* --- Store the multigrid level. ---*/
6562 MGLevel = iMesh;
6663
@@ -216,52 +213,6 @@ CNEMOEulerSolver::CNEMOEulerSolver(CGeometry *geometry, CConfig *config,
216213
217214 node_infty->SetPrimVar (0 , FluidModel);
218215
219- /* --- Check that the initial solution is physical, report any non-physical nodes ---*/
220-
221- counter_local = 0 ;
222-
223- for (iPoint = 0 ; iPoint < nPoint; iPoint++) {
224-
225- nonPhys = nodes->SetPrimVar (iPoint, FluidModel);
226-
227- /* --- Set mixture state ---*/
228- FluidModel->SetTDStatePTTv (Pressure_Inf, MassFrac_Inf, Temperature_Inf, Temperature_ve_Inf);
229-
230- /* --- Compute other freestream quantities ---*/
231- Density_Inf = FluidModel->GetDensity ();
232- Soundspeed_Inf = FluidModel->GetSoundSpeed ();
233-
234- sqvel = 0.0 ;
235- for (iDim = 0 ; iDim < nDim; iDim++){
236- sqvel += Mvec_Inf[iDim]*Soundspeed_Inf * Mvec_Inf[iDim]*Soundspeed_Inf;
237- }
238- const auto & Energies_Inf = FluidModel->ComputeMixtureEnergies ();
239-
240- /* --- Initialize Solution & Solution_Old vectors ---*/
241- for (iSpecies = 0 ; iSpecies < nSpecies; iSpecies++) {
242- Solution[iSpecies] = Density_Inf*MassFrac_Inf[iSpecies];
243- }
244- for (iDim = 0 ; iDim < nDim; iDim++) {
245- Solution[nSpecies+iDim] = Density_Inf*Mvec_Inf[iDim]*Soundspeed_Inf;
246- }
247- Solution[nSpecies+nDim] = Density_Inf*(Energies_Inf[0 ] + 0.5 *sqvel);
248- Solution[nSpecies+nDim+1 ] = Density_Inf*Energies_Inf[1 ];
249- nodes->SetSolution (iPoint,Solution);
250- nodes->SetSolution_Old (iPoint,Solution);
251-
252- if (nonPhys)
253- counter_local++;
254- }
255-
256- /* --- Warning message about non-physical points ---*/
257- if (config->GetComm_Level () == COMM_FULL) {
258-
259- SU2_MPI::Reduce (&counter_local, &counter_global, 1 , MPI_UNSIGNED_LONG, MPI_SUM, MASTER_NODE, SU2_MPI::GetComm ());
260-
261- if ((rank == MASTER_NODE) && (counter_global != 0 ))
262- cout << " Warning. The original solution contains " << counter_global << " points that are not physical." << endl;
263- }
264-
265216 /* --- Initial comms. ---*/
266217
267218 CommunicateInitialState (geometry, config);
@@ -303,7 +254,9 @@ void CNEMOEulerSolver::CommonPreprocessing(CGeometry *geometry, CSolver **solver
303254 unsigned long tmp = ErrorCounter;
304255 SU2_MPI::Allreduce (&tmp, &ErrorCounter, 1 , MPI_UNSIGNED_LONG, MPI_SUM, SU2_MPI::GetComm ());
305256 config->SetNonphysical_Points (ErrorCounter);
306-
257+
258+ if ((rank == MASTER_NODE) && (ErrorCounter != 0 ))
259+ cout << " Warning. The initial solution contains " << ErrorCounter << " points that are not physical." << endl;
307260 }
308261
309262 /* --- Artificial dissipation ---*/
0 commit comments