aboutsummaryrefslogtreecommitdiff
path: root/Source/Initialization/WarpXInitData.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Source/Initialization/WarpXInitData.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/Initialization/WarpXInitData.cpp b/Source/Initialization/WarpXInitData.cpp
index 0c4a6426d..6460860f0 100644
--- a/Source/Initialization/WarpXInitData.cpp
+++ b/Source/Initialization/WarpXInitData.cpp
@@ -163,6 +163,11 @@ WarpX::InitData ()
if (restart_chkfile.empty())
{
+ // Loop through species and calculate their space-charge field
+ bool const reset_fields = false; // Do not erase previous user-specified values on the grid
+ ComputeSpaceChargeField(reset_fields);
+
+ // Write full diagnostics before the first iteration.
multi_diags->FilterComputePackFlush( -1 );
// Write reduced diagnostics before the first iteration.
@@ -212,10 +217,6 @@ WarpX::InitFromScratch ()
mypc->AllocData();
mypc->InitData();
- // Loop through species and calculate their space-charge field
- bool const reset_fields = false; // Do not erase previous user-specified values on the grid
- ComputeSpaceChargeField(reset_fields);
-
InitPML();
}