partmode
partmode chooses whether the index lists of the parts that follow hold node indices or element counts.
Syntax
partmode s | i
s: standard mode. Each index list entry is a node index, and each coordinate list has as many values as its index list.i: interval mode. Each index list entry is the number of elements in one region, so an index list has one entry fewer than its coordinate list.
What it does
In interval mode James converts each list of element counts to node indices when it reads the block or cylinder command, and the IR shows the node indices. The default is s.
When James applies it
When it is read, before the next block or cylinder. It sets a session mode and applies to every later part until the next partmode. It is legal in the Control and Merge phases, not inside a part.
Rules James adds
partmodepersists. It is not used up by the next part. A script that wants interval mode for three parts writes it once.
Diagnostics
- E0415: the mode is missing or is not
sori.
Example
The script tests/corpus/164-partmode-i-element-counts/input.tg, which make test runs:
c partmode i reads element counts, which the IR shows as node indices.
partmode i
block 3 2;4;1 1;0 1 2;0 2;0 1 2;
endpart
The i list 3 2 is two regions of 3 and 2 elements, so the IR shows the node indices [1 4 6] with the coordinates [0 1 2]. The j list 4 becomes [1 5] and the k list 1 1 becomes [1 2 3].