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-2017 OpenFOAM Foundation
Copyright (C) 2022 OpenCFD Ltd.
Copyright (C) 2022-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -40,9 +40,9 @@ void Foam::lagrangianFieldDecomposer::readFields
)
{
// List of lagrangian field objects
UPtrList<const IOobject> fieldObjects
const UPtrList<const IOobject> fieldObjects
(
lagrangianObjects.sorted<IOField<Type>>()
lagrangianObjects.csorted<IOField<Type>>()
);
auto& cloudFields =
@ -66,12 +66,12 @@ void Foam::lagrangianFieldDecomposer::readFieldFields
// List of lagrangian field objects
UPtrList<const IOobject> fieldObjects
(
lagrangianObjects.sorted<IOField<Field<Type>>>()
lagrangianObjects.cobjects<IOField<Field<Type>>>()
);
fieldObjects.push_back
(
lagrangianObjects.sorted<CompactIOField<Field<Type>, Type>>()
lagrangianObjects.cobjects<CompactIOField<Field<Type>, Type>>()
);
Foam::sort(fieldObjects, nameOp<IOobject>());

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2016-2017 Wikki Ltd
Copyright (C) 2018-2022 OpenCFD Ltd.
Copyright (C) 2018-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -697,8 +697,8 @@ Foam::label Foam::faFieldReconstructor::reconstructAreaFields
(
(
selectedFields.empty()
? objects.sorted<fieldType>()
: objects.sorted<fieldType>(selectedFields)
? objects.csorted<fieldType>()
: objects.csorted<fieldType>(selectedFields)
)
);
}
@ -717,8 +717,8 @@ Foam::label Foam::faFieldReconstructor::reconstructEdgeFields
(
(
selectedFields.empty()
? objects.sorted<fieldType>()
: objects.sorted<fieldType>(selectedFields)
? objects.csorted<fieldType>()
: objects.csorted<fieldType>(selectedFields)
)
);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2018-2022 OpenCFD Ltd.
Copyright (C) 2018-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -707,8 +707,8 @@ Foam::label Foam::fvFieldReconstructor::reconstructInternalFields
(
(
selectedFields.empty()
? objects.sorted<fieldType>()
: objects.sorted<fieldType>(selectedFields)
? objects.csorted<fieldType>()
: objects.csorted<fieldType>(selectedFields)
)
);
}
@ -727,8 +727,8 @@ Foam::label Foam::fvFieldReconstructor::reconstructVolumeFields
(
(
selectedFields.empty()
? objects.sorted<fieldType>()
: objects.sorted<fieldType>(selectedFields)
? objects.csorted<fieldType>()
: objects.csorted<fieldType>(selectedFields)
)
);
}
@ -747,8 +747,8 @@ Foam::label Foam::fvFieldReconstructor::reconstructSurfaceFields
(
(
selectedFields.empty()
? objects.sorted<fieldType>()
: objects.sorted<fieldType>(selectedFields)
? objects.csorted<fieldType>()
: objects.csorted<fieldType>(selectedFields)
)
);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2018 OpenCFD Ltd.
Copyright (C) 2018-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -199,8 +199,8 @@ Foam::label Foam::lagrangianReconstructor::reconstructFields
cloudName,
(
selectedFields.empty()
? objects.sorted<fieldType>()
: objects.sorted<fieldType>(selectedFields)
? objects.csorted<fieldType>()
: objects.csorted<fieldType>(selectedFields)
)
);
}
@ -221,13 +221,13 @@ Foam::label Foam::lagrangianReconstructor::reconstructFieldFields
if (selectedFields.empty())
{
fieldObjects.append(objects.sorted<fieldType>());
fieldObjects.append(objects.sorted<fieldTypeB>());
fieldObjects.push_back(objects.csorted<fieldType>());
fieldObjects.push_back(objects.csorted<fieldTypeB>());
}
else
{
fieldObjects.append(objects.sorted<fieldType>(selectedFields));
fieldObjects.append(objects.sorted<fieldTypeB>(selectedFields));
fieldObjects.push_back(objects.csorted<fieldType>(selectedFields));
fieldObjects.push_back(objects.csorted<fieldTypeB>(selectedFields));
}
Foam::sort(fieldObjects, nameOp<IOobject>());

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2018-2022 OpenCFD Ltd.
Copyright (C) 2018-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -212,8 +212,8 @@ Foam::label Foam::pointFieldReconstructor::reconstructPointFields
(
(
selectedFields.empty()
? objects.sorted<fieldType>()
: objects.sorted<fieldType>(selectedFields)
? objects.csorted<fieldType>()
: objects.csorted<fieldType>(selectedFields)
)
);
}