mt
mt gives a material number to the elements of a region of the open part, over the part’s default and over any earlier mt.
Syntax
mt imin jmin kmin imax jmax kmax material_number
The six reduced indices give the region, as for de: 0 means the extreme in a region. material_number is a positive integer.
What it does
Every element whose eight corners lie inside the region’s box takes the number. A later mt whose region overlaps an earlier one wins in the overlap. The part’s default from mate fills whatever no row covers, wherever the mate stands in the part.
A region with no extent in some direction, a face, an edge or a vertex, holds no solid element. A face on a shell partition holds that partition’s shell elements, and mt sets their material number like a solid’s, with no warning (tests/corpus/246-mt-shell-face; the parts chapter explains shell partitions). A region that holds no element of either kind, an edge, a vertex or a face on a positive partition, keeps its row, assigns nothing and warns (E1202).
When James applies it
When it builds the part, after the default and in the order the rows were read. mt is legal only in the Part phase.
Rules James adds
- The elements inside a region are those whose corners all lie in its box.
- The rows apply in input order; the last covering row wins.
- A region that holds no element, solid or shell, is a warning (E1202), and the row is kept.
- An
insprtafter anmtrenumbers the row’s indices, as it renumbers every earlier command’s.
Diagnostics
- E1201: a reduced index lies outside the part.
- E0106: a range is written high to low.
- E1200: the number is missing, is not an integer, is below 1, or is above 2147483647.
- E1202: the region holds no solid and no shell element.
- E0412:
mtoutside a part.
Example
The script tests/corpus/183-mt-overlap-last-wins/input.tg, which make test runs:
block 1 2 3 4;1 2;1 2;0 1 2 3;0 1;0 1;
mt 1 1 1 3 2 2 5
mt 2 1 1 4 2 2 6
mate 2
endpart
merge
neutral
write
The block has three elements along i. The first mt gives the first two elements material 5, the second gives the last two material 6, and in the middle element, which both cover, the later row wins: the materials are 5, 6, 6. The mate 2 after them changes only the default, which no element needs here.