Skip to content

Commit 4d2d293

Browse files
authored
Merge branch 'develop' into more_vectorization
2 parents 89d9a2c + 1f1e6e3 commit 4d2d293

42 files changed

Lines changed: 633 additions & 1523 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Common/include/linear_algebra/CSysVector.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class CSysVector : public VecExpr::CVecExpr<CSysVector<ScalarType>, ScalarType>
101101
/*!
102102
* \brief Default constructor of the class.
103103
*/
104-
CSysVector() = default;
104+
CSysVector() {}
105105

106106
/*!
107107
* \brief Destructor

Common/include/parallelization/vectorization.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class Array : public CVecExpr<Array<Scalar_t,N>, Scalar_t> {
7878
static constexpr bool StoreAsRef = true;
7979

8080
private:
81-
alignas(Align) Scalar x_[N];
81+
alignas(Size*sizeof(Scalar)) Scalar x_[N];
8282

8383
public:
8484
#define ARRAY_BOILERPLATE \

Common/src/CConfig.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4381,6 +4381,10 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
43814381
SU2_MPI::Error("BC transition model currently only available in combination with SA turbulence model!", CURRENT_FUNCTION);
43824382
}
43834383

4384+
if (Kind_Trans_Model == LM) {
4385+
SU2_MPI::Error("The LM transition model is under maintenance.", CURRENT_FUNCTION);
4386+
}
4387+
43844388
/*--- Check for constant lift mode. Initialize the update flag for
43854389
the AoA with each iteration to false ---*/
43864390

