mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add partial sorting to SortableList
This commit is contained in:
committed by
Andrew Heather
parent
3a1a353483
commit
bf30779b64
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user