Wiki

Clone wiki

lifev-release / tutorial / Write_a_GetPot_datafile

Go back


Write a GetPot datafile

The datafile can have any extension, what matters is that it features a tree-structure as reported in the example below.

[section_AA]
    parameter_one = TEXT 
    parameter_two = 5
    [./subsectionA]
        parameterA = 1 
    [../subsectionB]
        parameterB = true
        [./subsubsectionA]
            parameterC = '10 20 30'
        [../]
    [../] 
[../]

[section_BB] 
    another_parameter = 1.2
[../]

The datafile is formatted using a tree-structure based on sections, subsections, etc. To create a new section we use square brackets which contain the name of the section itself. To close a section we use [../]. The example above shows that a section can have an arbitrary number of subsections and parameters. In this way the user can customize and structure the datafile based on the particular needs. It is noteworthy that the parameters can be numbers (either integers or doubles), booleans, strings and even arrays.

Here you can download the dataWriteGetpot.in file.

Updated