aboutsummaryrefslogtreecommitdiff
path: root/Source/Evolve/WarpXEvolve.cpp
diff options
context:
space:
mode:
authorGravatar Michael E Rowan <38045958+mrowan137@users.noreply.github.com> 2020-05-05 17:40:24 -0700
committerGravatar GitHub <noreply@github.com> 2020-05-05 17:40:24 -0700
commitf1fcac8a018c46fe0ae587469b2bf92862110f7a (patch)
tree425d8d92dbca75ebe5413b0499d601cef36f33dc /Source/Evolve/WarpXEvolve.cpp
parentbc76960209c232fd2e47f19099470156320f16c7 (diff)
downloadWarpX-f1fcac8a018c46fe0ae587469b2bf92862110f7a.tar.gz
WarpX-f1fcac8a018c46fe0ae587469b2bf92862110f7a.tar.zst
WarpX-f1fcac8a018c46fe0ae587469b2bf92862110f7a.zip
Switch costs to LayoutData (#970)
Cleanup Cleanup
Diffstat (limited to 'Source/Evolve/WarpXEvolve.cpp')
-rw-r--r--Source/Evolve/WarpXEvolve.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Evolve/WarpXEvolve.cpp b/Source/Evolve/WarpXEvolve.cpp
index bc1e31806..8ca059184 100644
--- a/Source/Evolve/WarpXEvolve.cpp
+++ b/Source/Evolve/WarpXEvolve.cpp
@@ -61,7 +61,7 @@ WarpX::Evolve (int numsteps)
if (warpx_py_beforestep) warpx_py_beforestep();
#endif
- amrex::Vector<amrex::Real>* cost = WarpX::getCosts(0);
+ amrex::LayoutData<amrex::Real>* cost = WarpX::getCosts(0);
if (cost) {
#ifdef WARPX_USE_PSATD
amrex::Abort("LoadBalance for PSATD: TODO");
@@ -82,7 +82,7 @@ WarpX::Evolve (int numsteps)
// (Giving more importance to most recent costs; only needed
// for timers update, heuristic load balance considers the
// instantaneous costs)
- for (int i=0; i<cost->size(); ++i)
+ for (int i : cost->IndexArray())
{
(*cost)[i] *= (1. - 2./load_balance_intervals.localPeriod(step+1));
}