@@ -46,17 +46,20 @@ CNEMOEulerSolver::CNEMOEulerSolver(CGeometry *geometry, CConfig *config,
4646 description = " Euler" ;
4747 }
4848
49+ const auto nZone = geometry->GetnZone ();
50+ const bool restart = (config->GetRestart () || config->GetRestart_Flow ());
51+ const auto direct_diff = config->GetDirectDiff ();
52+ const bool dual_time = (config->GetTime_Marching () == TIME_MARCHING::DT_STEPPING_1ST) ||
53+ (config->GetTime_Marching () == TIME_MARCHING::DT_STEPPING_2ND);
54+ const bool time_stepping = (config->GetTime_Marching () == TIME_MARCHING::TIME_STEPPING);
55+ const bool adjoint = config->GetContinuous_Adjoint () || config->GetDiscrete_Adjoint ();
56+
57+ int Unst_RestartIter = 0 ;
4958 unsigned short iMarker, nLineLets;
50- unsigned short nZone = geometry->GetnZone ();
5159 su2double *Mvec_Inf, Alpha, Beta;
52- bool restart = (config->GetRestart () || config->GetRestart_Flow ());
53- unsigned short direct_diff = config->GetDirectDiff ();
54- int Unst_RestartIter = 0 ;
55- bool dual_time = ((config->GetTime_Marching () == TIME_MARCHING::DT_STEPPING_1ST) ||
56- (config->GetTime_Marching () == TIME_MARCHING::DT_STEPPING_2ND));
57- bool time_stepping = config->GetTime_Marching () == TIME_MARCHING::TIME_STEPPING;
58- bool adjoint = config->GetDiscrete_Adjoint ();
59- string filename_ = " flow" ;
60+
61+ /* --- A grid is defined as dynamic if there's rigid grid movement or grid deformation AND the problem is time domain ---*/
62+ dynamic_grid = config->GetDynamic_Grid ();
6063
6164 /* --- Store the multigrid level. ---*/
6265 MGLevel = iMesh;
@@ -79,6 +82,7 @@ CNEMOEulerSolver::CNEMOEulerSolver(CGeometry *geometry, CConfig *config,
7982 else Unst_RestartIter = SU2_TYPE::Int (config->GetRestart_Iter ())-1 ;
8083 }
8184
85+ string filename_ = " flow" ;
8286 filename_ = config->GetFilename (filename_, " .meta" , Unst_RestartIter);
8387
8488 /* --- Read and store the restart metadata ---*/
@@ -246,18 +250,24 @@ void CNEMOEulerSolver::CommonPreprocessing(CGeometry *geometry, CSolver **solver
246250 bool center_jst_ke = (config->GetKind_Centered_Flow () == JST_KE) && (iMesh == MESH_0);
247251
248252 /* --- Set the primitive variables ---*/
249- ErrorCounter = 0 ;
253+ ompMasterAssignBarrier (ErrorCounter,0 );
254+ SU2_OMP_ATOMIC
250255 ErrorCounter += SetPrimitive_Variables (solver_container, config, Output);
256+ SU2_OMP_BARRIER
251257
252- if ((iMesh == MESH_0) && (config-> GetComm_Level () == COMM_FULL)) {
258+ SU2_OMP_MASTER { /* --- Ops that are not OpenMP parallel go in this block. --- */
253259
260+ if ((iMesh == MESH_0) && (config->GetComm_Level () == COMM_FULL)) {
254261 unsigned long tmp = ErrorCounter;
255262 SU2_MPI::Allreduce (&tmp, &ErrorCounter, 1 , MPI_UNSIGNED_LONG, MPI_SUM, SU2_MPI::GetComm ());
256263 config->SetNonphysical_Points (ErrorCounter);
257264
258265 if ((rank == MASTER_NODE) && (ErrorCounter != 0 ))
259266 cout << " Warning. The initial solution contains " << ErrorCounter << " points that are not physical." << endl;
267+ }
260268 }
269+ END_SU2_OMP_MASTER
270+ SU2_OMP_BARRIER
261271
262272 /* --- Artificial dissipation ---*/
263273
@@ -986,7 +996,7 @@ void CNEMOEulerSolver::SetNondimensionalization(CConfig *config, unsigned short
986996 Gas_ConstantND = 0.0 , Viscosity_FreeStreamND = 0.0 , sqvel = 0.0 ,
987997 Tke_FreeStreamND = 0.0 , Total_UnstTimeND = 0.0 , Delta_UnstTimeND = 0.0 ,
988998 soundspeed = 0.0 , GasConstant_Inf = 0.0 , Froude = 0.0 ,
989- Density_FreeStreamND = 0.0 ;
999+ Density_FreeStreamND = 0.0 , Heat_Flux_Ref = 0.0 ;
9901000
9911001 su2double Velocity_FreeStreamND[3 ] = {0.0 , 0.0 , 0.0 };
9921002
@@ -1153,6 +1163,7 @@ void CNEMOEulerSolver::SetNondimensionalization(CConfig *config, unsigned short
11531163 Time_Ref = Length_Ref/Velocity_Ref; config->SetTime_Ref (Time_Ref);
11541164 Omega_Ref = Velocity_Ref/Length_Ref; config->SetOmega_Ref (Omega_Ref);
11551165 Force_Ref = config->GetDensity_Ref ()*Velocity_Ref*Velocity_Ref*Length_Ref*Length_Ref; config->SetForce_Ref (Force_Ref);
1166+ Heat_Flux_Ref = Density_Ref*Velocity_Ref*Velocity_Ref*Velocity_Ref; config->SetHeat_Flux_Ref (Heat_Flux_Ref);
11561167 Gas_Constant_Ref = Velocity_Ref*Velocity_Ref/config->GetTemperature_Ref (); config->SetGas_Constant_Ref (Gas_Constant_Ref);
11571168 Viscosity_Ref = config->GetDensity_Ref ()*Velocity_Ref*Length_Ref; config->SetViscosity_Ref (Viscosity_Ref);
11581169 Conductivity_Ref = Viscosity_Ref*Gas_Constant_Ref; config->SetConductivity_Ref (Conductivity_Ref);
@@ -1640,12 +1651,10 @@ void CNEMOEulerSolver::BC_Far_Field(CGeometry *geometry, CSolver **solver_contai
16401651
16411652void CNEMOEulerSolver::BC_Inlet (CGeometry *geometry, CSolver **solver_container,
16421653 CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) {
1643-
1644-
1645-
16461654 SU2_MPI::Error (" BC_INLET: Not operational in NEMO." , CURRENT_FUNCTION);
16471655
16481656 unsigned short iVar, iDim, iSpecies, RHO_INDEX, nSpecies;
1657+
16491658 unsigned long iVertex, iPoint;
16501659 su2double T_Total, P_Total, Velocity[3 ], Velocity2, H_Total, Temperature, Riemann,
16511660 Pressure, Density, Energy, Mach2, SoundSpeed2, SoundSpeed_Total2, Vel_Mag,
0 commit comments