Skip to content

General input format

Knut Morten Okstad edited this page Oct 8, 2019 · 6 revisions

The input format in IFEM is xml-based. If you do not know the general anatomy of an XML file, we suggest you go read about it.

IFEM conventions

In general, an XML tag is of the format

  <tag attribute="something">somevalue</tag>

For convenience, IFEM also allows you to use

  <tag attribute="something" value="somevalue"/>

if the "somevalue" is of a basic type (like int, double, bool, etc.).

Anatomy of an input file

The general format of an input file is

<simulation>
  <settingcontext1>
    <setting1/>
    <setting2/>
  </settingcontext1>
  <settingcontext2>
    <setting1/>
    <setting2/>
  </settingcontext2>
</simulation>

The <simulation> tag is the root tag and shall always be present. Additionally, all contexts can be used in an application-specific super-context. The settings will then only be applied to the particular (sub)-solver.

You can use include statements and put parts of an input file in another file.

<simulation>
  <include>geometry.xinp</include>
   ...
</simulation>

The input file is preparsed, and the contents of the included file replaces the include tag, i.e., with

<geometry>
  <patchfile>foo.g2</patchfile>
</geometry>

in geometry.xinp, the final parsed input would look like

<simulation>
  <geometry>
    <patchfile>foo.g2</patchfile>
  </geometry>
</simulation>

Available contexts