Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #19: Adding capability for charged particle motion in electric and magnetic fields #20

Merged
merged 15 commits into from
Mar 28, 2024

Conversation

gsgall
Copy link
Collaborator

@gsgall gsgall commented Mar 15, 2024

  • VelocityUpdater was refactored to ParticleStepper to be more descriptive
  • The updateVelocity method was changed to setupStep since it does more than just update the particle velocity

(Closes #19)

@moosebuild
Copy link
Contributor

moosebuild commented Mar 15, 2024

Job Documentation on 1ca808c wanted to post the following:

View the site here

This comment will be updated on new commits.

@moosebuild
Copy link
Contributor

moosebuild commented Mar 15, 2024

Job Coverage on 1ca808c wanted to post the following:

Coverage

042c1a #20 1ca808
Total Total +/- New
Rate 91.53% 91.90% +0.38% 94.00%
Hits 162 227 +65 94
Misses 15 20 +5 6

Diff coverage report

Full coverage report

This comment will be updated on new commits.

gsgall added 2 commits March 16, 2024 01:32
… and magnetic fields

- VelocityUpdater was refactored to ParticleStepper to be more descriptive
- The updateVelocity method was changed to setupStep since it does more than just update the particle velocity
@simopier simopier requested a review from loganharbour March 26, 2024 14:03
Copy link
Collaborator

@simopier simopier left a comment

Choose a reason for hiding this comment

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

Thank you for this contribution!

A partial first round of reviews (I did not make it to the tests yet).
It looks like a lot of comments, but these are generally minor since you submitted a very good base.

EDIT: by the way @gsgall , Casey taught me something I'm now sharing every chance I get: if you go to the file changes, you can submit commits in batches from suggestions.

Let me know if you have any questions.

doc/content/bib/boris.bib Outdated Show resolved Hide resolved
src/userobjects/BorisStepper.C Outdated Show resolved Hide resolved
doc/content/source/userobjects/BorisStepper.md Outdated Show resolved Hide resolved
doc/content/source/userobjects/BorisStepper.md Outdated Show resolved Hide resolved
doc/content/source/userobjects/LeapFrogStepper.md Outdated Show resolved Hide resolved
src/userobjects/PICStudyBase.C Outdated Show resolved Hide resolved
src/userobjects/PICStudyBase.C Outdated Show resolved Hide resolved
src/userobjects/PICStudyBase.C Outdated Show resolved Hide resolved
src/userobjects/ParticleStepperBase.C Outdated Show resolved Hide resolved
src/userobjects/ParticleStepperBase.C Outdated Show resolved Hide resolved
@simopier
Copy link
Collaborator

I just looked at the test coverage, @gsgall:

  • you'll want to add tests activating the error from if (******.size() != 3) check.
  • Also, it looks like the unused methods in ParticleStepperBase are indeed unused. Do they need to stay there? (@loganharbour)
  • it also look like the following lines are not hit:
const std::vector<std::shared_ptr<Ray>> &
PICStudyBase::getBankedRays() const
{
  return _banked_rays;
}

What are they for?

Copy link
Member

@loganharbour loganharbour left a comment

Choose a reason for hiding this comment

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

All pretty minor here.

include/userobjects/PICStudyBase.h Outdated Show resolved Hide resolved
src/userobjects/PICStudyBase.C Outdated Show resolved Hide resolved
include/userobjects/PICStudyBase.h Outdated Show resolved Hide resolved
include/userobjects/ParticleStepperBase.h Outdated Show resolved Hide resolved
src/userobjects/BorisStepper.C Outdated Show resolved Hide resolved
src/userobjects/LeapFrogStepper.C Outdated Show resolved Hide resolved
src/userobjects/LeapFrogStepper.C Outdated Show resolved Hide resolved
src/userobjects/PICStudyBase.C Outdated Show resolved Hide resolved
src/userobjects/ParticleStepperBase.C Show resolved Hide resolved
test/tests/userobjects/boris_stepper/cyclotron_motion.i Outdated Show resolved Hide resolved
@loganharbour
Copy link
Member

it also look like the following lines are not hit:

Heh @simopier noticed without even looking at the coverage 😬

gsgall and others added 2 commits March 26, 2024 23:55
Co-authored-by: Pierre-Clement Simon <[email protected]>
Co-authored-by: Logan Harbour <[email protected]>
- the getBankedRays() method was removed from the PICStudyBase
- some temporary variables in the reinitialize method were removed for clarity
- the temporary_velocity variable was renamed to _temporary_velocity
@gsgall
Copy link
Collaborator Author

gsgall commented Mar 27, 2024

it also look like the following lines are not hit:

Heh @simopier noticed without even looking at the coverage 😬

Sorry about that. I was using that method when I had written a test that output rayData into csv with a custom post processor object. I forgot to remove it when I transitioned the tests to be exodiffs because the post processor test was not parallel consistent.

@gsgall
Copy link
Collaborator Author

gsgall commented Mar 27, 2024

@loganharbour @simopier This should be good to go.

Copy link
Member

@loganharbour loganharbour left a comment

Choose a reason for hiding this comment

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

My last comment. Content with everything else

include/userobjects/ParticleStepperBase.h Outdated Show resolved Hide resolved
Copy link
Collaborator

@simopier simopier left a comment

Choose a reason for hiding this comment

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

Thank you for these improvements, @gsgall. I have a few more minor comments and two suggestions:

  • could you add a test case for the constant electric field case?
  • I encourage you to add a reference to your submitted PBNC paper in the relevant documentation pages. This will improve its visibility. You can lark it as submitted, and we'll update this when it gets published.

doc/content/source/userobjects/BorisStepper.md Outdated Show resolved Hide resolved
doc/content/source/userobjects/LeapFrogStepper.md Outdated Show resolved Hide resolved
doc/content/source/userobjects/LeapFrogStepper.md Outdated Show resolved Hide resolved
doc/content/source/userobjects/LeapFrogStepper.md Outdated Show resolved Hide resolved
doc/content/source/userobjects/LeapFrogStepper.md Outdated Show resolved Hide resolved
test/include/userobjects/TestSimpleStepper.h Outdated Show resolved Hide resolved
test/include/userobjects/TestSimpleStepper.h Outdated Show resolved Hide resolved
test/src/userobjects/TestPICStudyUserDefinedRays.C Outdated Show resolved Hide resolved
test/tests/userobjects/leapfrog_stepper/tests Outdated Show resolved Hide resolved
test/tests/userobjects/leapfrog_stepper/tests Outdated Show resolved Hide resolved
@gsgall
Copy link
Collaborator Author

gsgall commented Mar 28, 2024

Thank you for these improvements, @gsgall. I have a few more minor comments and two suggestions:

  • could you add a test case for the constant electric field case?
  • I encourage you to add a reference to your submitted PBNC paper in the relevant documentation pages. This will improve its visibility. You can lark it as submitted, and we'll update this when it gets published.

I have added these test cases for the BorisStepper I also left a comment about them on your review requests where you ask for them as well.

Additionally, the paper reference has been added to the BorisStepper documentation page.

Copy link
Collaborator

@simopier simopier left a comment

Choose a reason for hiding this comment

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

Thanks @gsgall, this looks great to me.

@loganharbour, could we add the json file capabilities you mentioned to make the gold file more human readable? Maybe in a follow up PR if it isn't ready to go in yet.

@loganharbour
Copy link
Member

@loganharbour, could we add the json file capabilities you mentioned to make the gold file more human readable? Maybe in a follow up PR if it isn't ready to go in yet.

Yeah, this'll be a future effort. It's on a list :)

@simopier simopier merged commit 3239f5a into idaholab:devel Mar 28, 2024
7 checks passed
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.

Particle Stepping in Electric and Magnetic fields
4 participants