Implementation of PSRS parallel sorting routine. More...
#include <OpenFOAM/ParSortableList.H>
Implementation of PSRS parallel sorting routine.
From "On the Versatility of Parallel Sorting by Regular Sampling" Xiaobo Li et. all.
Construct from list of things to sort (uses SortableList, 'thing' should implement >, ==).
Will contain sorted data and in
Can also be constructed from size, filled at ease and then sort()'ed.
Definition at line 70 of file ParSortableList.H.
Classes | |
class | taggedValue |
Private class for sorting. Sorts on value_.
| |
Public Member Functions | |
ParSortableList (const UList< Type > &) | |
Construct from List, sorting the elements.
| |
ParSortableList (const label size) | |
Construct given size. Sort later on.
| |
void | sort () |
(stable) sort the list (if changed after construction time)
| |
const labelList & | indices () const |
Return the list of sorted point indices.
| |
const labelList & | procs () const |
Return the list of processor number.
|
ParSortableList | ( | const UList< Type > & | values ) |
Construct from List, sorting the elements.
Definition at line 127 of file ParSortableList.C.
References ParSortableList< Type >::sort().
ParSortableList | ( | const label | size ) |
Construct given size. Sort later on.
Definition at line 139 of file ParSortableList.C.
void sort | ( | ) |
(stable) sort the list (if changed after construction time)
Definition at line 151 of file ParSortableList.C.
References PstreamBase::blocking, Foam::endl(), forAll, Pstream::gatherList(), SortableList< T >::indices(), Pstream::master(), Pstream::myProcNo(), Pstream::nProcs(), Foam::Pout, Foam::reduce(), Pstream::scatter(), setSize(), List< T >::setSize(), List< T >::size(), and Foam::sort().
Referenced by ParSortableList< Type >::ParSortableList().
const labelList& indices | ( | ) | const [inline]
|
Return the list of sorted point indices.
Definition at line 187 of file ParSortableList.H.
const labelList& procs | ( | ) | const [inline]
|
Return the list of processor number.
Definition at line 193 of file ParSortableList.H.