-
Notifications
You must be signed in to change notification settings - Fork 8
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
Entropy #78
Merged
Merged
Entropy #78
Changes from 58 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
1523889
AsterX: Add grid functions for advection of entropy density
4714f54
Merge branch 'original' into entropy
ae022b3
AsterX: Add entropy evolution - not tested
de65ffb
AsterX: Update with fix in reconstruction of B
ba075e9
Con2PrimFactory: Start implementing entropy inversion based on Palenz…
745eee5
Con2PrimFactory: Minimal change
85ffd8d
Con2PrimFactory: Add master function for entropy inversion
2a86589
Con2PrimFactory: Modify solve function
9d0248f
Merge branch 'original' into entropy
7cd86a6
Merge branch 'original' into entropy
446baf7
AsterX: Solve merge conflict in schedule
MChabanov e8028e3
Con2PrimFactory: Include entropy as prim and cons
16cd18c
Con2PrimFactory: First draft of entropy inversion file
a313b3f
EntropyInitial: Set entropy
9fd5e88
AsterX: Fix merge conflict
aed869f
Con2PrimFactory: Small change
143ca19
Merge remote-tracking branch 'upstream/main' into entropy
738eb65
Con2PrimFactory: Rearrange limiting order
9f2634c
Con2PrimFactory: Add check on conservatives after failure
fef8269
EOSX: Remove swp file
7630ce0
Compiling version
dcdf11b
Add entropy c2p to AsterX
5602794
Con2PrimFactory: Add entropy inversion to other c2ps
50b98aa
AsterX: Couple properly to entropy inversion
ef98499
AsterX: Minor improvement
c135367
Con2PrimFactory: Add copy assignment, explicit const keyword, more sm…
8f3978f
Con2PrimFactory: Consistent changes among all c2ps
52cffed
Con2PrimFactory: Changes
62eff54
Con2PrimFactory: Move limiters to new function
e5702aa
Con2PrimFactory: Clean-up
5ab9ddb
AsterX: Small error
f6f9990
AsterX: Debug parameter
4f90fbf
AsterX: Remove debug info for c2p inversion
eabfea2
AsterX: Further small changes
fe90514
Con2PrimFactory: Add option to avoid v>1 in ToPrim
c4ba0f8
AsterX and Con2PrimFactory: Resolve conflicts
e2010d3
AsterX: typo
30e903e
Merge remote-tracking branch 'upstream/main' into entropy
a7c9dfb
Con2PrimFactory: Minor changes and bug
62926db
Con2PrimFactory: Safety checks and more
d30ddc4
AsterX: Remove unused bool
9ddbd14
Con2PrimFactory: Readjust hard-coded safety limit
a4cb0ef
EOSX: Lower limit on density
8329bd2
Con2PrimFactory: Check for physicality before exiting loop
a8ddcd4
Con2PrimFactory: Resolve conflicts
ad93d01
Con2PrimFactory: Hard-coded c2p limits in Noble
f4d380f
AsterSeeds: Add entropy initialization to AsterSeeds
7f9a1e2
Con2PrimFactory: Default cons_error is not active, include entropy c2…
88f3886
Con2PrimFactory: NaN checks, C2P unit test
800bda4
Con2PrimFactory: Typo
5046dec
AsterX: Comments and consistent use of entropy and kappa
3610689
AsterX: Debug comments related to v>1
6995bdb
AsterX: Rewrite C2P failure code
cb3c9df
Con2PrimFactory: Change meaning of rho_strict temporarily
b6358f4
AsterX: Consistent variable naming
8398838
Con2PrimFactory: Make BH parameters accessible, compiling version, no…
fe01ad6
Con2PrimFactory: Add comment on safety against non-finite values with…
83084bb
AsterX: Remove rho-strict
1ee3a88
AsterX: Final changes, remove EntropyInitial, change C2P interface, m…
f01a14a
AsterSeeds: Trivial test_type option, if ID written by another thorn
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 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 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 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,40 @@ | ||
#include <loop.hxx> | ||
#include <loop_device.hxx> | ||
|
||
#include <cctk.h> | ||
#include <cctk_Arguments.h> | ||
#include <cctk_Parameters.h> | ||
|
||
#include <cstdio> | ||
#include <cstdbool> | ||
#include <cmath> | ||
|
||
#include "eos.hxx" | ||
#include "eos_idealgas.hxx" | ||
|
||
extern "C" void SetEntropy(CCTK_ARGUMENTS) | ||
{ | ||
|
||
using namespace EOSX; | ||
|
||
DECLARE_CCTK_ARGUMENTSX_SetEntropy; | ||
DECLARE_CCTK_PARAMETERS; | ||
|
||
if (set_entropy_postinitial) { | ||
|
||
eos::range rgeps(eps_min, eps_max), rgrho(rho_min, rho_max), | ||
rgye(ye_min, ye_max); | ||
|
||
const eos_idealgas eos_th(gl_gamma, particle_mass, rgeps, rgrho, rgye); | ||
|
||
grid.loop_all_device<1, 1, 1>( | ||
grid.nghostzones, | ||
[=] CCTK_DEVICE(const Loop::PointDesc &p) CCTK_ATTRIBUTE_ALWAYS_INLINE { | ||
|
||
entropy(p.I) = eos_th.kappa_from_valid_rho_eps_ye(rho(p.I),eps(p.I),1.0); | ||
|
||
}); | ||
} | ||
} | ||
|
||
|
This file contains 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 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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# Configuration definitions for thorn AsterX | ||
|
||
REQUIRES Loop EOSX Con2PrimFactory ReconX AsterUtils | ||
|
||
PROVIDES AsterX | ||
{ | ||
} |
This file contains 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 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 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 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 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 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
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.
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.
Since this function sets initial data for the HydroBaseX variable "entropy", I would recommend scheduling within the group " HydroBaseX_InitialData"
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.
Ok
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.
I just had a quick look again at this point. The entropy requires valid pressures, densities etc. So, it should be executed after a thorn which is setting these quantities. That's comparable to the ID for the vector potential in the TOV or BNS case. As it stands now, I can't really schedule it in HydroBaseX_InitialData in full generality as it should always be run after something that sets rho, press, eps ... (if I don't introduce new schedule bins)
So, if there is no obvious problem with keeping it in HydroBaseX_PostInitial, we could keep it that way. Alternatively, we could do something similar as is done for the vector potential and use ODESolvers_Initial, but I am not sure if there is an advantage
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.
okay sounds good