GetDP 1.2: File formats

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

# 8. File formats

This chapter describes the file formats that cannot be modified by the user. The format of the problem definition structure is explained in 3. Objects, and 4. Types for objects. The format of the post-processing files is explained in 4.10 Types for `PostOperation`.

> 8.1 Input file format |  |
> 8.2 Output file format |  |

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 8.1 Input file format

The native mesh format read by GetDP is the mesh file format produced by Gmsh (http://www.geuz.org/gmsh/). The file is divided into two sections, defining the nodes and the elements in the mesh.

    $NOD
    number-of-nodes
    node-number x-coord y-coord z-coord
    ...
    $ENDNOD
    $ELM
    number-of-elements
    elm-number elm-type elm-region unused number-of-nodes node-numbers
    ...
    $ENDELM

All the syntactic variables stand for integers except x-coord, y-coord and z-coord which stand for floating point values. The elm-type value defines the geometrical type for the element:

elm-type:

`1`
  Line (2 nodes, 1 edge).
`2`
  Triangle (3 nodes, 3 edges).
`3`
  Quadrangle (4 nodes, 4 edges).
`4`
  Tetrahedron (4 nodes, 6 edges, 4 facets).
`5`
  Hexahedron (8 nodes, 12 edges, 6 facets).
`6`
  Prism (6 nodes, 9 edges, 5 facets).
`7`
  Pyramid (5 nodes, 8 edges, 5 facets).
`15`
  Point (1 node).

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 8.2 Output file format

> 8.2.1 File ``.pre'` |  |
> 8.2.2 File ``.res'` |  |

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 8.2.1 File ``.pre'`

The ``.pre'` file is generated by the pre-processing stage. It contains all the information about the degrees of freedom to be considered during the processing stage for a given resolution (i.e., unknowns, fixed values, initial values, etc.).

    $Resolution /* 'resolution-id' */
    main-resolution-number number-of-dofdata
    $EndResolution
    $DofData /* #dofdata-number */
    resolution-number system-number
    number-of-function-spaces function-space-number ...
    number-of-time-functions time-function-number ...
    number-of-partitions partition-index ...
    number-of-any-dof number-of-dof
    dof-basis-function-number dof-entity dof-harmonic dof-type dof-data
    ...
    $EndDofData
    ...

with

    dof-data:
      equation-number nnz
        (dof-type: 1; unknown) |
      dof-value dof-time-function-number
        (dof-type: 2; fixed value) |
      dof-associate-dof-number dof-value dof-time-function-number
        (dof-type: 3; associated degree of freedom) |
      equation-number dof-value
        (dof-type: 5; initial value for an unknown)

Notes:

1. There is one `$DofData` field for each system of equations considered in the resolution (including those considered in pre-resolutions).
2. The dofdata-number of a `$DofData` field is determined by the order of this field in the ``.pre'` file.
3. number-of-dof is the dimension of the considered system of equations, while number-of-any-dof is the total number of degrees of freedom before the application of constraints.
4. Each degree of freedom is coded with three integer values, which are the associated basis function, entity and harmonic numbers, i.e., dof-basis-function-number, dof-entity and dof-harmonic.
5. nnz is not used at the moment.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 8.2.2 File ``.res'`

The ``.res'` file is generated by the processing stage. It contains the solution of the problem (or a part of it in case of program interruption).

    $ResFormat /* GetDP vgetdp-version-number, string-for-format */
    1.1 file-res-format
    $EndResFormat
    $Solution  /* DofData #dofdata-number */
    dofdata-number time-value time-imag-value time-step-number
    solution-value
    ...
    $EndSolution
    ...

Notes:

1. A `$Solution` field contains the solution associated with a `$DofData` field.
2. There is one `$Solution` field for each time step, of which the time is time-value (0 for non time dependent or non modal analyses) and the imaginary time is time-imag-value (0 for non time dependent or non modal analyses).
3. The order of the solution-values in a `$Solution` field follows the numbering of the equations given in the ``.pre'` file (one floating point value for each degree of freedom).

[ << ] | [ >> ] |  |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

Back to geuz.org/getdp