-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,6 +216,13 @@ function init_pdf_and_moments!(pdf, moments, boundary_distributions, geometry, | |
end | ||
end | ||
|
||
# Zero-initialise the dSdt diagnostic to avoid writing uninitialised values, as the | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
johnomotani
Author
Collaborator
|
||
# collision operator will not be calculated before the initial values are written to | ||
# file. | ||
@serial_region begin | ||
moments.charged.dSdt .= 0.0 | ||
end | ||
|
||
init_boundary_distributions!(boundary_distributions, pdf, vz, vr, vzeta, vpa, vperp, | ||
z, r, composition) | ||
|
||
|
Something that I think I had arranged in the original development branch was the initialisation of dSdt with data from the restart/output files if the simulation is restarting. I think if you restart a simulation at the moment then dSdt isn't calculated correctly for the first time point (it can only be computed during the time advance, so we lack the data for t = 0. Fixing this could be an optimisation, but it doesn't actually affect anything except the diagnostics.