Uncertainty Quantification#28
Open
RushilSidhu wants to merge 2 commits intoNRL-Plasma-Physics-Division:mainfrom
Open
Uncertainty Quantification#28RushilSidhu wants to merge 2 commits intoNRL-Plasma-Physics-Division:mainfrom
RushilSidhu wants to merge 2 commits intoNRL-Plasma-Physics-Division:mainfrom
Conversation
arichar6
suggested changes
Aug 23, 2021
Comment on lines
85
to
+88
| def push(self, position, momentum, mass, spring_constant): | ||
| p0 = momentum.copy() | ||
| momentum[:] = momentum - self.dt * spring_constant * position | ||
| position[:] = position + self.dt * p0 / mass | ||
| momentum[:] = momentum - self.dt * spring_constant * position |
Contributor
There was a problem hiding this comment.
Your modification to this code has changed the algorithm from the "Forward Euler" method to the "Leapfrog" method. Instead of changing this class, you should just use the Leapfrog compute tool defined below.
Contributor
|
Also, FYI, if you create a PR and then realize that it needs to be corrected or updated, you should just push additional commits to the same branch. This will automatically update the PR, so that you don't need to close and open a bunch of PRs. |
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.
Uncertainty Quantification class and runner script for the block on spring model. Developed by Rushil Sidhu while working under Dr. Ian Rittersdorf
Resent because I added some comments to clairfy the class' methods and because of errors commiting correct changes.