mseq

mseq changes the number of elements in every region of one direction of the open part.

Syntax

mseq direction d1 d2 ... dn [ ; ]
  • direction: i, j or k.
  • d1 to dn: signed whole numbers, one for each region of that direction. Each is added to that region’s element count. A direction with n + 1 index entries has n regions.

The closing ; may be left out.

What it does

mseq gives each region a new element count and leaves the partitions and coordinates alone. The result is the same as writing the new counts into the part’s own index list.

When James applies it

When it is read, in the Part phase. mseq is not one of the 21 steps. James folds it into the part’s index list at once, so every later command sees the new element counts.

Rules James adds

  • mseq reads every number it finds, up to the ; or the first word that is not a number, and then compares the count with the number of regions. Too many values and too few both give E0406.
  • update is not supported in this version (E0100), and James reports the coordinate equations as not recognized (E0105). Once they are supported, mseq and lmseq after them will be refused, not ignored.

Diagnostics

  • E0406: the direction is not i, j or k, or the number of values is not the number of regions.

Example

The script tests/corpus/166-mseq-doubles-j/input.tg, which make test runs:

c mseq j adds two elements to each j region, so 1 3 5 becomes 1 5 9.
block 1 3;1 3 5;1 2;0 1;0 1 2;0 1;
mseq j 2 2
endpart

The j list 1 3 5 has two regions of two elements. Adding 2 to each makes them four, and the IR shows the j list as [1 5 9]. The part has twice as many elements along j.

See also

  • lmseq: changes one region only.
  • insprt: adds a partition.
  • meshscal: scales every part’s counts.
  • Parts: element counts in detail.

James 0.3.1.

This site uses Just the Docs, a documentation theme for Jekyll.