-
Notifications
You must be signed in to change notification settings - Fork 19
Create a multi-EOS framework #526
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
Open
jhp-lanl
wants to merge
176
commits into
main
Choose a base branch
from
jhp/two_eos
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
176 commits
Select commit
Hold shift + click to select a range
f93634e
Use EosType() member function for name
jhp-lanl 9f5ad0b
Add multi EOS modifier
jhp-lanl 316674e
Move scratch_size and max_scratch_size into base class
jhp-lanl e04b7dd
Merge branch 'jhp/move_scratch_to_base' of github.com:lanl/singularit…
jhp-lanl cd32d8f
Add model name and scratch size member functions
jhp-lanl c7a65b1
Add templated mass fraction indexable type
jhp-lanl cf7f849
Add tuple utils file
jhp-lanl 53b029b
Build multi-eos and tuple_utils
jhp-lanl 2a0b737
Merge branch 'main' of github.com:lanl/singularity-eos into jhp/two_eos
jhp-lanl be52b2e
Merge branch 'jhp/closure_info' of github.com:lanl/singularity-eos in…
jhp-lanl 5b4803f
Does not compile, but more progress on the multi-eos modifier
jhp-lanl c2bc3ed
Move nlambda default behavior into base class
jhp-lanl f700df3
Remove extraneous remnants of nlamda
jhp-lanl 34d62fc
Merge branch 'jhp/nlambda' of github.com:lanl/singularity-eos into jh…
jhp-lanl 7f9452a
Merge branch 'jhp/nlambda' of github.com:lanl/singularity-eos into jh…
jhp-lanl ba98a17
Merge branch 'main' of github.com:lanl/singularity-eos into jhp/two_eos
jhp-lanl dae1bda
Merge branch 'main' of github.com:lanl/singularity-eos into jhp/two_eos
jhp-lanl 1e210a8
Merge branch 'main' of github.com:lanl/singularity-eos into jhp/two_eos
jhp-lanl 272f80a
Add back in reference
jhp-lanl 8c37791
Add _many_ updates and address todos
jhp-lanl fbd57b4
Add test for multi_eos if closures are enabled
jhp-lanl ff2fba4
Merge branch 'main' into jhp/two_eos
Yurlungur 6497e28
Merge branch 'jhp/two_eos' of github.com:lanl/singularity-eos into jh…
jhp-lanl 85896b2
Won't compile: add a lot more machinery for averaging quantities
jhp-lanl a72921b
Add generic indexer class to its own file
jhp-lanl 70333ec
Add macros for easier SFINAE of concepts
jhp-lanl be5b1b0
Add universal references to functions
jhp-lanl 3360196
DOES NOT COMPILE -- Address github comments and make more progress
jhp-lanl 7fa785d
Move Kahan summation to shared math utils
jhp-lanl c875f87
Add include guard
jhp-lanl a83e3e2
Finish filling out the MultiEOS capability
jhp-lanl f5994a0
Rename to be more in-line with other test names
jhp-lanl 789af12
Move MultiEOS out of modifiers since it really isn't a modifier
jhp-lanl db0948f
Add include guard
jhp-lanl 079e069
Reflect moved multi_eos.hpp
jhp-lanl d0bd0d1
Merge branch 'main' of github.com:lanl/singularity-eos into jhp/two_eos
jhp-lanl f198079
Clang format
jhp-lanl a4d1a26
Update name for floored energy modifier test
jhp-lanl 469d7d1
A couple more changes with moving the multi_eos.hpp file
jhp-lanl 950efea
Opps... missed conflict and bad find/replace
jhp-lanl 03cbf35
Missed a new feature for Kahan summation
jhp-lanl 88b7dc0
Rename multi_eos test
jhp-lanl 3d7d06d
Update kahan sum location
jhp-lanl 8c60e76
Remove extra > from macro definition
jhp-lanl b5234f4
Various typos fixed to compile
jhp-lanl f131397
Clang format
jhp-lanl ad8203b
Add missing cmath header (how did this compile before?)
jhp-lanl d208d77
Add basic tests for MultiEOS (adding more)
jhp-lanl a93b0ce
Clang format
jhp-lanl e85828c
Fix logic for preferred input checks
jhp-lanl 579b017
Clang format
jhp-lanl b823d23
Fix clang sanitize issues
jhp-lanl 9096623
Merge branch 'jmm/variant-introspection' of github.com:lanl/singulari…
jhp-lanl b638600
Make VariadicIndexerBase constexpr and correct logic in SINGULARITY_I…
jhp-lanl 0dfd834
Make CheckParams() throw exceptions so that it's easier to test
jhp-lanl c95ebf6
Correct error with SINGULARITY_INDEXER_HAS_INDEXABLE_TYPE
jhp-lanl bf383db
Add test for MassFraction<N> type
jhp-lanl 4adae40
Make SINGULARITY_EOSPAC_USE_MODERN_ERROR_CODES dependent
jhp-lanl 9024dd3
Merge branch 'jhp/eospac_option' of github.com:lanl/singularity-eos i…
jhp-lanl 2147015
Fix dependent option logic and add to shared memory
jhp-lanl eab2098
Merge branch 'jhp/eospac_option' of github.com:lanl/singularity-eos i…
jhp-lanl 850d425
Const correctness and remove pointer type for variant because it does…
jhp-lanl 5f2e5ff
Add more tests to excerise P-T, mass fraction cutoff, CreateEOSArray,…
jhp-lanl 6e1eeed
Clang format
jhp-lanl baacd22
Make throws test only run when kokkos is off
jhp-lanl dd3dbf5
Add more info to failing tests... will debug later
jhp-lanl 63f1dba
Fix pass by value, argument ordering, and make sure lambda is passed …
jhp-lanl b0ef51e
Fix array filling and test mass fraction filling separately
jhp-lanl 5130751
Clang format
jhp-lanl 1a16407
Add noexcept
jhp-lanl a93b18f
Remove extraneous this from lambda capture
jhp-lanl f98e2a3
Add explicit arguments to REQUIRE_THROWS_WITH
jhp-lanl 709b711
Satisfy clang unused issues and try not using REQUIRE_THROWS_WITH
jhp-lanl 049bc59
Clang format
jhp-lanl c63ada4
Remove REQUIRE_THROWS_WITH since it doesn't appear to be working at p…
jhp-lanl 90aa42b
Don't force references in order to accomodate many container return v…
jhp-lanl 264bfd1
Bug fixes and tune tolerance of RE lookup PTE solve
jhp-lanl 9746606
Add FillEos test and other lookup tests
jhp-lanl 11e5388
Add some TODO comments for the future
jhp-lanl 98d72e3
Clang doesn't like if constexpr for PreferredInput
jhp-lanl 9551270
Add parentheses around bit comparisons for clarity
jhp-lanl 15f1f20
Add SFINAE helpers for tuples
jhp-lanl 1dca750
Correct lambda references, make sure bulk modulus calls bulk modulus,…
jhp-lanl ac6bd64
Correct CV bug
jhp-lanl dec5179
Add checks for averaging other thermo quantities (derivatives, etc.)
jhp-lanl 0a4ed3c
Avoid GCC warnings relating to unused variables
jhp-lanl ad11bbd
Add tests for basic functions
jhp-lanl de6ed3b
Evaluate 3T properties at multiple densities, and correct MaximumPres…
jhp-lanl 86c45c3
Remove zbar_func for now... use it when we actually test 3T
jhp-lanl 5a492fd
Add ability to check if a type accepts an whole number index
jhp-lanl 02a7396
Add safeSet() and safeGet() helpers
jhp-lanl 8895d80
Add safeGet and safeSet that don't take numerical indices
jhp-lanl 58a920b
Switch to safeGet and safeSet for indexable types
jhp-lanl fce8f7c
Whoops... forgot comment
jhp-lanl 4959500
Clang format
jhp-lanl c2b1dbb
Update changelog
jhp-lanl 589e1dc
Update doc
jhp-lanl fd74c25
Make functions PORTABLE and add required get/set
jhp-lanl a3d71fc
Make code more DRY and rename things a bit
jhp-lanl 856531f
Add int index check
jhp-lanl 220df73
Rename safeGet/Set to SafeGet/Set and remove direct indexing or regular
jhp-lanl 271e52e
Make indexer const correct
jhp-lanl 63d5a39
Rename safeGet/Set
jhp-lanl 8a893a7
Clang format
jhp-lanl d6a9f68
Switch to template-based decision to use integer index or not
jhp-lanl cf8bf93
Whoops... forgot to return
jhp-lanl 2d4153a
Clang format
jhp-lanl 0a4baa1
Add docs for SafeMustGet() and SafeMustSet()
jhp-lanl 4c89631
Get rid of Get and have wrappers use GetSet. Also update comments and…
jhp-lanl 9d52960
Switch Get for Safe versions and expand tests
jhp-lanl 69b56ab
Merge branch 'main' of github.com:lanl/singularity-eos into jhp/spine…
jhp-lanl 0feb8e4
Remove last Get in favor of SafeSet
jhp-lanl c245728
Remove a few more instances of Get in favor of the Safe variety for I…
jhp-lanl 734d55b
Clang format
jhp-lanl efd9a9f
Whoops... void was a bad choice for a type index
jhp-lanl d8dbccc
Let's try an unreachable return to make decltype(auto) happy
jhp-lanl bfacaac
Add dependent_false_v for if constexpr static asserts
jhp-lanl 36d4286
Move throw into SafeGet/SafeSet wrappers and provide helpful compile …
jhp-lanl c783623
Can't test for a runtime throw when compile-time error will be used
jhp-lanl dc2a3a8
Make internal variant type robust to multiple EOS of the same type an…
jhp-lanl f88c017
Add static assert to variant to make sure there are no duplicate types
jhp-lanl 11da97c
Split tabular and analytic tests of MultiEOS
jhp-lanl dbcb72a
Add tests for unique typelists
jhp-lanl fe6ad15
Merge branch 'jhp/spiner_indexable_types' of github.com:lanl/singular…
jhp-lanl d16bb0c
Whoops... forgot to commit the variadic utilities that enable the uni…
jhp-lanl 07f4a72
Clang format
jhp-lanl 4a60616
Merge branch 'main' of github.com:lanl/singularity-eos into jhp/two_eos
jhp-lanl e70e071
Add ifdef guards to make sure we don't compile without spiner
jhp-lanl b09d64d
Add some debugging to try to figure out why the reference state and F…
jhp-lanl 323f0d0
Add constant checks for correct input/output in FillEos
jhp-lanl 2d75238
Add LogDensity and LogTemperature since they stabilize spiner r(P,T) …
jhp-lanl 1b79a06
Merge branch 'main' of github.com:lanl/singularity-eos into jhp/two_eos
jhp-lanl 1654471
Switch to finite differences for mixture derivatives
jhp-lanl 6acd078
Switch testing to account for finite difference derivatives now
jhp-lanl 301bdd7
Merge branch 'main' into jhp/two_eos
Yurlungur 3899052
Merge branch 'main' of github.com:lanl/singularity-eos into jhp/two_eos
jhp-lanl 2d5abb7
Redo derivatives to use finite differences for mixtures
jhp-lanl 9d11b8b
Small cosmetic changes
jhp-lanl a2063b5
Updates to test to try to track down PTE convergence issue and stagin…
jhp-lanl 0881391
Merge branch 'main' of github.com:lanl/singularity-eos into jhp/two_eos
jhp-lanl f0f5c70
Merge branch 'main' of github.com:lanl/singularity-eos into jhp/two_eos
jhp-lanl 3e920c2
PTE settings for finite differences or normal lookups
jhp-lanl a9703fb
Settle in on tolerances and convergence
jhp-lanl 8af5ac5
Merge branch 'jhp/two_eos' of github.com:lanl/singularity-eos into jh…
jhp-lanl b9e056c
Clang format
jhp-lanl a941c33
Refactor SetDynamicMemory logic and get rid of extra template arguments
jhp-lanl 4e4769f
Clean up using statements
jhp-lanl 6247f90
Test 3T functions and debug
jhp-lanl 11893ff
Initial stab at serialization and device tests (probably won't compile)
jhp-lanl 7c70789
Now it compiles...
jhp-lanl 24fa0be
Clang format
jhp-lanl f1fd3fd
Correct SFINAE
jhp-lanl 06c40fd
Fix some segfaults
jhp-lanl 0d91dac
Create CMake option to enable address and undefined behavior sanitizing
jhp-lanl 053da60
Add static-libasan
jhp-lanl 64de92c
Remove extraneous comma and move compile options down with other options
jhp-lanl f6a4ee4
Update CMakeLists.txt
jhp-lanl d3364e3
Update CHANGELOG.md
jhp-lanl 13464b2
Merge branch 'jhp/cmake_sanitize' into jhp/two_eos
jhp-lanl 70b0b1c
Merge branch 'jhp/cmake_sanitize' into jhp/two_eos
jhp-lanl de5b5c0
Merge branch 'main' of github.com:lanl/singularity-eos into jhp/two_eos
jhp-lanl 3216a73
Change shared to dynamic names
jhp-lanl 8a32e53
Merge branch 'main' of github.com:lanl/singularity-eos into jhp/two_eos
jhp-lanl a50eb4e
Explain zero shared memory size
jhp-lanl 03bf38e
Comment that serialization doesn't work
jhp-lanl c027b4c
Comment out serialization test since it isn't working yet
jhp-lanl 6de1f9e
Update changelog
jhp-lanl 7988572
add period
jhp-lanl 5e7d452
Rename variables to be more logical
jhp-lanl 918fe7b
Add documentation for MultiEOS
jhp-lanl 89f50d1
Clang format
jhp-lanl 9aed19f
Whoops... too many dots
jhp-lanl 7190289
Merge branch 'main' into jhp/two_eos
Yurlungur f9de181
Address most comments
jhp-lanl bdf8811
Merge branch 'jhp/two_eos' of github.com:lanl/singularity-eos into jh…
jhp-lanl 5b72590
Missing semicolon
jhp-lanl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| //------------------------------------------------------------------------------ | ||
| // © 2021-2025. Triad National Security, LLC. All rights reserved. This | ||
| // program was produced under U.S. Government contract 89233218CNA000001 | ||
| // for Los Alamos National Laboratory (LANL), which is operated by Triad | ||
| // National Security, LLC for the U.S. Department of Energy/National | ||
| // Nuclear Security Administration. All rights in the program are | ||
| // reserved by Triad National Security, LLC, and the U.S. Department of | ||
| // Energy/National Nuclear Security Administration. The Government is | ||
| // granted for itself and others acting on its behalf a nonexclusive, | ||
| // paid-up, irrevocable worldwide license in this material to reproduce, | ||
| // prepare derivative works, distribute copies to the public, perform | ||
| // publicly and display publicly, and to permit others to do so. | ||
| //------------------------------------------------------------------------------ | ||
|
|
||
| #ifndef SINGULARITY_EOS_BASE_GENERIC_INDEXER_HPP_ | ||
| #define SINGULARITY_EOS_BASE_GENERIC_INDEXER_HPP_ | ||
|
|
||
| #include <utility> | ||
|
|
||
| namespace singularity { | ||
|
|
||
| template <typename Arr, typename Map> | ||
| struct GenericIndexer { | ||
| Arr arr_; | ||
| Map map_; | ||
|
|
||
| template <typename ArrT_, typename MapT_> | ||
| constexpr GenericIndexer(ArrT_ &&arr_in, MapT_ &&map_in) | ||
| : arr_(std::forward<ArrT_>(arr_in)), map_(std::forward<MapT_>(map_in)) {} | ||
|
|
||
| // & : non-const lvalue | ||
| template <class I> | ||
| constexpr decltype(auto) operator[](I i) & { | ||
| return arr_[map_[i]]; | ||
| } | ||
|
|
||
| // const& : const lvalue | ||
| template <class I> | ||
| constexpr decltype(auto) operator[](I i) const & { | ||
| return arr_[map_[i]]; | ||
| } | ||
|
|
||
| // && : rvalue (indexer is a temporary) — forward arr_’s value category | ||
| template <class I> | ||
| constexpr decltype(auto) operator[](I i) && { | ||
| return std::forward<Arr>(arr_)[map_[i]]; // move only if Arr is a value type | ||
| } | ||
|
|
||
| // const rvalue indexer | ||
| template <class I> | ||
| constexpr decltype(auto) operator[](I i) const && { | ||
| return std::forward<const Arr>(arr_)[map_[i]]; // preserves const | ||
| } | ||
| }; | ||
|
|
||
| // CTAD: preserve references for lvalues, decay for rvalues | ||
| template <class ArrT_, class MapT_> | ||
| GenericIndexer(ArrT_ &&, MapT_ &&) -> GenericIndexer<ArrT_, MapT_>; | ||
|
|
||
| } // namespace singularity | ||
|
|
||
| #endif // #ifndef SINGULARITY_EOS_BASE_GENERIC_INDEXER_HPP_ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.