Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation with GCC 4.8.5 #1421

Merged
merged 1 commit into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions SU2_CFD/include/solvers/CScalarSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ class CScalarSolver : public CSolver {

unsigned long omp_chunk_size; /*!< \brief Chunk size used in light point loops. */

su2double lowerlimit[MAXNVAR] = {0.0}; /*!< \brief contains lower limits for turbulence variables. Note that ::min()
returns the smallest positive value for floats. */
su2double upperlimit[MAXNVAR] = {0.0}; /*!< \brief contains upper limits for turbulence variables. */
su2double lowerlimit[MAXNVAR]; /*!< \brief contains lower limits for turbulence variables. Note that ::min()
returns the smallest positive value for floats. */
su2double upperlimit[MAXNVAR]; /*!< \brief contains upper limits for turbulence variables. */

su2double Solution_Inf[MAXNVAR] = {0.0}; /*!< \brief Far-field solution. */
su2double Solution_Inf[MAXNVAR]; /*!< \brief Far-field solution. */

const bool Conservative; /*!< \brief Transported Variable is conservative. Solution has to be multiplied with rho. */

Expand Down Expand Up @@ -171,11 +171,6 @@ class CScalarSolver : public CSolver {
virtual void ComputeUnderRelaxationFactor(const CConfig* config) {}

public:
/*!
* \brief Constructor of the class.
*/
CScalarSolver(bool conservative);

/*!
* \brief Destructor of the class.
*/
Expand Down
3 changes: 0 additions & 3 deletions SU2_CFD/include/solvers/CScalarSolver.inl
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
#include "../../include/solvers/CScalarSolver.hpp"
#include "../../include/variables/CFlowVariable.hpp"

template <class VariableType>
CScalarSolver<VariableType>::CScalarSolver(bool conservative) : CSolver(), Conservative(conservative) {}

template <class VariableType>
CScalarSolver<VariableType>::CScalarSolver(CGeometry* geometry, CConfig* config, bool conservative)
: CSolver(), Conservative(conservative) {
Expand Down
6 changes: 1 addition & 5 deletions SU2_CFD/include/solvers/CTransLMSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,8 @@
class CTransLMSolver final : public CTurbSolver {
private:
su2double Intermittency_Inf, REth_Inf;
public:
/*!
* \brief Constructor of the class.
*/
CTransLMSolver(void);

public:
/*!
* \overload
* \param[in] geometry - Geometrical definition of the problem.
Expand Down
7 changes: 1 addition & 6 deletions SU2_CFD/include/solvers/CTurbSASolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,7 @@ class CTurbSASolver final : public CTurbSolver {

public:
/*!
* \brief Constructor of the class.
*/
CTurbSASolver();

/*!
* \overload
* \brief Constructor.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
* \param[in] iMesh - Index of the mesh in multigrid computations.
Expand Down
15 changes: 3 additions & 12 deletions SU2_CFD/include/solvers/CTurbSSTSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@
*/
class CTurbSSTSolver final : public CTurbSolver {
private:
su2double
constants[10] = {0.0}; /*!< \brief Constants for the model. */


su2double constants[10] = {0.0}; /*!< \brief Constants for the model. */

/*!
* \brief Compute nu tilde from the wall functions.
Expand All @@ -56,15 +53,9 @@ class CTurbSSTSolver final : public CTurbSolver {
const CConfig *config,
unsigned short val_marker);


public:
/*!
* \brief Constructor of the class.
*/
CTurbSSTSolver(void);

/*!
* \overload
* \brief Constructor.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
* \param[in] iMesh - Index of the mesh in multigrid computations.
Expand Down Expand Up @@ -310,5 +301,5 @@ class CTurbSSTSolver final : public CTurbSolver {
*/
inline su2double GetOmega_Inf(void) const override { return Solution_Inf[1]; }


};
6 changes: 0 additions & 6 deletions SU2_CFD/include/solvers/CTurbSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ class CTurbSolver : public CScalarSolver<CTurbVariable> {


public:

/*!
* \brief Constructor of the class.
*/
CTurbSolver(bool conservative);

/*!
* \brief Destructor of the class.
*/
Expand Down
8 changes: 4 additions & 4 deletions SU2_CFD/src/solvers/CTransLMSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
#include "../../include/variables/CTurbSAVariable.hpp"

/*--- This is the implementation of the Langtry-Menter transition model.
The main reference for this model is:Langtry, Menter, AIAA J. 47(12) 2009
The main reference for this model is:Langtry, Menter, AIAA J. 47(12) 2009
DOI: https://doi.org/10.2514/1.42362 ---*/

// Note: TransLM seems to use rho*gamma, rho*Re_sigma as Solution variables, thus Conservative=true
CTransLMSolver::CTransLMSolver(void) : CTurbSolver(true) {}

CTransLMSolver::CTransLMSolver(CGeometry *geometry, CConfig *config, unsigned short iMesh) : CTurbSolver(true) {
CTransLMSolver::CTransLMSolver(CGeometry *geometry, CConfig *config, unsigned short iMesh)
: CTurbSolver(geometry, config, true) {
unsigned short iVar, nLineLets;
unsigned long iPoint, index;
su2double tu_Inf, dull_val, rey;
Expand Down
2 changes: 0 additions & 2 deletions SU2_CFD/src/solvers/CTurbSASolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "../../../Common/include/toolboxes/geometry_toolbox.hpp"


CTurbSASolver::CTurbSASolver(void) : CTurbSolver(false) { }

CTurbSASolver::CTurbSASolver(CGeometry *geometry, CConfig *config, unsigned short iMesh, CFluidModel* FluidModel)
: CTurbSolver(geometry, config, false) {

Expand Down
2 changes: 0 additions & 2 deletions SU2_CFD/src/solvers/CTurbSSTSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "../../../Common/include/toolboxes/geometry_toolbox.hpp"


CTurbSSTSolver::CTurbSSTSolver(void) : CTurbSolver(true) { }

CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned short iMesh)
: CTurbSolver(geometry, config, true) {
unsigned short nLineLets;
Expand Down
4 changes: 0 additions & 4 deletions SU2_CFD/src/solvers/CTurbSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,12 @@
/*--- Explicit instantiation of the parent class of CTurbSolver. ---*/
template class CScalarSolver<CTurbVariable>;

CTurbSolver::CTurbSolver(bool conservative) : CScalarSolver<CTurbVariable>(conservative) { }

CTurbSolver::CTurbSolver(CGeometry* geometry, CConfig *config, bool conservative) : CScalarSolver<CTurbVariable>(geometry, config, conservative) { }

CTurbSolver::~CTurbSolver() {

for (auto& mat : SlidingState) {
for (auto ptr : mat) delete [] ptr;
}

}

void CTurbSolver::BC_Riemann(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) {
Expand Down