CoLoRe-2LPT: 2LPT velocities added for particles, tracers and beams#74
Open
CoLoRe-2LPT: 2LPT velocities added for particles, tracers and beams#74
Conversation
damonge
commented
Mar 26, 2026
Owner
Author
damonge
left a comment
There was a problem hiding this comment.
Some preliminary comments. Ignore for now.
| int smooth_potential; //Do we smooth the newtonian potential as well? | ||
| int dens_type; //Method to produce the density field | ||
| int lpt_interp_type; | ||
| int lpt_vzty; // Use 2LPT velocities (only makes sense if dens_type is 2LPT) |
Owner
Author
There was a problem hiding this comment.
Slightly pedantic: could we call this lpt_vels instead of lpt_vzty? Just because the z is a bit jarring :-)
Owner
Author
There was a problem hiding this comment.
I'd say undo these changes to leave the makefile as it was before for simplicity (unless any of these changes affect your modifications, but I think that's not the case)
Comment on lines
+1174
to
+1176
| par->grid_velx[index]=0; // Keep the grids to zero, we will fill them with interpolation scheme (only CIC now; see above) | ||
| par->grid_vely[index]=0; | ||
| par->grid_velz[index]=0; |
Owner
Author
There was a problem hiding this comment.
encase this in an if statement
| } | ||
| // Normalize velocity by density | ||
| for(ii=0;ii<par->nz_here*par->n_grid*ngx;ii++) { | ||
| //if(dens[ii]!=0){ |
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.
By @mruizherrerab