Skip to content

Commit ad55dc2

Browse files
committed
fix windows build
1 parent 24cc96c commit ad55dc2

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

Common/include/option_structure.hpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,23 @@ const unsigned int ZONE_0 = 0; /*!< \brief Definition of the first grid domain.
9191
const unsigned int ZONE_1 = 1; /*!< \brief Definition of the second grid domain. */
9292
const unsigned int INST_0 = 0; /*!< \brief Definition of the first instance per grid level. */
9393

94-
const su2double STANDARD_GRAVITY = 9.80665; /*!< \brief Acceleration due to gravity at surface of earth. */
95-
const su2double UNIVERSAL_GAS_CONSTANT = 8.3144598; /*!< \brief Universal gas constant in J/(mol*K) */
96-
const su2double BOLTZMANN_CONSTANT = 1.3806503E-23; /*!< \brief Boltzmann's constant [J K^-1] */
97-
const su2double AVOGAD_CONSTANT = 6.0221415E26; /*!< \brief Avogadro's constant, number of particles in one kmole. */
98-
const su2double FUND_ELEC_CHARGE_CGS = 4.8032047E-10; /*!< \brief Fundamental electric charge in CGS units, cm^(3/2) g^(1/2) s^(-1). */
94+
static constexpr passivedouble STANDARD_GRAVITY = 9.80665; /*!< \brief Acceleration due to gravity at surface of earth. */
95+
static constexpr passivedouble UNIVERSAL_GAS_CONSTANT = 8.3144598; /*!< \brief Universal gas constant in J/(mol*K) */
96+
static constexpr passivedouble BOLTZMANN_CONSTANT = 1.3806503E-23; /*!< \brief Boltzmann's constant [J K^-1] */
97+
static constexpr passivedouble AVOGAD_CONSTANT = 6.0221415E26; /*!< \brief Avogadro's constant, number of particles in one kmole. */
98+
static constexpr passivedouble FUND_ELEC_CHARGE_CGS = 4.8032047E-10; /*!< \brief Fundamental electric charge in CGS units, cm^(3/2) g^(1/2) s^(-1). */
9999

100-
const su2double EPS = 1.0E-16; /*!< \brief Error scale. */
101-
const su2double TURB_EPS = 1.0E-16; /*!< \brief Turbulent Error scale. */
100+
static constexpr passivedouble EPS = 1.0E-16; /*!< \brief Error scale. */
101+
static constexpr passivedouble TURB_EPS = 1.0E-16; /*!< \brief Turbulent Error scale. */
102102

103-
const su2double ONE2 = 0.5; /*!< \brief One divided by two. */
104-
const su2double ONE3 = 1.0 / 3.0; /*!< \brief One divided by three. */
105-
const su2double TWO3 = 2.0 / 3.0; /*!< \brief Two divided by three. */
106-
const su2double FOUR3 = 4.0 / 3.0; /*!< \brief Four divided by three. */
103+
static constexpr passivedouble ONE2 = 0.5; /*!< \brief One divided by two. */
104+
static constexpr passivedouble ONE3 = 1.0 / 3.0; /*!< \brief One divided by three. */
105+
static constexpr passivedouble TWO3 = 2.0 / 3.0; /*!< \brief Two divided by three. */
106+
static constexpr passivedouble FOUR3 = 4.0 / 3.0; /*!< \brief Four divided by three. */
107107

108-
const su2double PI_NUMBER = 4.0 * atan(1.0); /*!< \brief Pi number. */
108+
static constexpr passivedouble PI_NUMBER = 3.14159265358979323846; /*!< \brief Pi number (not using M_PI to avoid Windows issues). */
109109

110-
const su2double STEFAN_BOLTZMANN = 5.670367E-08; /*!< \brief Stefan-Boltzmann constant in W/(m^2*K^4). */
110+
static constexpr passivedouble STEFAN_BOLTZMANN = 5.670367E-08; /*!< \brief Stefan-Boltzmann constant in W/(m^2*K^4). */
111111

112112
const int MASTER_NODE = 0; /*!< \brief Master node for MPI parallelization. */
113113
const int SINGLE_NODE = 1; /*!< \brief There is only a node in the MPI parallelization. */
@@ -195,7 +195,7 @@ const int SU2_CONN_SIZE = 10; /*!< \brief Size of the connectivity array that
195195
that we read from a mesh file in the format [[globalID vtkType n0 n1 n2 n3 n4 n5 n6 n7 n8]. */
196196
const int SU2_CONN_SKIP = 2; /*!< \brief Offset to skip the globalID and VTK type at the start of the element connectivity list for each CGNS element. */
197197

198-
const su2double COLORING_EFF_THRESH = 0.875; /*!< \brief Below this value fallback strategies are used instead. */
198+
static constexpr passivedouble COLORING_EFF_THRESH = 0.875; /*!< \brief Below this value fallback strategies are used instead. */
199199

200200
/*--- All temperature polynomial fits for the fluid models currently
201201
assume a quartic form (5 coefficients). For example,

SU2_CFD/src/iteration/CFluidIteration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ void CFluidIteration::UpdateRamp(CGeometry**** geometry_container, CConfig** con
348348
config->SetMUSCLRampValue(std::pow(std::min<double>(1.0, iterFrac), RampMUSCLParam.RampMUSCLPower));
349349
break;
350350
case MUSCL_RAMP_TYPE::SMOOTH_FUNCTION:
351-
config->SetMUSCLRampValue(std::pow((0.5 * (1 - cos(M_PI * std::min(1.0, iterFrac)))), RampMUSCLParam.RampMUSCLPower));
351+
config->SetMUSCLRampValue(std::pow((0.5 * (1 - cos(PI_NUMBER * std::min(1.0, iterFrac)))), RampMUSCLParam.RampMUSCLPower));
352352
break;
353353
default:
354354
break;

0 commit comments

Comments
 (0)