ENH: add partial sorting to SortableList

This commit is contained in:
Mark Olesen
2019-04-24 19:03:00 +02:00
committed by Andrew Heather
parent 3a1a353483
commit bf30779b64
3 changed files with 56 additions and 6 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011 OpenFOAM Foundation
@ -67,6 +67,10 @@ int main(int argc, char *argv[])
Info<< "reverse ..." << nl;
printInfo(list1r);
list1r.partialSort(list1r.size()/2);
Info<< "partial sorted ..." << nl;
printInfo(list1r);
SortableList<label> list2(orig);
Info<< "unsorted: " << orig << nl;
printInfo(list2);