how does the REFINE_BOXES in input file work?

13 views
Skip to first unread message

陈奕纯

unread,
Jun 17, 2025, 5:34:15 AMJun 17
to IBAMR Users
Here's the attribute from the fila example in IB:
StandardTagAndInitialize {
   tagging_method = "GRADIENT_DETECTOR","REFINE_BOXES"
   RefineBoxes {
      level_0 = [( 0,2*N - 1),(             N - 1,        2*N - 1)]
      level_1 = [( 0,REF_RATIO  *2*N - 1),( REF_RATIO  *N - 1,REF_RATIO  *2*N - 1)]
      level_2 = [( 0,REF_RATIO^2*2*N - 1),( REF_RATIO^2*N - 1,REF_RATIO^2*2*N - 1)]
   }
}
I'm confused about the refine box area. How does the RefineBoxes work?
For example, I have an area with NxN grid. I would like to put a square refine box that is one level higher at the center of the area and the box width is half the the domain width, how should i set up this attribute?

Boyce Griffith

unread,
Jun 30, 2025, 8:00:09 AMJun 30
to IBAMR Users

On Jun 17, 2025, at 5:34 AM, 陈奕纯 <a1185...@gmail.com> wrote:

Here's the attribute from the fila example in IB:
StandardTagAndInitialize {
   tagging_method = "GRADIENT_DETECTOR","REFINE_BOXES"
   RefineBoxes {
      level_0 = [( 0,2*N - 1),(             N - 1,        2*N - 1)]
      level_1 = [( 0,REF_RATIO  *2*N - 1),( REF_RATIO  *N - 1,REF_RATIO  *2*N - 1)]
      level_2 = [( 0,REF_RATIO^2*2*N - 1),( REF_RATIO^2*N - 1,REF_RATIO^2*2*N - 1)]
   }
}
I'm confused about the refine box area. How does the RefineBoxes work?

REFINE_BOXES indicates that specific regions of each level should be marked for refinement. Cells that are marked for refinement on level l are guaranteed to be covered by finer grid cells on level l+1. The grid generation algorithm may also introduce additional fine grid cells.

Note that the indexing is different on different levels. E.g. if you have an NxN box on level 0 and a refinement ratio r, then you have an (r*N)x(r*N) box on level 1.

For example, I have an area with NxN grid. I would like to put a square refine box that is one level higher at the center of the area and the box width is half the the domain width, how should i set up this attribute?

You would want to set up boxes that go from the lower corner of the region to the upper corner of the region. If the lower-left corner of the computational domain is (0,0), then you would do something like:

level_0 = [ (N/4 , 3*N/4 - 1) , (N/4 , 3*N/4 - 1) ]

In general, you would do something like: level_0 = [(x_start,x_end) , (y_start,y_end)].

You also can list multiple boxes for refinement to get more complicated refined regions. See, for instance, IBAMR example navier_stokes/ex0.

— Boyce

--
You received this message because you are subscribed to the Google Groups "IBAMR Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ibamr-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ibamr-users/a9af9410-94df-43fd-a0ae-c6c2ea63a4e0n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages