added some comments and created lifted directory#1
Open
emilybwsiew wants to merge 2 commits intoklywang:masterfrom
Open
added some comments and created lifted directory#1emilybwsiew wants to merge 2 commits intoklywang:masterfrom
emilybwsiew wants to merge 2 commits intoklywang:masterfrom
Conversation
klywang
reviewed
Jul 1, 2021
Comment on lines
130
to
133
| ind_lift = np.empty(len(pos)).astype(int) | ||
| # outer shell of particles lifting from to find neighbors | ||
| ind_ref = np.atleast_1d(dist_sorted[n_tried]).astype(int) | ||
| ind_lift[n_lifted] = dist_sorted[n_tried] |
Owner
There was a problem hiding this comment.
-
ind_lift: Row index of particle positions that have been lifted
This starts out as an empty array.ind_refis appended to the end of the list at the end of each iteration.
This is used to make sure we don't double lift anything or end up with a deadend. -
ind_ref: Row index of particle positions that we will perform calculations on
These are the particles we want to find neighbors for. This list changes each iteration.
I used row indices instead of actual particle positions because I assumed lists of 1D unsigned integers would have better performance than the actual positions.
klywang
reviewed
Jul 1, 2021
| # Presort nl to reduce in1d calls | ||
| # nl_red, nl_construct = np.unique(nl[:, 0], return_inverse=True) | ||
|
|
||
| # don't really completely understand what this section is doing |
Owner
There was a problem hiding this comment.
Which lines are you confused by? I can add more comments for clarity
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.
No description provided.