How to distinguish interior vs boundary cells in ParallelFor #4484
-
I'm working with cell-centered MultiFabs in AMReX and would like to distinguish between: Interior valid cells, which are far from domain boundaries or coarse/fine interfaces; Boundary valid cells, which are near physical or AMR level boundaries. Here is a simplified version of the code I'm using:
My question: I want to avoid treating shared edges between adjacent Boxes as "boundary"; The boundary definition should reflect true physical and coarse/fine AMR boundaries. Additional context: However, in my application I need to average values from fine grid boundary cells into coarse grid cells, e.g., by calling amrex::average_down(...). But it seems that average_down only works with valid cells, and will not include ghost cells in the averaging. Is there any recommended way to: Clearly distinguish boundary and interior cells; Possibly include ghost cell values in an average-down operation, or Modify the valid/ghost cell layout to support this while keeping AMReX functionality? Thanks in advance for any suggestions or examples! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can build a mask. For example,
As for average down, you can write one yourself. Something like
|
Beta Was this translation helpful? Give feedback.
You can build a mask. For example,