@@ -6456,7 +6456,7 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
64566456 unsigned short iDim;
64576457 unsigned long iVertex, iPoint;
64586458 su2double P_Total, T_Total, Velocity[MAXNDIM], Velocity2, H_Total, Temperature, Riemann,
6459- Pressure, Density, Energy, * Flow_Dir, Mach2, SoundSpeed2, SoundSpeed_Total2, Vel_Mag,
6459+ Pressure, Density, Energy, Flow_Dir[MAXNDIM] = { 0.0 } , Mach2, SoundSpeed2, SoundSpeed_Total2, Vel_Mag,
64606460 alpha, aa, bb, cc, dd, Area, UnitNormal[MAXNDIM], Normal[MAXNDIM] = {0.0 };
64616461 su2double *V_inlet, *V_domain;
64626462
@@ -6510,13 +6510,17 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
65106510
65116511 /* --- Total properties have been specified at the inlet. ---*/
65126512
6513- case INLET_TYPE::TOTAL_CONDITIONS:
6513+ case INLET_TYPE::TOTAL_CONDITIONS: {
65146514
65156515 /* --- Retrieve the specified total conditions for this inlet. ---*/
65166516
65176517 P_Total = Inlet_Ptotal[val_marker][iVertex];
65186518 T_Total = Inlet_Ttotal[val_marker][iVertex];
6519- Flow_Dir = Inlet_FlowDir[val_marker][iVertex];
6519+ const su2double* dir = Inlet_FlowDir[val_marker][iVertex];
6520+ const su2double mag = GeometryToolbox::Norm (nDim, dir);
6521+ for (iDim = 0 ; iDim < nDim; iDim++) {
6522+ Flow_Dir[iDim] = dir[iDim] / mag
6523+ }
65206524
65216525 /* --- Non-dim. the inputs if necessary. ---*/
65226526
@@ -6623,7 +6627,11 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
66236627
66246628 Density = Inlet_Ttotal[val_marker][iVertex];
66256629 Vel_Mag = Inlet_Ptotal[val_marker][iVertex];
6626- Flow_Dir = Inlet_FlowDir[val_marker][iVertex];
6630+ const su2double* dir = Inlet_FlowDir[val_marker][iVertex];
6631+ const su2double mag = GeometryToolbox::Norm (nDim, dir);
6632+ for (iDim = 0 ; iDim < nDim; iDim++) {
6633+ Flow_Dir[iDim] = dir[iDim] / mag
6634+ }
66276635
66286636 /* --- Non-dim. the inputs if necessary. ---*/
66296637
0 commit comments