Skip to content
Discussion options

You must be logged in to vote

You can build a mask. For example,

iMultiFab maskg1(macro.boxArray(), macro.DistributionMap(), 1, 1);
maskg1.BuildMask(geom.Domain(), geom.perioicity(), 1, 0, 0, 1);

// You can probably cache the mask                                                                                                                                           
iMultiFab mask(maskg1.boxArray(), maskg1.DistributionMap(), 1, 0);
auto const& ma = mask.arrays();
auto const& ma1 = maskg1.const_arrays();
ParallelFor(mask, [=] AMREX_GPU_DEVICE (int b, int i, int j, int k)
{
    auto const& a1 = ma1[b];
    auto const& a = ma[b];
    // assuming this is 2d                                                                …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Afraid31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants