Skip to content

Uncertainty Quantification#28

Open
RushilSidhu wants to merge 2 commits intoNRL-Plasma-Physics-Division:mainfrom
RushilSidhu:UQ_Dev
Open

Uncertainty Quantification#28
RushilSidhu wants to merge 2 commits intoNRL-Plasma-Physics-Division:mainfrom
RushilSidhu:UQ_Dev

Conversation

@RushilSidhu
Copy link

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.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@arichar6
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants