t

t sets the tolerance under which the merge joins nodes of any part that lie close together, and it prints no report.

Syntax

t tolerance

tolerance is a real number, in the length units of the mesh.

What it does

t records a merge tolerance. At the next write, James merges every pair of nodes of the covered parts that lie closer together than the tolerance, so that the faces where parts touch share their nodes. The nodes of a merged pair become one node, and the elements that used either now use the survivor. t prints no report.

When James applies it

When the next write runs, which merges the parts that the write covers. The command itself only records the tolerance, so it takes effect at that write. It is legal in the Control, Part and Merge phases.

Rules James adds

  • The command takes every node of the parts that the write covers.
  • Two nodes merge when the distance between them is less than the tolerance. A distance exactly equal to the tolerance does not merge.
  • The first-defined node survives. That is the node with the lowest number before merging: parts in order, then k, then j, then i, with i changing fastest. James takes the nodes in that order and merges each one into the closest survivor within the tolerance. Of two survivors at the same distance, it takes the one with the lower number. The rule is not transitive. Three nodes in a row, each 0.9 of the tolerance from the next, leave two nodes: the second merges into the first, and the third is too far from the first and stays.
  • A tolerance of zero or below merges nothing. A script uses this to restore a mesh that an earlier tolerance merged.
  • Only the last tolerance command read before a write governs that write. Earlier ones, of any of the four commands, have no effect on it.
  • After a merge the node numbers are dense: the survivors are numbered 1 upward in the order of their old numbers, and the numbers of merged nodes leave no gaps.
  • A node that no element uses never merges, whether James writes it or not.
  • A merge that leaves an element with zero volume does not drop the element. James writes it and warns, part #P has N elements with zero volume after merging, once for each part. The number after part # counts parts from 0, so part #0 is the first part. A wedge, which is a hexahedron with a collapsed edge, keeps its volume and raises nothing.
  • The command prints no report. tp and stp print one.

Diagnostics

  • E1103: the tolerance is missing or is not a number.

Example

The script tests/golden/007-merge-gap-inside/input.tg, which make test runs:

c Two unit cubes standing 0.001 apart, under a tolerance one part in a
c thousand above the gap: the four pairs merge, and each survivor keeps its
c own position, x = 1.
block 1 2;1 2;1 2;0 1;0 1;0 1;
endpart
block 1 2;1 2;1 2;1.001 2.001;0 1;0 1;
endpart
merge
t .001001
neutral
write

The two cubes stand 0.001 apart, and the tolerance 0.001001 is above that gap. The four pairs of nodes on the facing sides merge, and each survivor keeps its own position, x = 1. The neutral file holds 12 nodes and 2 elements. Golden case 008-merge-gap-outside has a tolerance just below the gap, and nothing merges there: 16 nodes.

See also

  • tp: the same merge, with a report.
  • st: the same merge, for surface nodes only.
  • merge: enters the Merge phase.
  • write: runs the merge.
  • Merge and output: how nodes are merged and numbered.

James 0.3.1.

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