From e008baf619a63cb40e5705177806bdb1c2849ddb Mon Sep 17 00:00:00 2001 From: Jonah Miller Date: Wed, 19 Jul 2023 18:27:35 -0600 Subject: [PATCH 1/4] remove defs in constants.hpp as unnecessary --- singularity-opac/constants/constants.hpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/singularity-opac/constants/constants.hpp b/singularity-opac/constants/constants.hpp index b15ef1e..580037a 100644 --- a/singularity-opac/constants/constants.hpp +++ b/singularity-opac/constants/constants.hpp @@ -18,14 +18,6 @@ #include -#ifdef SINGULARITY_ENABLE_EXCEPTIONS -#include -#define CONSTANTS_ERROR(x) (throw std::runtime_error(x)) -#else -#define CONSTANTS_ERROR(x) printf("%s", x) -#endif -#define UNDEFINED_ERROR CONSTANTS_ERROR("DEFINE ME\n") - namespace singularity { struct BaseUnity { @@ -211,7 +203,4 @@ using PhysicalConstantsCGS = } // namespace singularity -#undef CONSTANTS_ERROR -#undef UNDEFINED_ERROR - #endif // SINGULARITY_OPAC_CONSTANTS_CONSTANTS_ From bd3cccf2288a2886db8ca054e7ebce7ea1e2b63f Mon Sep 17 00:00:00 2001 From: Jonah Miller Date: Wed, 19 Jul 2023 18:29:34 -0600 Subject: [PATCH 2/4] Real->void for bins version --- singularity-opac/neutrinos/non_cgs_neutrinos.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singularity-opac/neutrinos/non_cgs_neutrinos.hpp b/singularity-opac/neutrinos/non_cgs_neutrinos.hpp index db144ee..7a760c7 100644 --- a/singularity-opac/neutrinos/non_cgs_neutrinos.hpp +++ b/singularity-opac/neutrinos/non_cgs_neutrinos.hpp @@ -66,7 +66,7 @@ class NonCGSUnits { } template - PORTABLE_INLINE_FUNCTION Real AbsorptionCoefficient( + PORTABLE_INLINE_FUNCTION void AbsorptionCoefficient( const Real rho, const Real temp, const Real Ye, RadiationType type, FrequencyIndexer &nu_bins, DataIndexer &coeffs, const int nbins, Real *lambda = nullptr) const { From e4c2d428535e79831fee3eaa3a70b8f3cbc86db4 Mon Sep 17 00:00:00 2001 From: Jonah Miller Date: Wed, 19 Jul 2023 18:32:27 -0600 Subject: [PATCH 3/4] guard UNDEFINED_ERROR --- singularity-opac/base/opac_error.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/singularity-opac/base/opac_error.hpp b/singularity-opac/base/opac_error.hpp index e11fcef..7217b7f 100644 --- a/singularity-opac/base/opac_error.hpp +++ b/singularity-opac/base/opac_error.hpp @@ -27,7 +27,9 @@ namespace singularity { printf("%s", x); \ std::exit(1) #endif +#ifndef UNDEFINED_ERROR #define UNDEFINED_ERROR OPAC_ERROR("DEFINE ME\n") +#endif // UNDEFINED_ERROR } // namespace singularity From 51855252f9caf38809f82fe1f99d99018f095338 Mon Sep 17 00:00:00 2001 From: Jonah Miller Date: Wed, 19 Jul 2023 18:34:57 -0600 Subject: [PATCH 4/4] actually just remove undefined error as it is unused --- singularity-opac/base/opac_error.hpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/singularity-opac/base/opac_error.hpp b/singularity-opac/base/opac_error.hpp index 7217b7f..0d320a6 100644 --- a/singularity-opac/base/opac_error.hpp +++ b/singularity-opac/base/opac_error.hpp @@ -27,9 +27,6 @@ namespace singularity { printf("%s", x); \ std::exit(1) #endif -#ifndef UNDEFINED_ERROR -#define UNDEFINED_ERROR OPAC_ERROR("DEFINE ME\n") -#endif // UNDEFINED_ERROR } // namespace singularity