neutral
neutral chooses James’s own plain-text format for the files that the next write makes.
Syntax
neutral
The command takes no argument. The command line spells the same format --format neutral.
What it does
neutral sets the format. It stays in force for every later write until another format command replaces it. The command line flag --format is only a fallback: James uses it when the script names no format.
The neutral format is James’s own. It is a plain dump of the mesh and is not the neutral file of any other program. James accepts the command without a note, so that a script that asks for a simple, tool-independent file keeps working. The file holds four kinds of line:
james neutral 1and thentitlewith the title of the script, ortitlealone.nodes N elements M parts P.- One line for each node: its number and x, y and z.
- One line for each active element: its number, its part number and its eight corner nodes. Then
end.
Every field has a fixed width, so a file compares byte for byte. A coordinate with a three-digit exponent prints without its E.
When James applies it
At the next write. neutral is legal in the Control, Part and Merge phases.
Rules James adds
- A second format command that names a different format, before any
writehas used the first, is a warning (E1104). The later command governs. The same format twice raises nothing. - A format command that James does not have, such as the one for an analysis program, is an error (E0100).
- With no merge tolerance before the
write, the file holds the nodes in the order of the parts, then k, then j, then i, with i changing fastest.
Diagnostics
- E1104: a format command replaces a different format that no
writehas used.
Example
The script tests/corpus/144-format-replaced-warns/input.tg, which make test runs:
block 1 2;1 2;1 2;0 1;0 1;0 1;
merge
exodusii
neutral
write
The script chooses Exodus II and then, with no write between, neutral. The later command governs, so James writes the neutral file. James prints this warning, as tests/corpus/144-format-replaced-warns/expected.diag.txt holds:
input.tg:4:1: warning [E1104]: 'neutral' replaces the output format 'exodusii' chosen earlier; the later command governs
james: 0 errors, 1 warning
See also
- exodusii: the Exodus II format.
- write: makes the file.
- Merge and output: what a file holds.