Jog is code to build a complex without an embedding space but with facility to tap and inject signals across internal facets. It can be used for complexes without a boundary. In this task types come first.
qnAcc = fray nAcc
a port that a zone uses to communicate with a specific neighbor.
tap = qnAcc -> qnAcc
a value the tapper provides to tap a half duplex interface.
tapl = (int list * (tap * tap)) list
a list of interfaces to tap each identified by a sorted list of global vertex numbers.
A tap is inserted between a sender and a recipient. A tap value is a function that is called once as the tap is established. The argument z of that call is the entry values (port) to the tapped recipient and the value returned from that call will be supplied to the tapped sender, in place of z. The pair of tap values are for messages across the same interface, but in opposite directions. Program note: Often the tapper wants to tap just one direction at a facet in which case the function (fun x -> x) may be placed in the opposite flow direction.

There are several values in the module source included to illustrate how to build taps. Functions nop1 and nop2 are equivalent and do nothing while peek reveals the geodesic parameter as it crosses the interface. Finally nudge slightly advances that parameter as a ray passes. It should be clear how to observe and intervene in returned values as well. It is also possible to terminate and duplicate messages.

val nz :
      (int -> int -> float) ->
      int list ->
      (int -> Zone.fray Zone.nAcc -> unit) * (int -> Zone.fray Zone.nAcc)
Routine nz takes an argument which is a function d of two global vertex numbers; d returns the distance2 between the vertices. nz returns a value suitable as the first arg of morphgen.

The current program that implements taps is the Glue module. Routine elim there has been be taught to insert taps according to a tapl tap list which is a new argument to morphgen.

The program is written assuming the tap list is short. Sorting the list and exploiting that in elim would overcome this limitation.

This routine may be useful in this sort of configuration.

A test case