How does MFIter work when a MultiFab has ghost cells #3372
-
Suppose I declare MFa a MultFab with 2 ghost cells. When I use:
} Are the ghost cells of MFa included in the above loop? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
No, the ghost cells are not included in the loop above. If you want to include ghost cells, you can use |
Beta Was this translation helpful? Give feedback.
No, the ghost cells are not included in the loop above. If you want to include ghost cells, you can use
mfi.growntilebox()
. By default,growntilebox
includes ghost cells. You can also dogrowntilbox(1)
if you only want one ghost cell. You can also dogrowntilebox(IntVect(0,1,0))
for zero ghost cells in x and z-directions and one ghost cell in y-direction.