Structure

Structures of solver definition files, grid generating program definition files are described in this section.

Solver definition file

Structure of solver definition files for a solver that uses only one calculation grids is shown in Figure 45, and that for a solver that uses multiple types of calculation grids is shown in Figure 46, respectively.

../_images/solverdef_structure_basic.png

Figure 45 Structure of solver definition file

../_images/solverdef_structure_multigrid.png

Figure 46 Structure of solver definition files for a solver that uses multiple grid types

When the solver uses multiple types of grids, Solver developers should add multiple GridType elements, and defines grid structure, grid attributes, and boundary conditions under each GridType element.

An example of solver definition file for a solver that uses multiple grid types, is shown in List 25. In this example, boundary condition definition is dropped, because that is not required. Please pay attention that the following point is different:

  • Grid structure (gridtype attribute) is not definied in SolverDefinition elemenet, but in GridType elements.

When a user creates a new project and selects a solver that bundles the solver definition shown in List 25, a new pre-processor in Figure 47 is shown.

List 25 An example of solver definition file for a solver that uses multiple types of grids
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?xml version="1.0" encoding="UTF-8"?>
<SolverDefinition
  name="multigridsolver"
  caption="Multi Grid Solver"
  version="1.0"
  copyright="Example Company"
  release="2012.04.01"
  homepage="http://example.com/"
  executable="solver.exe"
  iterationtype="time"
>
  <CalculationCondition>
    <!-- Define calculation conditions here. -->
  </CalculationCondition>
  <GridTypes>
    <GridType name="river" caption="River">
      <GridRelatedCondition>
        <Item name="Elevation" caption="Elevation">
          <Definition valueType="real" position="node" />
        </Item>
        <Item name="Roughness" caption="Roughness">
          <Definition valueType="real" position="node"/>
        </Item>
        <Item name="Obstacle" caption=" Obstacle">
          <Definition valueType="integer" position="cell"/>
        </Item>
      </GridRelatedCondition>
    </GridType>
    <GridType name="floodbed" caption="Flood Bed">
      <GridRelatedCondition>
        <Item name="Elevation" caption="Elevation">
          <Definition valueType="real" position="node" />
        </Item>
      </GridRelatedCondition>
    </GridType>
  </GridTypes>
</SolverDefinition>
../_images/preprocessor_multigridtypes.png

Figure 47 Pre-processor image after loading the solver definition file with multiple grid type definitions

Grid generating program definition file

Structure of grid generating program definition file is shown in Figure 48

../_images/gridgen_structure.png

Figure 48 Structure of grid generating program definition file