-
Notifications
You must be signed in to change notification settings - Fork 5
Crank Nicolson implicit method from new version #10
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
Conversation
Codecov ReportAttention: Patch coverage is
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements an implicit Crank-Nicolson time evolution method with Picard iterations and particle substepping to improve energy conservation and streamline runtime. Key changes include adding CN_step and its supporting parameters to the simulation workflow, updating the simulation function to select between Boris and implicit methods based on a new parameter, and modifying example inputs to use the implicit scheme.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
jaxincell/_simulation.py | Adds new parameters and branches to support implicit Crank-Nicolson via CN_step |
jaxincell/_algorithms.py | Introduces the CN_step function with Picard iterations and substepping logic |
examples/Landau_damping.py | Updates simulation and solver parameters to employ the implicit time evolution algorithm |
example_input.toml | Adjusts solver parameters and total steps to reflect the new implicit method configuration |
Comments suppressed due to low confidence (1)
jaxincell/_simulation.py:138
- Please update the function docstring to document the newly added parameters 'number_of_Picard_iterations_implicit_CN' and 'number_of_particle_substeps_implicit_CN' for better clarity.
,number_of_Picard_iterations_implicit_CN=7, number_of_particle_substeps_implicit_CN=2):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, except the new variable names for the inputs that include _x, _y or _z. I'll run the new code and benchmarks later to make sure the results are the same.
…tep, grid points, and enable relativistic effects
…l instability examples; fix variable assignment in CN_step function
…mulation function to pass substep count
…ine relative energy error calculation in plot function
Implemented the Crank-Nicolson implicit method to improve energy conservation
Added substepping and LAX scan to reduce runtime.
Adjusted input parameters for Landau damping