Context Navigation

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 14x9 root Domain, with a single level=1 Domain with
8x8 cells that is offset from the left and bottom by 5 and 3 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.

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).

Initializing Two level=1 Domains

Now consider setting up a 2D calculation on a 18x14 root Domain, with two level=1 Domains each with
12x12 cells. The first level=1 Domain is offset from the left and bottom boundries of the root Domain
by 2 and 3 root Domain cells respectively, while the second is offset by 10 and 4 root Domain cells
respectively. The image below shows the desired Mesh.

This Mesh configuration can be initialized with the following two Domain blocks in the input file.

Note that 2 root level cells are required between the two level=1 Domains.

Initializing Three Levels

As a final example, consider setting up a 2D calculation on a 9x7 root Domain, with a single level=1 Domain with
8x6 cells, and a single level=2 Domain with 8x4 cells. The first level=1 Domain is offset from the left and bottom
boundaries of the root Domain
by 3 and 2 root Domain cells respectively, while the level=2 Domain is offset by 4 and 3 root Domain cells
respectively. The image below shows the desired Mesh.

This Mesh configuration can be initialized with the following two Domain blocks in the input file.

Once again, note that the iDisp and jDisp parameters in the
<domain3> block are measured in units of the grid cells at the level of
the <domain> block that specifies them (in this case level=2).
Note that 2 root level cells are required between the two level=1 Domains.