-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Integrate continuum interactions into cmontecarlo #670
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
006ba69
Add function for sampling frequency of free-free emission
chvogl 0ca9e48
Add test for sampling the frequency of free-free emission
chvogl 43b1b00
Add function for sampling frequency of bound-free emission
chvogl 6b9b45f
Add function for sampling of an individual cooling process
chvogl 734493b
Add function to calculate the free-free opacity
chvogl f1f3874
Move data for C continuum tests into single hdf file
chvogl 588e755
Add test for sampling of individual cooling processes
chvogl 7904bbc
Add test for calculation of free-free opacity
chvogl ae8e9ed
Add test for montecarlo_continuum_event_handler
chvogl 6e21e33
Restructure compute_distance2continuum
chvogl 8f58233
Make chi_bf_tmp_partial a packet property
chvogl 1e038fb
Add better treatment of bound-free cross-sections and opacities
chvogl f8ece86
Add estimators for continuum processes
chvogl 7b0a855
Add k_packets
chvogl d04addf
Add function to handle continuum emission events
chvogl 31ae2f0
Add test for cmontecarlo function get_event_handler
chvogl 56804a8
Add test for cmontecarlo function macro_atom
chvogl 4b16fd6
Restructure montecarlo_line_scatter function
chvogl 0af724e
Remove k_packet and associated content
chvogl 0d8ee37
Add test for test_for_close_line
chvogl e960386
Rename next_interaction2process enum and remove deprecated items
chvogl 159d839
Adapt macro_atom to handle continuum processes
chvogl 801a025
Add correct handling of free-free absorption events
chvogl 51ef965
Fix formatting
chvogl ceece25
Add correct handling of bound-free absorption events
chvogl 70a29c5
Add test for montecarlo_bound_free_scatter
chvogl ecfefbf
Register continuum_compare_data.hdf as package_data
chvogl a202ff0
Add adiabatic cooling
chvogl 515f49f
Add hydrogenic approximation for bound-free cross sections
chvogl 66db9c8
Remove deprecated attributes from model fixture
chvogl b46ff14
Remove unnecessary padding of chi_bf_tmp_partial
chvogl 0062c62
Extend packet logging to continuum interactions
chvogl ad60e1c
Remove not yet relevant tests section
chvogl 0770724
Restructure montecarlo_continuum_event_handler
chvogl 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
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.
Hmm - double pointers. Do we really want these?
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'm not familiar with the exact usecase but I think double pointers can easily and should be avoided here.
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.
Using double pointers can be easily avoided by using an array of structures instead of an array of pointers to structures. Do you think this is preferable? Since the structures are small (two pointers and an integer) this should be ok. Alternatively it is possible to store the cross section data (frequencies and cross sections) consecutively in two arrays. In this case a reference array is needed to know where the data for a certain level starts and ends.
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.
If possible, you should store the data as a structure of arrays.
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.
As an example this would change
double *nu = storage->photo_xsect[continuum_id]->nu;
todouble *nu = storage->photo_xsect->nu[continuum_id];
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.
Let's leave this for now! Minor issue, which we can address later on if we want.