COMP: use csorted() instead of sorted()

This commit is contained in:
Mark Olesen
2023-07-17 16:04:40 +02:00
parent 129b738136
commit 5397c9ac04
16 changed files with 65 additions and 66 deletions

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2018 OpenFOAM Foundation
Copyright (C) 2017-2022 OpenCFD Ltd.
Copyright (C) 2017-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -158,7 +158,7 @@ void printSets(Ostream& os, const IOobjectList& objects)
{
label n = 0;
for (const IOobject& io : objects.sorted<SetType>())
for (const IOobject& io : objects.csorted<SetType>())
{
SetType set(io);
if (!n++) os << SetType::typeName << "s:" << nl;

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2021-2022 OpenCFD Ltd.
Copyright (C) 2021-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -105,7 +105,7 @@ int main(int argc, char *argv[])
<< endl;
for (const IOobject& io : objects.sorted<pointSet>())
for (const IOobject& io : objects.csorted<pointSet>())
{
// Not in memory. Load it.
pointSet set(io);
@ -137,7 +137,7 @@ int main(int argc, char *argv[])
wordHashSet slaveCellSets;
for (const IOobject& io : objects.sorted<faceSet>())
for (const IOobject& io : objects.csorted<faceSet>())
{
// Not in memory. Load it.
faceSet set(io);
@ -259,7 +259,7 @@ int main(int argc, char *argv[])
for (const IOobject& io : objects.sorted<cellSet>())
for (const IOobject& io : objects.csorted<cellSet>())
{
if (!slaveCellSets.found(io.name()))
{

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2015-2022 OpenCFD Ltd.
Copyright (C) 2015-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -653,7 +653,7 @@ int main(int argc, char *argv[])
const labelList& cellMap =
procMeshes.cellProcAddressing()[proci];
for (const IOobject& io : objects.sorted<cellSet>())
for (const IOobject& io : objects.csorted<cellSet>())
{
// Load cellSet
const cellSet procSet(io);
@ -684,7 +684,7 @@ int main(int argc, char *argv[])
const labelList& faceMap =
procMeshes.faceProcAddressing()[proci];
for (const IOobject& io : objects.sorted<faceSet>())
for (const IOobject& io : objects.csorted<faceSet>())
{
// Load faceSet
const faceSet procSet(io);
@ -714,7 +714,7 @@ int main(int argc, char *argv[])
const labelList& pointMap =
procMeshes.pointProcAddressing()[proci];
for (const IOobject& io : objects.sorted<pointSet>())
for (const IOobject& io : objects.csorted<pointSet>())
{
// Load pointSet
const pointSet procSet(io);

View File

@ -185,11 +185,11 @@ Foam::label Foam::parPointFieldDistributor::distributePointFields
{
typedef GeometricField<Type, pointPatchField, pointMesh> fieldType;
UPtrList<const IOobject> fieldObjects
const UPtrList<const IOobject> fieldObjects
(
selectedFields.empty()
? objects.sorted<fieldType>()
: objects.sorted<fieldType>(selectedFields)
? objects.csorted<fieldType>()
: objects.csorted<fieldType>(selectedFields)
);
label nFields = 0;