-
Notifications
You must be signed in to change notification settings - Fork 9
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
Analytic electron EOS and zsplit modifier #444
Changes from 13 commits
2b258e4
6167b75
4b4a2fa
3d18cae
7fba185
2512249
8085e61
7e9a7ec
54c8a25
aaa57cc
0dfef59
a0a8069
c692221
98fb444
08172b2
95c60cd
3b030b1
7886d11
dc803ed
a0f00c4
c43afcc
d282d09
090559e
d80e40c
780fbd4
af1e70a
ed6622f
39990f8
6f6b6f8
830bb5e
d0dcacd
bc721f8
fc3ee77
0e9f910
2c013c3
7368490
4e93e12
551fc3e
6e255b9
5042643
03d646d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -440,8 +440,8 @@ if(SINGULARITY_BUILD_TESTS) | |
FetchContent_Declare( | ||
Catch2 | ||
GIT_REPOSITORY https://github.com/catchorg/Catch2.git | ||
# or later is fine too | ||
GIT_TAG v3.0.1) | ||
# jmm: updated Dec 17, 2024 to avoid build errors on modern gcc | ||
GIT_TAG v3.7.1) | ||
Comment on lines
+453
to
+454
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Catch2 v3.0.1 does not compile on ubuntu 24.04. Update to 3.7.1 to rescue it. |
||
FetchContent_MakeAvailable(Catch2) | ||
list(APPEND CMAKE_MODULE_PATH ${Catch2_SOURCE_DIR}/contrib) | ||
endif() | ||
|
@@ -560,6 +560,10 @@ target_compile_options( | |
-use_fast_math | ||
> # release | ||
> # cuda | ||
|
||
# Suppresses annoying ABI notes. See: | ||
# https://stackoverflow.com/questions/52020305/what-exactly-does-gccs-wpsabi-option-do-what-are-the-implications-of-supressi | ||
$<$<CXX_COMPILER_ID:GNU>:-Wno-psabi> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GCC outputs these ABI notes. When compiling with -Werr those notes cause compilation to fail, but the notes explain gcc bugs, and are not singularity-eos problems. In the way we build singularity-eos (via spack or in-tree), ABI incompatibilities will never impact us. |
||
) | ||
if (SINGULARITY_STRICT_WARNINGS) | ||
target_compile_options(singularity-eos_Interface INTERFACE | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,23 +66,24 @@ char *StrCat(char *destination, const char *source) { | |
// VECTOR functionality to overload the scalar implementations in the derived | ||
// classes. Do not add functions here that are not overloads of derived class features. | ||
// TODO(JMM): Should we have more macros that capture just some of these? | ||
#define SG_ADD_BASE_CLASS_USINGS(EOSDERIVED) \ | ||
using EosBase<EOSDERIVED>::TemperatureFromDensityInternalEnergy; \ | ||
using EosBase<EOSDERIVED>::InternalEnergyFromDensityTemperature; \ | ||
using EosBase<EOSDERIVED>::PressureFromDensityTemperature; \ | ||
using EosBase<EOSDERIVED>::PressureFromDensityInternalEnergy; \ | ||
using EosBase<EOSDERIVED>::MinInternalEnergyFromDensity; \ | ||
using EosBase<EOSDERIVED>::SpecificHeatFromDensityTemperature; \ | ||
using EosBase<EOSDERIVED>::SpecificHeatFromDensityInternalEnergy; \ | ||
using EosBase<EOSDERIVED>::BulkModulusFromDensityTemperature; \ | ||
using EosBase<EOSDERIVED>::BulkModulusFromDensityInternalEnergy; \ | ||
using EosBase<EOSDERIVED>::GruneisenParamFromDensityTemperature; \ | ||
using EosBase<EOSDERIVED>::GruneisenParamFromDensityInternalEnergy; \ | ||
using EosBase<EOSDERIVED>::FillEos; \ | ||
using EosBase<EOSDERIVED>::EntropyFromDensityTemperature; \ | ||
using EosBase<EOSDERIVED>::EntropyFromDensityInternalEnergy; \ | ||
using EosBase<EOSDERIVED>::GibbsFreeEnergyFromDensityTemperature; \ | ||
using EosBase<EOSDERIVED>::GibbsFreeEnergyFromDensityInternalEnergy; | ||
// JMM: Use VA_ARGS to capture more complex template types | ||
#define SG_ADD_BASE_CLASS_USINGS(...) \ | ||
Comment on lines
+69
to
+70
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem here is that preprocessor macros interpret commas as separate arguments. This allows us to pass classes with multiple template arguments through the macro transparently. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice addition! |
||
using EosBase<__VA_ARGS__>::TemperatureFromDensityInternalEnergy; \ | ||
using EosBase<__VA_ARGS__>::InternalEnergyFromDensityTemperature; \ | ||
using EosBase<__VA_ARGS__>::PressureFromDensityTemperature; \ | ||
using EosBase<__VA_ARGS__>::PressureFromDensityInternalEnergy; \ | ||
using EosBase<__VA_ARGS__>::MinInternalEnergyFromDensity; \ | ||
using EosBase<__VA_ARGS__>::SpecificHeatFromDensityTemperature; \ | ||
using EosBase<__VA_ARGS__>::SpecificHeatFromDensityInternalEnergy; \ | ||
using EosBase<__VA_ARGS__>::BulkModulusFromDensityTemperature; \ | ||
using EosBase<__VA_ARGS__>::BulkModulusFromDensityInternalEnergy; \ | ||
using EosBase<__VA_ARGS__>::GruneisenParamFromDensityTemperature; \ | ||
using EosBase<__VA_ARGS__>::GruneisenParamFromDensityInternalEnergy; \ | ||
using EosBase<__VA_ARGS__>::FillEos; \ | ||
using EosBase<__VA_ARGS__>::EntropyFromDensityTemperature; \ | ||
using EosBase<__VA_ARGS__>::EntropyFromDensityInternalEnergy; \ | ||
using EosBase<__VA_ARGS__>::GibbsFreeEnergyFromDensityTemperature; \ | ||
using EosBase<__VA_ARGS__>::GibbsFreeEnergyFromDensityInternalEnergy; | ||
|
||
// This macro adds these methods to a derived class. Due to scope, | ||
// these can't be implemented in the base class, unless we make | ||
|
@@ -111,7 +112,9 @@ char *StrCat(char *destination, const char *source) { | |
} \ | ||
constexpr bool AllDynamicMemoryIsShareable() const { \ | ||
return t_.AllDynamicMemoryIsShareable(); \ | ||
} \ | ||
} | ||
|
||
#define SG_ADD_MODIFIER_MEAN_METHODS(t_) \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. split these out into separate modifier methods in preparation for isotopics. |
||
PORTABLE_INLINE_FUNCTION \ | ||
Real MeanAtomicMass() const { return t_.MeanAtomicMass(); } \ | ||
PORTABLE_INLINE_FUNCTION \ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest is now 24.04 which does not support clang-format-12. For now, just pin to older Ubuntu. WIll resolve the dependency issue long term in a formal single MR in the new year. See #446
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is now ubuntu-22.04. Must use version number, not version name.