Question on disable computation in the coarse domain which is refined #4184
Replies: 1 comment 1 reply
-
In AMReX, the grid generation is not constraint by that a coarse Box must be fully refined if a single cell is marked for refinement. This makes the resulting grids much more efficient and flexible. The result of this is it's hard to skip computation in a coarse level Box that is partially refined. To put it another way, unlike octree based AMR, the grids in AMReX do not have a strict parent-child relationship. Thus a coarse box may only have some of its cells refined. This makes is harder to skip computation in covered regions, although it's still doable by using a mask indicating the status of cells. amrex/Src/Base/AMReX_MultiFabUtil.H Line 193 in 6239d25 That being said, I don't think one really need to skip the computation in cells covered be fine levels. In a 3D calculation with a refinement ratio of 2, the coarse cells you can skip is only 1/8 of the fine cells. If one is doing subcycling in time (i.e., two fine steps for every coarse step), the amount of work on the coarse level one can potentially skip is only 1/16 of the fine level work. You may argue that this is still some extra work that is unnecessary. But the thing is if you want to do subcyling in time, the coarse and fine levels need to provide boundary conditions to each other. It's much hard to treat the time-dependent coarse/fine boundary if there are no coarse solution on the fine side of the boundary. If you cannot do subcyling in time, you would have to advance the coarse level at a CFL number less than 0.5. So in the end, you will have to do more work because you have to use smaller dt on the coarse level. Furthermore, more numerical smearing could appear due to unnecessarily small time steps. You might also be interested in this issue. #1157 |
Beta Was this translation helpful? Give feedback.
-
During deveplop CFD code based on the AMReX, I try to disable compution in the coarse domain which is refined, to avoid the useless calculation。However, it's a little diffult because the TagBox used for refinement is hided in AmrMesh.
Are there some functions or some flag help me to locate this kind of domain?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions