diff options
author | 2019-10-08 15:13:24 +0200 | |
---|---|---|
committer | 2019-10-08 15:13:24 +0200 | |
commit | d8cf34c82ccf179372e8f07700be72a39c528d9e (patch) | |
tree | 4da582608105feeba6f88023bc7235ee758e85ed /Source/WarpX.cpp | |
parent | d3102b78c94a201feeb5588784ae886e45958207 (diff) | |
parent | f8a87298908e2310d53cbc0c3215613f1b1606b2 (diff) | |
download | WarpX-d8cf34c82ccf179372e8f07700be72a39c528d9e.tar.gz WarpX-d8cf34c82ccf179372e8f07700be72a39c528d9e.tar.zst WarpX-d8cf34c82ccf179372e8f07700be72a39c528d9e.zip |
Merge remote-tracking branch 'upstream/dev' into qed_phys_part_with_lambda
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r-- | Source/WarpX.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 91174ee0b..5a51d7d13 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -137,13 +137,13 @@ WarpX::WarpX () // No valid BoxArray and DistributionMapping have been defined. // But the arrays for them have been resized. - int nlevs_max = maxLevel() + 1; + const int nlevs_max = maxLevel() + 1; istep.resize(nlevs_max, 0); nsubsteps.resize(nlevs_max, 1); #if 0 // no subcycling yet - for (int lev = 1; lev <= maxLevel(); ++lev) { + for (int lev = 1; lev < nlevs_max; ++lev) { nsubsteps[lev] = MaxRefRatio(lev-1); } #endif @@ -239,7 +239,7 @@ WarpX::WarpX () WarpX::~WarpX () { - int nlevs_max = maxLevel() +1; + const int nlevs_max = maxLevel() +1; for (int lev = 0; lev < nlevs_max; ++lev) { ClearLevel(lev); } @@ -452,7 +452,8 @@ WarpX::ReadParameters () } // Check that the coarsening_ratio can divide the blocking factor - for (int lev=0; lev<maxLevel(); lev++){ + const int nlevs_max = maxLevel(); + for (int lev=0; lev<nlevs_max; lev++){ for (int comp=0; comp<AMREX_SPACEDIM; comp++){ if ( blockingFactor(lev)[comp] % plot_coarsening_ratio != 0 ){ amrex::Abort("plot_coarsening_ratio should be an integer " |