aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpXInitData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WarpXInitData.cpp')
-rw-r--r--Source/WarpXInitData.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/Source/WarpXInitData.cpp b/Source/WarpXInitData.cpp
index a80d3e9dd..df01afe88 100644
--- a/Source/WarpXInitData.cpp
+++ b/Source/WarpXInitData.cpp
@@ -29,6 +29,8 @@ WarpX::InitData ()
ComputePMLFactors();
+ InitDiagnostics();
+
if (ParallelDescriptor::IOProcessor()) {
std::cout << "\nGrids Summary:\n";
printGridSummary(std::cout, 0, finestLevel());
@@ -46,6 +48,21 @@ WarpX::InitData ()
}
void
+WarpX::InitDiagnostics () {
+ if (do_boosted_frame_diagnostic) {
+ const Real* current_lo = geom[0].ProbLo();
+ const Real* current_hi = geom[0].ProbHi();
+ Real dt_boost = dt[0];
+
+ myBFD.reset(new BoostedFrameDiagnostic(current_lo[moving_window_dir],
+ current_hi[moving_window_dir],
+ moving_window_v, dt_snapshots_lab,
+ num_snapshots_lab, gamma_boost, dt_boost,
+ moving_window_dir));
+ }
+}
+
+void
WarpX::InitFromScratch ()
{
const Real time = 0.0;
@@ -75,12 +92,13 @@ WarpX::InitPML ()
if (do_pml)
{
pml[0].reset(new PML(boxArray(0), DistributionMap(0), &Geom(0), nullptr,
- pml_ncell, pml_delta, 0, do_dive_cleaning));
+ pml_ncell, pml_delta, 0, do_dive_cleaning, do_moving_window));
for (int lev = 1; lev <= finest_level; ++lev)
{
pml[lev].reset(new PML(boxArray(lev), DistributionMap(lev),
&Geom(lev), &Geom(lev-1),
- pml_ncell, pml_delta, refRatio(lev-1)[0], do_dive_cleaning));
+ pml_ncell, pml_delta, refRatio(lev-1)[0], do_dive_cleaning,
+ do_moving_window));
}
}
}