-
Notifications
You must be signed in to change notification settings - Fork 201
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
Read external fields from file in restarted simulation #4547
Read external fields from file in restarted simulation #4547
Conversation
3cf26e5
to
b63faf8
Compare
# Diagnostics | ||
diagnostics.diags_names = diag1 |
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.
This test is now a restart test ; as a consequence, the checkpoints need to be saved.
@@ -728,6 +728,9 @@ void | |||
WarpX::PostRestart () | |||
{ | |||
mypc->PostRestart(); |
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.
This now loads external fields from file when restarting a simulation
@@ -901,34 +904,7 @@ WarpX::InitLevelData (int lev, Real /*time*/) | |||
} | |||
} | |||
|
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.
Cleaning up by putting the code below in a separate function.
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.
Thank you for this fix, looks good!
Agreed to add the docstring / todo's in your PR description, but will approve already.
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.
Docs look great, thx.
When restarting a simulation, the grid external field from file were not read.
As a result, a restarted simulation (e.g. with the electrostatic solver, were the grid external fields are applied at every iteration) would suddenly not feature these fields (without any error or warning message).