Ini File
The INI file creates a
parameter tree to initialize and run the models.
The one we use follows the DUNE
convention. In short, the data is composed
of a key–value pairs on the form key = value
.
Comments
Lines starting with a hash #
will be ignored
# This is a comment
Value
The value
on the key=value
pair may be of different kinds. The following is
list of possible accepted types
Type | Description |
---|---|
string | Sequence of characters terminated an end of line |
float | Decimal number in floating point representation |
integer | Integer number |
path | String that represent filesystem paths absolute or relative to a program |
math_expr | Mathematical Expression |
Examples
string = I am a good looking string
float = 1e-2
integer = 1
path = /path/to/directory/
math_expr = pi*sin(x)*sin(y)
Group
A key
is a string
which may be contained on a common
group of parameters by preceding the line with the group name between
brackets, or/and by preceding the key
by the group name and a dot. Notice that
the two forms may be combined.
As an example, the three following ini files, are equivalent
- No grouping
- Grouping
- Nested grouping
# No preceding section
section.subsection.first = 1.0
section.subsection.second = 2.0
[section]
subsection.first = 1.0
subsection.second = 2.0
[section.subsection]
first = 1.0
second = 2.0