In MIF 2.1 files, the output basename and output file formats are
specified inside the driver's Specify block. In MIF 2.2 these
specifications are moved to a separate SetOptions block. This
block can be placed anywhere in the MIF file, but is typically placed
near the start of the file so that it affects all output
initializations. The SetOptions command takes a single argument,
which is a list of label + value pairs. The default labels are:
- basename
- scalar_output_format
- scalar_field_output_format
- scalar_field_output_meshtype
- vector_field_output_format
- vector_field_output_meshtype
The basename value is used as a prefix for output filename
construction by the data output routines. If basename is not
specified, then the default value is taken from the filename of the
input MIF file. The scalar_output_format value is a C-style
printf string specifying
the output format for DataTable output. This is
optional, with default value ``%.17g''. The values associated with
scalar_field_output_format and
vector_field_output_format should be two element lists
that specify the style and precision for scalar and vector field
output sent to mmDisp and
mmArchive. The first
element in the list should be one of binary or text, specifying
the output style. If binary output is selected, then the second element
specifying precision should be either 4 or 8, denoting component binary
output length in bytes. For text output, the
second element should be a C-style printf string like that used by
scalar_output_format. The default value for both
scalar_field_output_format and
vector_field_output_format is ``binary 8''.
For scalar_field_output_meshtype and
vector_field_output_meshtype the values should be either
``rectangular'' (default) or ``irregular'', specifying the grid type for
the corresponding field output files.
Multiple SetOptions blocks are allowed. Label values specified
in one SetOption block may be overwritten by a later
SetOption block. Output formats for a given output are
set during the processing of the Specify block for the enclosing
Oxs_Ext object. Therefore, one can specify different formats
for outputs in different Oxs_Ext objects by strategic placement
of SetOptions blocks.
Additional label names may be added in the future, and may be
Oxs_Ext class dependent. At present there is no checking for
unknown label names, but that policy is subject to change.
An example SetOptions block:
SetOptions {
basename fubar
scalar_output_format %.12g
scalar_field_output_format {text %.4g}
scalar_field_output_meshtype irregular
vector_field_output_format {binary 4}
}