add sputtering_reflection_compounds fn + gitignore#278
Open
jguterl wants to merge 2 commits intolcpp-org:mainfrom
Open
add sputtering_reflection_compounds fn + gitignore#278jguterl wants to merge 2 commits intolcpp-org:mainfrom
jguterl wants to merge 2 commits intolcpp-org:mainfrom
Conversation
drobnyjt
requested changes
Apr 17, 2025
Collaborator
drobnyjt
left a comment
There was a problem hiding this comment.
Looks good to me with that one variable name change. Thanks!
| let num_reflected = *num_reflected.lock().unwrap(); | ||
| let energy_reflected = *energy_reflected.lock().unwrap(); | ||
| let num_sputtered = num_sputtered.lock().unwrap(); | ||
| let num_sputtered_: Vec<f64> = num_sputtered.iter().map(|&x| x / num_samples as f64).collect(); |
Collaborator
There was a problem hiding this comment.
I'd recommend a name change of this variable from num_sputtered_ to sputtering_yield or partial_sputtering_yields or similar. It's not super important, but since it's a return value, someone looking at the last line of the function might expect total counts instead of yields
drobnyjt
reviewed
Apr 17, 2025
| Ok(()) | ||
| } | ||
|
|
||
| pub fn find_index(Z: f64, Z2: &[f64]) -> Option<usize> { |
Collaborator
There was a problem hiding this comment.
Actually, one more thought - indexing by Z could present a problem. What happens when someone wants to simulate a target of, for example, 90% Li-6 and 10% Li-7?
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Thank you for your contribution to rustBCA!
Before submitting this PR, please make sure you have:
Fixes # (issue)
Description
add a function binded in python to compute sputtering and reflection in 0D for a compound
Tests
Please describe how the changes in this pull request have been tested, including system information such as OS.