ENH: promote ListOps::identity to Foam::identity

- becoming more frequently used and there is no ambiguity in calling
  parameters either - identity(label) vs identity(labelUList&).

  Provide both int32 and int64 versions.
This commit is contained in:
Mark Olesen
2023-10-26 10:42:23 +02:00
parent ef92d31493
commit d9f0587416
20 changed files with 86 additions and 86 deletions

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020-2022 OpenCFD Ltd.
Copyright (C) 2020-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -161,16 +161,16 @@ Foam::label Foam::ensightCells::meshPointMapppings
// Non-parallel
nPoints = mesh.nPoints();
pointToGlobal.resize(nPoints);
pointToGlobal.resize_nocopy(nPoints);
if (allCells)
{
// All cells used, and thus all points
uniqueMeshPointLabels.resize(nPoints);
uniqueMeshPointLabels.resize_nocopy(nPoints);
ListOps::identity(pointToGlobal);
ListOps::identity(uniqueMeshPointLabels);
Foam::identity(pointToGlobal);
Foam::identity(uniqueMeshPointLabels);
}
else
{

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020-2022 OpenCFD Ltd.
Copyright (C) 2020-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -88,8 +88,8 @@ void Foam::ensightFaces::write
nPoints = pp.meshPoints().size();
uniqueMeshPointLabels = pp.meshPoints();
pointToGlobal.resize(nPoints);
ListOps::identity(pointToGlobal);
pointToGlobal.resize_nocopy(nPoints);
Foam::identity(pointToGlobal);
}
ensightOutput::Detail::writeCoordinates

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2016-2022 OpenCFD Ltd.
Copyright (C) 2016-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -858,7 +858,7 @@ void Foam::vtk::vtuSizing::populateArrays
// May have been done by caller,
// but for additional safety set an identity mapping
ListOps::identity(cellMap);
Foam::identity(cellMap);
// ===========================================
// Adjust vertOffset for all cells