public subroutine tem_comm_createBuffer(commBuffer, nScalars, nElems, elemRanks)
Routine to build communication buffer using elemRanks.
This routine can be used only if all elements need to be communicated
but they need process-wise seperation.
Uses nScalars to get position in the value array to communicate.
For send buffer: elemRanks contains target ranks to send data to
For recv buffer: elemRanks contains source ranks to recv data from
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.