Skip to content

Commit

Permalink
tests work
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahm-LANL committed Dec 16, 2024
1 parent 4b4a2fa commit 3d18cae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions singularity-eos/eos/modifiers/zsplit_eos.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,22 +238,22 @@ class ZSplit : public EosBase<ZSplit<ztype, T>> {

private:
static constexpr const int NL = 1;
template <typename Indexer_t>
PORTABLE_FORCEINLINE_FUNCTION Real GetIonizationState_(const Indexer_t &&lambda) const {
template <typename Indexer_t = Real *>
PORTABLE_FORCEINLINE_FUNCTION Real GetIonizationState_(Indexer_t &&lambda) const {
return std::max(0.0, lambda[t_.nlambda()]);
}
// TODO(JMM): Runtime?
template <typename Indexer_t>
PORTABLE_FORCEINLINE_FUNCTION Real GetScale_(const Indexer_t &&lambda) const {
template <typename Indexer_t = Real *>
PORTABLE_FORCEINLINE_FUNCTION Real GetScale_(Indexer_t &&lambda) const {
Real Z = GetIonizationState_(lambda);
if constexpr (ztype == ZSplitComponent::Electrons) {
return robust::ratio(Z, Z + 1);
} else {
return robust::ratio(1.0, Z + 1);
}
}
template <typename Indexer_t>
PORTABLE_FORCEINLINE_FUNCTION Real GetInvScale_(const Indexer_t &&lambda) const {
template <typename Indexer_t = Real *>
PORTABLE_FORCEINLINE_FUNCTION Real GetInvScale_(Indexer_t &&lambda) const {
Real Z = GetIonizationState_(lambda);
if constexpr (ztype == ZSplitComponent::Electrons) {
return robust::ratio(Z + 1, Z);
Expand Down
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ add_executable(
test_eos_vinet.cpp
test_eos_mgusup.cpp
test_eos_powermg.cpp
test_eos_zsplit.cpp
)

add_executable(
Expand Down

0 comments on commit 3d18cae

Please sign in to comment.