@@ -5539,6 +5543,7 @@ void CConfig::SetOutput(unsigned short val_software, unsigned short val_izone) {
55395543
case SST_SUST: cout << "Menter's SST with sustaining terms" << endl; break;
55405544
}
55415545
if (QCR) cout << "Using Quadratic Constitutive Relation, 2000 version (QCR2000)" << endl;
5546+
if (Kind_Trans_Model == BC) cout << "Using the revised BC transition model (2020)" << endl;
55425547
cout << "Hybrid RANS/LES: ";
55435548
switch (Kind_HybridRANSLES){
55445549
case NO_HYBRIDRANSLES: cout << "No Hybrid RANS/LES" << endl; break;

SU2_CFD/include/numerics/NEMO/NEMO_diffusion.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* \brief Class for computing viscous term using the average of gradients.
3535
* \ingroup ViscDiscr
3636
* \author S.R. Copeland, W. Maier, C. Garbacz
37-
* \version 7.0.6 "falcon"
37+
* \version 7.0.8 "Blackbird"
3838
*/
3939
class CAvgGrad_NEMO : public CNEMONumerics {
4040
private:

SU2_CFD/include/numerics/NEMO/convection/ausm.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,17 @@
3434
* \brief Class for solving an approximate Riemann AUSM.
3535
* \ingroup ConvDiscr
3636
* \author F. Palacios, S.R. Copeland, W. Maier, C. Garbacz
37-
* \version 7.0.6 'Falcon'
37+
* \version 7.0.8 'Blackbird'
3838
*/
3939
class CUpwAUSM_NEMO : public CNEMONumerics {
4040
private:
41-
su2double *FcL, *FcR, *FcLR;
42-
su2double *dmLP, *dmRM, *dpLP, *dpRM;
43-
su2double *daL, *daR;
41+
su2double *FcL, *FcR;
42+
//su2double *FcLR;
43+
//su2double *dmLP, *dmRM, *dpLP, *dpRM;
44+
//su2double *daL, *daR;
4445
su2double ProjVel_i, ProjVel_j;
45-
su2double sq_vel, Proj_ModJac_Tensor_ij;
46+
su2double sq_vel;
47+
//su2double Proj_ModJac_Tensor_ij;
4648

4749
public:
4850

@@ -64,4 +66,4 @@ class CUpwAUSM_NEMO : public CNEMONumerics {
6466
* \param[in] config - Definition of the particular problem.
6567
*/
6668
ResidualType<> ComputeResidual(const CConfig* config) final;
67-
};
69+
};

SU2_CFD/include/numerics/NEMO/convection/ausmplusup2.hpp

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,26 +38,14 @@
3838
class CUpwAUSMPLUSUP2_NEMO : public CNEMONumerics {
3939
private:
4040
su2double *FcL, *FcR, *FcLR;
41-
su2double *dmLP, *dmRM, *dpLP, *dpRM;
42-
su2double *daL, *daR;
41+
//su2double *dmLP, *dmRM, *dpLP, *dpRM;
42+
//su2double *daL, *daR;
4343
su2double ProjVel_i, ProjVel_j;
44-
su2double sq_vel, Proj_ModJac_Tensor_ij;
4544
su2double mL, mR, mLP, mRM, mF, pLP, pRM, pFi, pF, Phi;
4645
su2double CstarL, CstarR, ChatL, ChatR, aF, rhoF, MFsq, Mrefsq, Mp, fa;
4746
su2double Kp, sigma, alpha, beta, param1, mfP, mfM;
4847
su2double rhoCvtr_i, rhoCvtr_j, rhoCvve_i, rhoCvve_j;
4948

50-
/*--- Roe Only ---*/
51-
su2double *Diff_U;
52-
su2double *RoeU, *RoeV, *RoeEve;
53-
su2double *ProjFlux_i, *ProjFlux_j;
54-
su2double *Lambda, *Epsilon;
55-
su2double **P_Tensor, **invP_Tensor;
56-
su2double RoeSoundSpeed;
57-
su2double ProjVelocity, ProjVelocity_i, ProjVelocity_j;
58-
su2double R;
59-
su2double *RoedPdU;
60-
6149
public:
6250

6351
/*!

SU2_CFD/include/numerics/NEMO/convection/lax.hpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,18 @@
3434
* \brief Class for computing the Lax-Friedrich centered scheme.
3535
* \ingroup ConvDiscr
3636
* \author F. Palacios, S.R. Copeland, W. Maier, C. Garbacz
37-
* \version 2.0.6
37+
* \version 7.0.8
3838
*/
3939
class CCentLax_NEMO : public CNEMONumerics {
4040
private:
41-
unsigned short iDim, iVar, jVar; /*!< \brief Iteration on dimension and variables. */
41+
unsigned short iDim, iVar; /*!< \brief Iteration on dimension and variables. */
4242
su2double *Diff_U; /*!< \brief Difference of conservative variables. */
4343
su2double *MeanU, *MeanV;
44-
vector<su2double> mean_eves;
45-
su2double *MeandPdU;
4644
su2double *ProjFlux; /*!< \brief Projected inviscid flux tensor. */
4745
su2double Param_p, Param_Kappa_0; /*!< \brief Artificial dissipation parameters. */
4846
su2double Local_Lambda_i, Local_Lambda_j, MeanLambda; /*!< \brief Local eigenvalues. */
4947
su2double Phi_i, Phi_j, sc0, StretchingFactor; /*!< \brief Streching parameters. */
50-
su2double Epsilon_0, cte; /*!< \brief Artificial dissipation values. */
51-
bool stretching;
48+
su2double Epsilon_0; /*!< \brief Artificial dissipation values. */
5249

5350
public:
5451

SU2_CFD/include/solvers/CNEMOEulerSolver.hpp

Lines changed: 52 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ class CNEMOEulerSolver : public CFVMFlowSolverBase<CNEMOEulerVariable, COMPRESSI
5656

5757
unsigned long ErrorCounter = 0; /*!< \brief Counter for number of un-physical states. */
5858

59+
su2double Global_Delta_Time = 0.0, /*!< \brief Time-step for TIME_STEPPING time marching strategy. */
60+
Global_Delta_UnstTimeND = 0.0; /*!< \brief Unsteady time step for the dual time strategy. */
61+
5962
CNEMOGas *FluidModel; /*!< \brief fluid model used in the solver */
6063

6164
CNEMOEulerVariable* node_infty = nullptr;
@@ -75,30 +78,27 @@ class CNEMOEulerSolver : public CFVMFlowSolverBase<CNEMOEulerVariable, COMPRESSI
7578
CNEMOEulerSolver(CGeometry *geometry, CConfig *config, unsigned short iMesh, const bool navier_stokes = false);
7679

7780
/*!
78-
* \brief Destructor of the class.
79-
*/
81+
* \brief Destructor of the class.
82+
*/
8083
~CNEMOEulerSolver(void) override;
8184

8285
/*!
83-
* \brief Set the maximum value of the eigenvalue.
84-
* \param[in] geometry - Geometrical definition of the problem.
85-
* \param[in] config - Definition of the particular problem.
86-
*/
86+
* \brief Set the maximum value of the eigenvalue.
87+
* \param[in] geometry - Geometrical definition of the problem.
88+
* \param[in] config - Definition of the particular problem.
89+
*/
8790
void SetMax_Eigenvalue(CGeometry *geometry, CConfig *config);
8891

89-
/*!
90-
* \brief Compute the time step for solving the Euler equations.
91-
* \param[in] geometry - Geometrical definition of the problem.
92-
* \param[in] solver_container - Container vector with all the solutions.
93-
* \param[in] config - Definition of the particular problem.
94-
* \param[in] iMesh - Index of the mesh in multigrid computations.
95-
* \param[in] Iteration - Value of the current iteration.
96-
*/
97-
void SetTime_Step(CGeometry *geometry,
98-
CSolver **solver_container,
99-
CConfig *config,
100-
unsigned short iMesh,
101-
unsigned long Iteration) final;
92+
/*!
93+
* \brief Compute the time step for solving the Euler equations.
94+
* \param[in] geometry - Geometrical definition of the problem.
95+
* \param[in] solver_container - Container vector with all the solutions.
96+
* \param[in] config - Definition of the particular problem.
97+
* \param[in] iMesh - Index of the mesh in multigrid computations.
98+
* \param[in] Iteration - Value of the current iteration.
99+
*/
100+
void SetTime_Step(CGeometry *geometry, CSolver **solver_container,
101+
CConfig *config, unsigned short iMesh, unsigned long Iteration) final;
102102

103103
/*!
104104
* \brief Set the initial condition for the Euler Equations.
@@ -138,12 +138,21 @@ class CNEMOEulerSolver : public CFVMFlowSolverBase<CNEMOEulerVariable, COMPRESSI
138138
* \param[in] config - Definition of the particular problem.
139139
* \param[in] iMesh - Index of the mesh in multigrid computations.
140140
*/
141-
void Upwind_Residual(CGeometry *geometry,
142-
CSolver **solver_container,
143-
CNumerics **numerics_container,
144-
CConfig *config,
145-
unsigned short iMesh) final;
141+
void Upwind_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics_container,
142+
CConfig *config, unsigned short iMesh) final;
146143

144+
/*!
145+
* \brief Recompute the extrapolated quantities, after MUSCL reconstruction,
146+
* in a more thermodynamically consistent way.
147+
* \param[in] V - primitve variables.
148+
* \param[out] d*dU - reconstructed secondaryvariables.
149+
* \param[out] val_eves - reconstructed eve per species.
150+
* \param[out] val_cvves - reconstructed cvve per species.
151+
* \param[out] Gamma - reconstructed gamma.
152+
*/
153+
static su2double ComputeConsistentExtrapolation(CNEMOGas *fluidmodel, unsigned short nSpecies, su2double *V,
154+
su2double* dPdU, su2double* dTdU, su2double* dTvedU,
155+
su2double* val_eves, su2double* val_cvves);
147156
/*!
148157
* \brief Source term integration.
149158
* \param[in] geometry - Geometrical definition of the problem.
@@ -153,11 +162,8 @@ class CNEMOEulerSolver : public CFVMFlowSolverBase<CNEMOEulerVariable, COMPRESSI
153162
* \param[in] config - Definition of the particular problem.
154163
* \param[in] iMesh - Index of the mesh in multigrid computations.
155164
*/
156-
void Source_Residual(CGeometry *geometry,
157-
CSolver **solver_container,
158-
CNumerics **numerics_container,
159-
CConfig *config,
160-
unsigned short iMesh) final;
165+
void Source_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics_container,
166+
CConfig *config, unsigned short iMesh) final;
161167

162168
/*!
163169
* \brief Preprocessing actions common to the Euler and NS solvers.
@@ -199,6 +205,23 @@ class CNEMOEulerSolver : public CFVMFlowSolverBase<CNEMOEulerVariable, COMPRESSI
199205
*/
200206
void SetNondimensionalization(CConfig *config, unsigned short iMesh) final;
201207

208+
/*!
209+
* \brief Set all the conserved variables from the primitive vector..
210+
*/
211+
void RecomputeConservativeVector(su2double *U, const su2double *V) const;
212+
213+
/*!
214+
* \brief Check for unphysical points.
215+
* \return Boolean value of physical point
216+
*/
217+
bool CheckNonPhys(const su2double *V) const;
218+
219+
/*!
220+
* \brief Compute the pressure at the infinity.
221+
* \return Value of the pressure at the infinity.
222+
*/
223+
inline CNEMOGas* GetFluidModel(void) const final { return FluidModel;}
224+
202225
/*!
203226
* \brief Impose the far-field boundary condition using characteristics.
204227
* \param[in] geometry - Geometrical definition of the problem.

SU2_CFD/include/solvers/CNEMONSSolver.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
* \brief Main class for defining the NEMO Navier-Stokes flow solver.
3939
* \ingroup Navier_Stokes_Equations
4040
* \author S. R. Copeland, F. Palacios, W. Maier.
41-
* \version 6.1
41+
* \version 7.0.8
42+
*
4243
*/
4344
class CNEMONSSolver final : public CNEMOEulerSolver {
4445
private:

SU2_CFD/include/variables/CNEMOEulerVariable.hpp

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* \brief Main class for defining the variables of the NEMO Euler's solver.
3636
* \ingroup Euler_Equations
3737
* \author S. R. Copeland, F. Palacios, W. Maier, C. Garbacz
38-
* \version 7.0.6
38+
* \version 7.0.8
3939
*/
4040
class CNEMOEulerVariable : public CVariable {
4141
public:
@@ -157,12 +157,29 @@ class CNEMOEulerVariable : public CVariable {
157157
* \brief Get the primitive variables limiter.
158158
* \return Primitive variables limiter for the entire domain.
159159
*/
160-
inline MatrixType& GetLimiter_Primitive(void) {
160+
inline MatrixType& GetLimiter_Primitive(void) {return Limiter_Primitive; }
161161

162-
SU2_MPI::Error(string("Limiters (associated to MUSCL) are computed for conserved variables in the NEMO solver.") +
163-
string("Limiters for primitive variables are not allocated/computed."),
164-
CURRENT_FUNCTION);
165-
return Primitive;
162+
/*!
163+
* \brief Set the gradient of the primitive variables.
164+
* \param[in] iVar - Index of the variable.
165+
* \param[in] iDim - Index of the dimension.
166+
* \param[in] value - Value of the gradient.
167+
*/
168+
inline su2double GetLimiter_Primitive(unsigned long iPoint, unsigned long iVar) const final {return Limiter_Primitive(iPoint,iVar); }
169+
170+
/*!
171+
* \brief Get the value of the primitive variables gradient.
172+
* \return Value of the primitive variables gradient.
173+
*/
174+
inline su2double *GetLimiter_Primitive(unsigned long iPoint) final { return Limiter_Primitive[iPoint]; }
175+
176+
/*!
177+
* \brief Set the gradient of the primitive variables.
178+
* \param[in] iVar - Index of the variable.
179+
* \param[in] value - Value of the gradient.
180+
*/
181+
inline void SetLimiter_Primitive(unsigned long iPoint, unsigned long iVar, su2double value) final {
182+
Limiter_Primitive(iPoint,iVar) = value;
166183
}
167184

168185
/*!
@@ -332,21 +349,13 @@ class CNEMOEulerVariable : public CVariable {
332349
*/
333350
bool SetPrimVar(unsigned long iPoint, CFluidModel *FluidModel) override;
334351

335-
/*!
336-
* \brief Set all the conserved variables.
352+
/*!
353+
* \brief Set all the primitive and secondary variables from the conserved vector.
337354
*/
338355
bool Cons2PrimVar(su2double *U, su2double *V, su2double *dPdU,
339356
su2double *dTdU, su2double *dTvedU, su2double *val_eves,
340357
su2double *val_Cvves);
341358

342-
/*!
343-
* \brief Check for unphysical points.
344-
* \return Boolean value of physical point
345-
*/
346-
bool CheckNonPhys(su2double *U, su2double *V, su2double *dPdU,
347-
su2double *dTdU, su2double *dTvedU, su2double *val_eves,
348-
su2double *val_Cvves);
349-
350359
/*---------------------------------------*/
351360
/*--- Specific variable routines ---*/
352361
/*---------------------------------------*/

0 commit comments

Comments
 (0)