-
Notifications
You must be signed in to change notification settings - Fork 6
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
local angular distributions #36
base: master
Are you sure you want to change the base?
Conversation
…hlight into jmm/local-angular-distributions
Four species transport now supported. To use do the following:
Below is the fornax 1 zone equilibrium test run with nue, nuebar, nux, nuxbar: Note that with four species, at fixed particle number, fewer monte carlo packets are carrying electron number, so to get good Ye values, you may need to add roughly 25% more particles. |
important paper also for this MR https://arxiv.org/abs/2304.05044 |
…e to pull out the ability to get the bin indices
@@ -28,6 +28,11 @@ | |||
#define S4THW (S2THW * S2THW) | |||
#define NUSIGMA0 (1.7611737037e-44) // Fundamental neutrino cross section | |||
|
|||
// Frequency scale of neutrino oscillations | |||
#define ROOT2 (1.4142135623730951) |
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.
Square roots are slow in C
#define LOCAL_NUM_BASES (2) | ||
#define MOMENTS_A (0) | ||
#define MOMENTS_B (1) |
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.
might want to move these up...
@@ -1065,6 +1104,7 @@ void set_cooling_time( | |||
void record_lepton_flux(const struct of_photon *ph); | |||
void check_nu_type(const char *location); | |||
int get_lepton_sign(const struct of_photon *ph); | |||
int nu_is_heavy(const int radtype); |
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.
needed for generalizing to 4 species transport
double *local_angles_Xharm = safe_malloc( | ||
(NDIM - 1) * LOCAL_ANGLES_NX1 * LOCAL_ANGLES_NX2 * sizeof(double)); | ||
#if METRIC == MKS | ||
double *local_angles_Xbl = safe_malloc( | ||
(NDIM - 1) * LOCAL_ANGLES_NX1 * LOCAL_ANGLES_NX2 * sizeof(double)); | ||
#endif // MKS | ||
double *local_angles_Xcart = safe_malloc( | ||
(NDIM - 1) * LOCAL_ANGLES_NX1 * LOCAL_ANGLES_NX2 * sizeof(double)); |
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.
these are diagnostics.
} | ||
|
||
{ | ||
double *local_angles_mu = safe_malloc(LOCAL_ANGLES_NMU * sizeof(double)); |
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.
diagnostics
prob/multiscatt/build.py
Outdated
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.
The changes here are maybe best left as intermediate tests. Should probably undo these changes before merge.
prob/oscillations/build.py
Outdated
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 test isn't ready yet.
prob/oscillations/problem.c
Outdated
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 test isn't ready yet.
prob/torus_cbc/build.py
Outdated
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.
we should think about the changes here. We may wish to make a new build file rather than continuing to use the old one.
script/machine/darwin.py
Outdated
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 my configuration. May or may not be wise to keep.
This MR is ready. @kelslund @payelmuk150 please review. |
PR Summary
Add local angular distributions code in support of neutrino oscillations. This machinery is intended to find electron lepton number crossings. See, e.g.,
https://arxiv.org/abs/2404.17938
PR Checklist