* \brief Build buffer mask within given FArrayBox * * \param tbx Current FArrayBox * \param buffer_mask Buffer mask to be set * \param guard_mask Guard mask used to set buffer_mask * \param ng Number of guard cells */
| 3509 | * \param ng Number of guard cells |
| 3510 | */ |
| 3511 | void |
| 3512 | WarpX::BuildBufferMasksInBox ( const amrex::Box tbx, amrex::IArrayBox &buffer_mask, |
| 3513 | const amrex::IArrayBox &guard_mask, const int ng ) |
| 3514 | { |
| 3515 | auto const& msk = buffer_mask.array(); |
| 3516 | auto const& gmsk = guard_mask.const_array(); |
| 3517 | const amrex::Dim3 ng3 = amrex::IntVect(ng).dim3(); |
| 3518 | amrex::ParallelFor(tbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) |
| 3519 | { |
| 3520 | for (int kk = k-ng3.z; kk <= k+ng3.z; ++kk) { |
| 3521 | for (int jj = j-ng3.y; jj <= j+ng3.y; ++jj) { |
| 3522 | for (int ii = i-ng3.x; ii <= i+ng3.x; ++ii) { |
| 3523 | if ( gmsk(ii,jj,kk) == 0 ) { |
| 3524 | msk(i,j,k) = 0; |
| 3525 | return; |
| 3526 | } |
| 3527 | } |
| 3528 | } |
| 3529 | } |
| 3530 | msk(i,j,k) = 1; |
| 3531 | }); |
| 3532 | } |
| 3533 | |
| 3534 | const iMultiFab* |
| 3535 | WarpX::CurrentBufferMasks (int lev) |
nothing calls this directly
no outgoing calls
no test coverage detected