Skip to content

Commit b9e6b59

Browse files
Reordered the parameters to fix a clang sanitizer issue.
1 parent 8f77c6d commit b9e6b59

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ target_compile_options(
596596
)
597597
if (SINGULARITY_STRICT_WARNINGS)
598598
target_compile_options(singularity-eos_Interface INTERFACE
599-
-Wall -Werror -Wno-unknown-pragmas)
599+
-Wall -Werror -Wno-unknown-pragmas)
600600
endif()
601601

602602
if(TARGET singularity-eos_Library)

singularity-eos/eos/eos_simple_macaw.hpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ class SimpleMACAW : public EosBase<SimpleMACAW> {
6161
PORTABLE_INLINE_FUNCTION void CheckParams() const {
6262
PORTABLE_ALWAYS_REQUIRE(_A >= 0, "Parameter, 'A', must be non-negative");
6363
PORTABLE_ALWAYS_REQUIRE(_B >= 0, "Parameter, 'B', must be non-negative");
64+
PORTABLE_ALWAYS_REQUIRE(_Cvinf > 0, "Specific heat capacity (at constant volume), `Cvinf`, must be positive");
6465
PORTABLE_ALWAYS_REQUIRE(_v0 > 0, "Reference specific volume, 'v0', must be positive");
6566
PORTABLE_ALWAYS_REQUIRE(_T0 >= 0, "Reference temperature, 'T0', must be non-negative");
66-
PORTABLE_ALWAYS_REQUIRE(_Cvinf > 0, "Specific heat capacity (at constant volume), `Cvinf`, must be positive");
6767
PORTABLE_ALWAYS_REQUIRE(_Gc > 0 && _Gc < 1, "Gruneisen parameter, 'Gc', must be in the interval (0,1)");
6868
_AZbar.CheckParams();
6969
}
@@ -249,9 +249,9 @@ class SimpleMACAW : public EosBase<SimpleMACAW> {
249249

250250
static constexpr unsigned long PreferredInput() { return _preferred_input; }
251251
PORTABLE_INLINE_FUNCTION void PrintParams() const {
252-
printf("Simple MACAW Parameters:\nA = %g\nB = %g\nCvinf = %g\nGc = "
252+
printf("Simple MACAW Parameters:\nA = %g\nB = %g\nCvinf = %g\nv0 = %g\nT0 = %g\nGc = "
253253
"%g\n",
254-
_A, _B, _Cvinf, _Gc);
254+
_A, _B, _Cvinf, _v0, _T0, _Gc);
255255
_AZbar.PrintParams();
256256
}
257257
template <typename Indexer_t>
@@ -287,9 +287,7 @@ class SimpleMACAW : public EosBase<SimpleMACAW> {
287287
static std::string EosPyType() { return EosType(); }
288288

289289
private:
290-
Real _A, _B, _Cvinf, _Gc;
291-
// reference values
292-
Real _v0, _T0;
290+
Real _A, _B, _Cvinf, _v0, _T0, _Gc;
293291
MeanAtomicProperties _AZbar;
294292
static constexpr const unsigned long _preferred_input =
295293
thermalqs::density | thermalqs::specific_internal_energy;

0 commit comments

Comments
 (0)