Defining grid generating conditions

Define grid generating conditions. Grid generating conditions are defined in "GridGeneratingCondition" element in a grid generating program definition file. Add description of grid generating condition to the grid generating program definition file you created in Defining basic information, and overwrite it. Grid generating program definition file content is now as shown in List 15. The added part is shown with highlight.

List 15 Example of grid generating program definition file that now has grid generating condition definition
 1<?xml version="1.0" encoding="UTF-8"?>
 2<GridGeneratorDefinition
 3  name="samplecreator"
 4  caption="Sample Grid Creator"
 5  version="1.0"
 6  copyright="Example Company"
 7  executable="generator.exe"
 8  gridtype="structured2d"
 9>
10  <GridGeneratingCondition>
11    <Tab name="size" caption="Grid Size">
12      <Item name="imax" caption="IMax">
13        <Definition valueType="integer" default="10" max="10000" min="1" />
14      </Item>
15      <Item name="jmax" caption="JMax">
16        <Definition valueType="integer" default="10" max="10000" min="1" />
17      </Item>
18    </Tab>
19  </GridGeneratingCondition>
20</GridGeneratorDefinition>

At this point, the structure of the grid generating program definition file is as shown in Figure 31.

../_images/gridgen_structure_with_gridgencond.png

Figure 31 Grid generating program definition file structure

Now make sure that grid generating program definition file is arranged correctly.

Launch iRIC, and opens the [Select Grid Generating Algorithm] dialog with the same procedure in Defining basic information. Select "Sample Grid Creator" in the list, and click on [OK].

The [Grid Creation] dialog (Figure 32) will open. Now you can see that the grid generating condition items you defined are shown. When you checked, click on [Cancel] to close the dialog.

../_images/gridgen_cond_dialog_base.png

Figure 32 The [Grid Creation] dialog

Now add one more group and add grid generating condition items. Add "Elevation Output" Tab element just under "Grid Size" Tab element. The added part is shown with highlight.

List 16 Example of grid generating program definition file that now has grid generating condition definition
 1    (abbr.)
 2    </Tab>
 3    <Tab name="elevation" caption="Elevation Output">
 4      <Item name="elev_on" caption="Output">
 5        <Definition valueType="integer" default="0">
 6          <Enumeration caption="Enabled" value="1" />
 7          <Enumeration caption="Disabled" value="0" />
 8        </Definition>
 9      </Item>
10      <Item name="elev_value" caption="Value">
11        <Definition valueType="real" default="0">
12          <Condition type="isEqual" target="elev_on" value="1" />
13        </Definition>
14      </Item>
15    </Tab>
16  </GridGeneratingCondition>
17</GridGeneratorDefinition>

At this Point, the structure of grid generating program definition file is as shown in Figure 33.

../_images/gridgen_structure_with_gridgencond_advanced.png

Figure 33 Grid generating program definition file structure

Now make sure that grid generating program definition file is arranged correctly. Do the operation you did again, to show the [Grid Creation] dialog (Figure 34).

Now you'll see that the new group "Elevation Output" in the group list. You'll also notice that "Value" item is enabled only when "Output" value is "Enabled".

../_images/gridgen_cond_dialog_advanced.png

Figure 34 The [Grid Creation] dialog

What it comes down to is:

  • Grid generating condition group is defined with "Tab" element, and grid generating condition item is defined with "Item" element.

  • The Structure under "Definition" elements depends on the condition type (i. e. Integer, Real number, functional etc.). Refer to Section Examples of calculation conditions, boundary conditions, and grid generating condition for examples of grid generating condition items for each type.

  • Dependenciy between grid generating condition items can be defined with "Condition" element. In "Condition" element, define the condition when that item should be enabled. Refer to Example of condition to activate calculation conditions etc. for examples of "Condition" element.

  • In this example, the calculation condition dialog shows the items as a simple list, but iRIC has feature to show items with more complex layouts, like layout with group boxes. Refer to Example of dialog layout definition for more complex calculation condition page layouts.