diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C index 519e5f9ef5..5d49a1bbeb 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C @@ -127,7 +127,7 @@ Foam::labelListList Foam::GAMGProcAgglomeration::globalCellCells const lduAddressing& addr = mesh.lduAddr(); lduInterfacePtrsList interfaces = mesh.interfaces(); - const label myProcID = UPstream::myProcNo(mesh.comm()); + const label myProci = UPstream::myProcNo(mesh.comm()); const globalIndex globalNumbering ( @@ -138,11 +138,7 @@ Foam::labelListList Foam::GAMGProcAgglomeration::globalCellCells const labelList globalIndices ( - identity - ( - globalNumbering.localSize(myProcID), - globalNumbering.localStart(myProcID) - ) + Foam::identity(globalNumbering.range(myProci)) ); // Get the interface cells diff --git a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C index 935c20d370..e847072e24 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C +++ b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C @@ -105,12 +105,14 @@ Foam::labelListList Foam::lduPrimitiveMesh::globalCellCells const lduAddressing& addr = mesh.lduAddr(); lduInterfacePtrsList interfaces = mesh.interfaces(); + const label myProci = UPstream::myProcNo(mesh.comm()); + const labelList globalIndices ( - identity + Foam::identity ( addr.size(), - globalNumbering.localStart(UPstream::myProcNo(mesh.comm())) + globalNumbering.localStart(myProci) ) ); diff --git a/src/fileFormats/vtk/write/foamVtkPolyWriter.C b/src/fileFormats/vtk/write/foamVtkPolyWriter.C index ae303a4278..006bf0232c 100644 --- a/src/fileFormats/vtk/write/foamVtkPolyWriter.C +++ b/src/fileFormats/vtk/write/foamVtkPolyWriter.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2021 OpenCFD Ltd. + Copyright (C) 2018-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -320,7 +320,7 @@ void Foam::vtk::polyWriter::writeLines // processor-local connectivity offsets label off = ( - parallel_ ? globalIndex(nLocalConns).localStart() : 0 + parallel_ ? globalIndex::calcOffset(nLocalConns) : 0 ); @@ -521,7 +521,7 @@ void Foam::vtk::polyWriter::writePolys // processor-local connectivity offsets label off = ( - parallel_ ? globalIndex(nLocalConns).localStart() : 0 + parallel_ ? globalIndex::calcOffset(nLocalConns) : 0 ); @@ -632,7 +632,7 @@ bool Foam::vtk::polyWriter::writeLineGeometry const label pointOffset = ( - parallel_ ? globalIndex(nLocalPoints_).localStart() : 0 + parallel_ ? globalIndex::calcOffset(nLocalPoints_) : 0 ); if (legacy()) @@ -662,7 +662,7 @@ bool Foam::vtk::polyWriter::writePolyGeometry const label pointOffset = ( - parallel_ ? globalIndex(nLocalPoints_).localStart() : 0 + parallel_ ? globalIndex::calcOffset(nLocalPoints_) : 0 ); if (legacy()) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C index 4993effd61..5ee1a9e6ff 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C @@ -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. @@ -106,7 +106,9 @@ void Foam::CellZoneInjection::setPositions } // Parallel operation manipulations + const label myProci = UPstream::myProcNo(); globalIndex globalPositions(positions.size()); + List allPositions(globalPositions.totalSize(), point::max); List