diff options
author | 2019-11-08 09:54:30 -0800 | |
---|---|---|
committer | 2019-11-08 09:54:30 -0800 | |
commit | b355dbde7fd3ab2fb4a2524e5417860ae14fd9df (patch) | |
tree | 855f1af10e256da892aa593094067de578853c4b /Source/WarpX.cpp | |
parent | 12f43234f79304dd2cb1acdb0e190887f8eee270 (diff) | |
parent | 73df3761e92029302a1044ef9ed6651a267e2dab (diff) | |
download | WarpX-b355dbde7fd3ab2fb4a2524e5417860ae14fd9df.tar.gz WarpX-b355dbde7fd3ab2fb4a2524e5417860ae14fd9df.tar.zst WarpX-b355dbde7fd3ab2fb4a2524e5417860ae14fd9df.zip |
Merge branch 'dev' of https://github.com/ECP-WarpX/WarpX into maxwell_juttner
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r-- | Source/WarpX.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index eef033236..b04bbb380 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -1062,6 +1062,21 @@ WarpX::UpperCorner(const Box& bx, int lev) #endif } +std::array<Real,3> +WarpX::LowerCornerWithCentering(const Box& bx, int lev) +{ + std::array<Real,3> corner = LowerCorner(bx, lev); + std::array<Real,3> dx = CellSize(lev); + if (!bx.type(0)) corner[0] += 0.5*dx[0]; +#if (AMREX_SPACEDIM == 3) + if (!bx.type(1)) corner[1] += 0.5*dx[1]; + if (!bx.type(2)) corner[2] += 0.5*dx[2]; +#else + if (!bx.type(1)) corner[2] += 0.5*dx[2]; +#endif + return corner; +} + IntVect WarpX::RefRatio (int lev) { |