diff options
author | 2017-06-04 12:34:00 -0700 | |
---|---|---|
committer | 2017-06-04 12:34:00 -0700 | |
commit | a1f8bcb0b1907e14b6ead1de2cb0cde45dad0fa7 (patch) | |
tree | 6360c745fe93c701b3725d46076e5c3b9aa09d00 /Source/WarpXInitData.cpp | |
parent | 287fadd5c8fed34c1da880e84ed37d92755cf22d (diff) | |
download | WarpX-a1f8bcb0b1907e14b6ead1de2cb0cde45dad0fa7.tar.gz WarpX-a1f8bcb0b1907e14b6ead1de2cb0cde45dad0fa7.tar.zst WarpX-a1f8bcb0b1907e14b6ead1de2cb0cde45dad0fa7.zip |
move pml setup into InitFromScratch
Diffstat (limited to 'Source/WarpXInitData.cpp')
-rw-r--r-- | Source/WarpXInitData.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/Source/WarpXInitData.cpp b/Source/WarpXInitData.cpp index 497bfb3bf..8660cdaec 100644 --- a/Source/WarpXInitData.cpp +++ b/Source/WarpXInitData.cpp @@ -27,24 +27,11 @@ WarpX::InitData () } } - if (ParallelDescriptor::NProcs() > 1) { - if (okToRegrid(0)) RegridBaseLevel(); - } - if (ParallelDescriptor::IOProcessor()) { std::cout << "\nGrids Summary:\n"; printGridSummary(std::cout, 0, finestLevel()); } - if (do_pml) { - pml[0].reset(new PML(boxArray(0), DistributionMap(0), &Geom(0), nullptr, pml_ncell, 0)); - for (int lev = 1; lev <= finest_level; ++lev) - { - pml[lev].reset(new PML(boxArray(lev), DistributionMap(lev), - &Geom(lev), &Geom(lev-1), pml_ncell, refRatio(lev-1)[0])); - } - } - if (restart_chkfile.empty()) { if (plot_int > 0) { @@ -69,6 +56,15 @@ WarpX::InitFromScratch () #ifdef USE_OPENBC_POISSON InitOpenbc(); #endif + + if (do_pml) { + pml[0].reset(new PML(boxArray(0), DistributionMap(0), &Geom(0), nullptr, pml_ncell, 0)); + for (int lev = 1; lev <= finest_level; ++lev) + { + pml[lev].reset(new PML(boxArray(lev), DistributionMap(lev), + &Geom(lev), &Geom(lev-1), pml_ncell, refRatio(lev-1)[0])); + } + } } void |