func multisplit_create() {local ic, gid, spgid \
localobj nc, cb, cell, srout
gid = $1
ic = binfo.gids.indwhere("==", gid)
if (ic == -1) { return 0 }
cb = binfo.bilist.object(ic)
execute($s2)
cell = cells.object(cells.count - 1)
if (cb.subtrees.count == 0) { // whole cell
gidvec.append(gid)
pc.set_gid2node(gid, pc.id)
return 1
}
// inefficient, would like to defer but...
cell.connect2target(nil, nc)
// multisplit, get rid of all except proper piece
spgid = cb.multisplit(nc, binfo.sindices.x[ic], binfo.msgid)
pc.set_gid2node(spgid, pc.id)
gidvec.append(spgid)
return 1
}