|Version 2 (modified by jmstone, 4 years ago) (diff)|
Input Files with SMR
Multiple Domains at different levels of refinement are specified at run time using the <domain> block in the input file (see Domain Blocks in the User Guide for more details).
Initializing Two Levels
As an example, consider setting up a 2D calculation on a 8x8 root Domain, with a single level=1 Domain with 4x4 cells that is offset from the left and bottom by 3 and 2 root Domain cells respectively (for simplicity the size of this Mesh is ridiculously small on purpose). The image below shows the desired Mesh.
This Mesh configuration can be initialized with the following two Domain blocks in the input file.
<domain1> level = 0 # refinement level this Domain (root=0) Nx1 = 8 # Number of zones in X-direction x1min = -0.5 # minimum value of X x1max = 0.5 # maximum value of X bc_ix1 = 4 # boundary condition flag for inner-I (X1) bc_ox1 = 4 # boundary condition flag for outer-I (X1) Nx2 = 8 # Number of zones in Y-direction x2min = -0.5 # minimum value of Y x2max = 0.5 # maximum value of Y bc_ix2 = 4 # boundary condition flag for inner-J (X2) bc_ox2 = 4 # boundary condition flag for outer-J (X2) <domain2> level = 1 # refinement level this Domain (root=0) Nx1 = 4 # Number of zones in X1-direction Nx2 = 4 # Number of zones in X2-direction iDisp = 6 # i-displacement measured in cells of this level jDisp = 4 # j-displacement measured in cells of this level
The position of the level=1 Domain is determined by the iDisp and jDisp parameters in the <domain2> block, and these positions are measured in units of the grid cells at the level of the <domain> block that specifies them (in this case level=1).