Functors on cells with certain mask value #3191
Replies: 3 comments 2 replies
-
What kind of operations do you do on those special cells? Do you need to access regular or special data in other cells? |
Beta Was this translation helpful? Give feedback.
-
You can probably do something like this. Sorry for not having comments. But I am happy to explain every single line. The code is not tested and is likely to have bugs. But I believe the idea should work.
|
Beta Was this translation helpful? Give feedback.
-
Also, is there any real benefit to storing these in the MultiFab (rather than a sparse/distributed set of functor objects)? |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm trying to assess whether Amrex is appropriate for my use case. I am trying to develop a Lattice-Boltzmann method based code.
For my use case, I would need to be able to easily run functors only on cells with a certain value of a mask. For example, I would be implementing actuator disks, which would encompass <1% of the cells in the domain. I would not want to run a functor on the whole domain just to update these few cells.
Additionally, I want to add some additional data attributes only to these specific cells. Adding the data to the whole MultiFab system would severely impact my memory usage. Is there a good way to go about this? I would want to ensure coalesced memory access wherever possible.
Beta Was this translation helpful? Give feedback.
All reactions