le tetrahedron is easy.  Every pair
      of nodes generates a new node whose location is the average of
      the locations of the original two nodes.  The problem is that
      many tetrahedrons may share the same edge.  The new node needs
      to be generated exactly once, and assigned a unique index, which
      all the tetrahedrons will share.  The tricky part of this calculation
      is thus figuring out whether it is time to generate a new node, or
      whether the node has already been generated,