Doxygen Generated Documentation From Interface Source Code
ut_sortOnProcs.F90 File Reference

Go to the source code of this file.


subroutine ut_sortOnProcs (count, props, attrib, numProcs, storage, workspace, perProc, ifNonZeroProc, nonZeroProcsCount)

Function/Subroutine Documentation

◆ ut_sortOnProcs()

subroutine ut_sortOnProcs ( integer  count,
integer  props,
integer  attrib,
integer  numProcs,
real, dimension(props,count)  storage,
real, dimension(props,count)  workspace,
integer  perProc,
integer  ifNonZeroProc,
integer  nonZeroProcsCount 

Given a data structure that is a two dimensional array, where the first dimension represents properties of individual elements in the data structure, and the second dimension represents the count of the elements in the data structure, this routine finds the processor number associated with each element and sorts the elements by their processor number. It assumes that one of the properties in the first dimension contains the processor number, where that index is given by the argument "attrib". This subroutine also returns metadata about the sorted data structure. The array perProc contains the count of elements in associated with each processor. The array ifNonZeroProc acts as a logical array, it has a value 1 if there is at least one element associated with the corresponding processor and a value 0 otherwise. Finally nonZeroProcsCount contains the count of procs other than myPE that have a non zero number of elements associated with them.

count - The number of particles in the storage buffer props - count of attributes associated with particle data structure attrib - the index of the property that contains processor number information numProcs - number of processor under consideration storage - buffer containing the particles workspace - temporary storage for particles while processing perProc - an array of size equal to number of processors each entry is the count of particles destined for the corresponding processor ifNonZeroProc - same size array as perProc, here value is 1 if there are any particles to be sent to the corresponding processor, otherwise the value is zero nonZeroProcsCount - The count of the number of processors that will receive particles sent by myPE

Definition at line 51 of file ut_sortOnProcs.F90.