From 7b38b148fa09ac9ae36e10adc53f43dfc2c7cf07 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Fri, 26 Apr 2024 10:17:43 +0200
Subject: [PATCH] STYLE: use PstreamBuffers default construct

- PstreamBuffers are nonBlocking by default, so no need to re-specify
---
 .../test/parallel-nonBlocking/Test-parallel-nonBlocking.C  | 4 ++--
 .../conformalVoronoiMesh/conformalVoronoiMeshIO.C          | 2 +-
 .../redistributePar/parLagrangianDistributor.C             | 2 +-
 .../db/IOobjects/decomposedBlockData/decomposedBlockData.C | 4 ++--
 src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.C        | 2 +-
 src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H        | 6 +++---
 .../masterUncollatedFileOperation.C                        | 6 +++---
 .../lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C   | 7 +------
 src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C             | 7 +------
 .../mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C | 4 ++--
 .../meshes/polyMesh/syncTools/syncToolsTemplates.C         | 6 +++---
 src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C   | 4 ++--
 src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C        | 2 +-
 .../polyTopoChange/hexRef8/refinementHistory.C             | 2 +-
 .../turbulentDFSEMInletFvPatchVectorField.C                | 2 +-
 src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C        | 2 +-
 .../field/DMD/DMDModels/derived/STDMD/STDMD.C              | 2 +-
 .../field/externalCoupled/externalCoupled.C                | 4 ++--
 .../randomProcesses/energySpectrum/energySpectrum.C        | 2 +-
 src/functionObjects/utilities/syncObjects/syncObjects.C    | 6 +-----
 src/lagrangian/basic/Cloud/Cloud.C                         | 2 +-
 src/lagrangian/basic/InteractionLists/InteractionLists.H   | 5 ++---
 .../Kinematic/CollisionModel/PairCollision/PairCollision.C | 2 +-
 .../RecycleInteraction/RecycleInteraction.C                | 2 +-
 .../molecule/moleculeCloud/moleculeCloud.C                 | 4 ++--
 .../advancingFrontAMI/advancingFrontAMIParallelOps.C       | 7 +------
 src/meshTools/polyTopoChange/polyTopoChange.C              | 2 +-
 src/meshTools/processorLOD/box/box.C                       | 4 ++--
 .../inverseDistance/inverseDistanceCellCellStencil.C       | 2 +-
 .../trackingInverseDistanceCellCellStencil.C               | 2 +-
 .../distributedTriSurfaceMesh/distributedTriSurfaceMesh.C  | 2 +-
 .../reconstruct/faReconstruct/faMeshReconstructor.C        | 2 +-
 src/sampling/meshToMesh/meshToMeshParallelOps.C            | 2 +-
 .../advectionSchemes/isoAdvection/isoAdvection.C           | 2 +-
 34 files changed, 48 insertions(+), 68 deletions(-)

diff --git a/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C b/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C
index ce00f4d8cbe..e5ec8bd2b6c 100644
--- a/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C
+++ b/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
             Pstream::myProcNo()
         );
 
-        PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs;
 
         if (!Pstream::master())
         {
@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
 
     // Do a non-blocking send inbetween
     {
-        PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs;
 
         for (const int proci : Pstream::allProcs())
         {
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C
index ccc5b21fe99..1b6dbddb930 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C
@@ -618,7 +618,7 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches
     labelList rotation(faces.size(), Zero);
     labelList faceMap(faces.size(), label(-1));
 
-    PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     // Send ordering
     forAll(sortMesh.boundaryMesh(), patchi)
diff --git a/applications/utilities/parallelProcessing/redistributePar/parLagrangianDistributor.C b/applications/utilities/parallelProcessing/redistributePar/parLagrangianDistributor.C
index de9968fbfb0..97c5b0cc5c9 100644
--- a/applications/utilities/parallelProcessing/redistributePar/parLagrangianDistributor.C
+++ b/applications/utilities/parallelProcessing/redistributePar/parLagrangianDistributor.C
@@ -184,7 +184,7 @@ Foam::parLagrangianDistributor::distributeLagrangianPositions
     labelListList sendMap;
 
     // Transfer buffers
-    PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     {
         // List of lists of particles to be transferred for all of the
diff --git a/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C b/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C
index 4139ecca421..8542952455c 100644
--- a/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C
+++ b/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C
@@ -545,7 +545,7 @@ bool Foam::decomposedBlockData::readBlocks
     }
     else
     {
-        PstreamBuffers pBufs(comm, UPstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs(comm);
 
         if (UPstream::master(comm))
         {
@@ -667,7 +667,7 @@ Foam::autoPtr<Foam::ISstream> Foam::decomposedBlockData::readBlocks
     }
     else
     {
-        PstreamBuffers pBufs(comm, UPstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs(comm);
 
         if (UPstream::master(comm))
         {
diff --git a/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.C b/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.C
index cc80139f0e6..efdb2486555 100644
--- a/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.C
+++ b/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.C
@@ -115,7 +115,7 @@ void Foam::masterOFstream::commit()
         }
 
         // Different files
-        PstreamBuffers pBufs(comm_, UPstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs(comm_);
 
         if (!UPstream::master(comm_))
         {
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H
index cb4cf58e3af..ed40029c932 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H
@@ -38,7 +38,7 @@ Description
 
     Example usage:
     \code
-        PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs;
 
         for (const int proci : UPstream::allProcs())
         {
@@ -68,7 +68,7 @@ Description
     one-to-all and all-to-one communication patterns.
     For example,
     \code
-        PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs;
 
         if (UPstream::master())
         {
@@ -96,7 +96,7 @@ Description
 
     For example,
     \code
-        PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs;
 
         pBufs.initRegisterSend();
 
diff --git a/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C b/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C
index 5299af8ab4b..20c9511aa0d 100644
--- a/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C
+++ b/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C
@@ -452,7 +452,7 @@ Foam::fileOperations::masterUncollatedFileOperation::read
 {
     autoPtr<ISstream> isPtr;
 
-    PstreamBuffers pBufs(comm, UPstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs(comm);
 
     if (UPstream::master(comm))
     {
@@ -1834,7 +1834,7 @@ bool Foam::fileOperations::masterUncollatedFileOperation::readHeader
         }
 
         // Is a more efficient scatter possible?
-        PstreamBuffers pBufs(comm_, UPstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs(comm_);
 
         if (Pstream::master(comm_))
         {
@@ -2396,7 +2396,7 @@ Foam::fileOperations::masterUncollatedFileOperation::NewIFstream
         filePaths[Pstream::myProcNo(comm_)] = filePath;
         Pstream::gatherList(filePaths, Pstream::msgType(), comm_);
 
-        PstreamBuffers pBufs(comm_, Pstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs(comm_);
 
         if (Pstream::master(comm_))
         {
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C
index a3fe33a999d..7225bdcaaa8 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C
@@ -311,12 +311,7 @@ void Foam::GAMGSolver::gatherMatrices
     const auto& boundaryMap = agglomeration_.boundaryMap(destLevel);
 
     // Use PstreamBuffers
-    PstreamBuffers pBufs
-    (
-        UPstream::commsTypes::nonBlocking,
-        UPstream::msgType(),
-        comm
-    );
+    PstreamBuffers pBufs(comm);
 
     // Send to master
     if (!UPstream::master(comm))
diff --git a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C
index e847072e24e..40a5975794e 100644
--- a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C
+++ b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C
@@ -1344,12 +1344,7 @@ void Foam::lduPrimitiveMesh::gather
     (void)mesh.lduAddr().patchSchedule();
 
     // Use PstreamBuffers
-    PstreamBuffers pBufs
-    (
-        Pstream::commsTypes::nonBlocking,
-        UPstream::msgType(),
-        comm
-    );
+    PstreamBuffers pBufs(comm);
 
     // Send to master
     if (!Pstream::master(comm))
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C
index 68b9662a778..ce75d448405 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C
@@ -681,7 +681,7 @@ void Foam::mapDistributeBase::distribute
 
         if (!is_contiguous<T>::value)
         {
-            PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking, tag, comm);
+            PstreamBuffers pBufs(comm, tag);
 
             // Stream data into buffer
             for (const int proci : UPstream::allProcs(comm))
@@ -1121,7 +1121,7 @@ void Foam::mapDistributeBase::distribute
 
         if (!is_contiguous<T>::value)
         {
-            PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking, tag, comm);
+            PstreamBuffers pBufs(comm, tag);
 
             // Stream data into buffer
             for (const int proci : UPstream::allProcs(comm))
diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C
index 21b4030d227..b2378186597 100644
--- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C
+++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C
@@ -132,7 +132,7 @@ void Foam::syncTools::syncPointMap
         // Presize according to number of processor patches
         // (global topology information may not yet be available...)
         DynamicList<label> neighbProcs(patches.nProcessorPatches());
-        PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs;
 
         // Reduce communication by only sending non-zero data,
         // but with multiply-connected processor/processor
@@ -396,7 +396,7 @@ void Foam::syncTools::syncEdgeMap
         // Presize according to number of processor patches
         // (global topology information may not yet be available...)
         DynamicList<label> neighbProcs(patches.nProcessorPatches());
-        PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs;
 
         // Reduce communication by only sending non-zero data,
         // but with multiply-connected processor/processor
@@ -1142,7 +1142,7 @@ void Foam::syncTools::syncBoundaryFaceList
         else
         {
             DynamicList<label> neighbProcs;
-            PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking);
+            PstreamBuffers pBufs;
 
             // Send
             for (const polyPatch& pp : patches)
diff --git a/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C b/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C
index 9de90ba469e..4519893055d 100644
--- a/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C
+++ b/src/OpenFOAM/parallel/globalIndex/globalIndexTemplates.C
@@ -1092,7 +1092,7 @@ void Foam::globalIndex::get
         );
 
         // Send local indices to individual processors as local index
-        PstreamBuffers sendBufs(UPstream::commsTypes::nonBlocking, tag, comm);
+        PstreamBuffers sendBufs(comm, tag);
 
         for (const auto proci : validBins)
         {
@@ -1109,7 +1109,7 @@ void Foam::globalIndex::get
         sendBufs.finishedSends();
 
 
-        PstreamBuffers returnBufs(UPstream::commsTypes::nonBlocking, tag, comm);
+        PstreamBuffers returnBufs(comm, tag);
 
         for (const int proci : sendBufs.allProcs())
         {
diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C
index a3b18318a15..b843e387670 100644
--- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C
+++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C
@@ -2153,7 +2153,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
     UPstream::allToAll(nSendCells, nRecvCells);
 
     // Allocate buffers
-    PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
 
     // What to send to neighbouring domains
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C
index 7919d228e18..c842c2a6960 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C
@@ -1272,7 +1272,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
     // Create subsetted refinement tree consisting of all parents that
     // move in their whole to other processor.
 
-    PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     for (const int proci : Pstream::allProcs())
     {
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C
index c66b6424755..f7e7ac5a0b7 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C
@@ -537,7 +537,7 @@ void Foam::turbulentDFSEMInletFvPatchVectorField::calcOverlappingProcEddies
     }
 
 
-    PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     forAll(sendMap, proci)
     {
diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C
index 54a837d7ebf..2f10400289b 100644
--- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C
+++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C
@@ -174,7 +174,7 @@ void Foam::fvMeshSubset::doCoupledPatches
 
     if (syncPar && UPstream::parRun())
     {
-        PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs;
 
         // Send face usage across processor patches
         if (!nCellsUsingFace.empty())
diff --git a/src/functionObjects/field/DMD/DMDModels/derived/STDMD/STDMD.C b/src/functionObjects/field/DMD/DMDModels/derived/STDMD/STDMD.C
index 3678b341e58..5f503d8646f 100644
--- a/src/functionObjects/field/DMD/DMDModels/derived/STDMD/STDMD.C
+++ b/src/functionObjects/field/DMD/DMDModels/derived/STDMD/STDMD.C
@@ -227,7 +227,7 @@ reducedKoopmanOperator()
         // the final outcome of TSQR decomposition up to sign
 
         // Don't clear storage on persistent buffer
-        PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs;
         pBufs.allowClearRecv(false);
 
         const label myProcNo = Pstream::myProcNo();
diff --git a/src/functionObjects/field/externalCoupled/externalCoupled.C b/src/functionObjects/field/externalCoupled/externalCoupled.C
index 5b69105194e..2602860e126 100644
--- a/src/functionObjects/field/externalCoupled/externalCoupled.C
+++ b/src/functionObjects/field/externalCoupled/externalCoupled.C
@@ -111,7 +111,7 @@ void Foam::functionObjects::externalCoupled::readColumns
     // Get sizes for all processors
     const globalIndex globalFaces(globalIndex::gatherOnly{}, nRows);
 
-    PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     if (UPstream::master())
     {
@@ -182,7 +182,7 @@ void Foam::functionObjects::externalCoupled::readLines
     // Get sizes for all processors
     const globalIndex globalFaces(globalIndex::gatherOnly{}, nRows);
 
-    PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     if (UPstream::master())
     {
diff --git a/src/functionObjects/randomProcesses/energySpectrum/energySpectrum.C b/src/functionObjects/randomProcesses/energySpectrum/energySpectrum.C
index 0a8a159b287..f36b4d27678 100644
--- a/src/functionObjects/randomProcesses/energySpectrum/energySpectrum.C
+++ b/src/functionObjects/randomProcesses/energySpectrum/energySpectrum.C
@@ -215,7 +215,7 @@ bool Foam::functionObjects::energySpectrum::write()
 
     if (Pstream::parRun())
     {
-        PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs;
 
         {
             UOPstream toMaster(Pstream::masterNo(), pBufs);
diff --git a/src/functionObjects/utilities/syncObjects/syncObjects.C b/src/functionObjects/utilities/syncObjects/syncObjects.C
index cd5b2c2a642..d0735699ddb 100644
--- a/src/functionObjects/utilities/syncObjects/syncObjects.C
+++ b/src/functionObjects/utilities/syncObjects/syncObjects.C
@@ -87,11 +87,7 @@ void Foam::functionObjects::syncObjects::sync()
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     // Note provision of explicit all-world communicator
-    PstreamBuffers pBufs
-    (
-        UPstream::commGlobal(),
-        UPstream::commsTypes::nonBlocking
-    );
+    PstreamBuffers pBufs(UPstream::commGlobal());
 
 
     for (const int proci : pBufs.allProcs())
diff --git a/src/lagrangian/basic/Cloud/Cloud.C b/src/lagrangian/basic/Cloud/Cloud.C
index eb15d60699e..2580c082d01 100644
--- a/src/lagrangian/basic/Cloud/Cloud.C
+++ b/src/lagrangian/basic/Cloud/Cloud.C
@@ -182,7 +182,7 @@ void Foam::Cloud<ParticleType>::move
 
     // Allocate transfer buffers,
     // automatic clearStorage when UIPstream closes is disabled.
-    PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
     pBufs.allowClearRecv(false);
 
     // Cache of opened UOPstream wrappers
diff --git a/src/lagrangian/basic/InteractionLists/InteractionLists.H b/src/lagrangian/basic/InteractionLists/InteractionLists.H
index b71f222d36e..a575b9d5b3c 100644
--- a/src/lagrangian/basic/InteractionLists/InteractionLists.H
+++ b/src/lagrangian/basic/InteractionLists/InteractionLists.H
@@ -39,7 +39,7 @@ Description
     Simultaneous communication and computation is possible using:
 
     \verbatim
-    PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
     label startOfRequests = Pstream::nRequests();
     il_.sendReferredData(cellOccupancy_, pBufs);
     // Do other things
@@ -231,8 +231,7 @@ public:
 
     // Member Functions
 
-        //- Prepare and send referred particles and wall data,
-        //  nonBlocking communication
+        //- Prepare and send referred particles and wall data (nonBlocking)
         void sendReferredData
         (
             const List<DynamicList<ParticleType*>>& cellOccupancy,
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C
index e66c5a73a35..2dbed1a87b9 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C
@@ -58,7 +58,7 @@ void Foam::PairCollision<CloudType>::preInteraction()
 template<class CloudType>
 void Foam::PairCollision<CloudType>::parcelInteraction()
 {
-    PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     label startOfRequests = Pstream::nRequests();
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/RecycleInteraction/RecycleInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/RecycleInteraction/RecycleInteraction.C
index 18d415733f2..78501a00a22 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/RecycleInteraction/RecycleInteraction.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/RecycleInteraction/RecycleInteraction.C
@@ -208,7 +208,7 @@ void Foam::RecycleInteraction<CloudType>::postEvolve()
         // See comments in Cloud::move() about transfer particles handling
 
         // Allocate transfer buffers
-        PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs;
 
         // Cache of opened UOPstream wrappers
         PtrList<UOPstream> UOPstreamPtrs(Pstream::nProcs());
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C
index 9052b14a65f..3c8670824a0 100644
--- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C
+++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C
@@ -131,7 +131,7 @@ void Foam::moleculeCloud::buildCellOccupancy()
 
 void Foam::moleculeCloud::calculatePairForce()
 {
-    PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     // Start sending referred data
     label startOfRequests = Pstream::nRequests();
@@ -356,7 +356,7 @@ void Foam::moleculeCloud::removeHighEnergyOverlaps()
 
     buildCellOccupancy();
 
-    PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     // Start sending referred data
     label startOfRequests = Pstream::nRequests();
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMIParallelOps.C b/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMIParallelOps.C
index 2df540432b2..7bfa4688d6b 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMIParallelOps.C
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMIParallelOps.C
@@ -78,12 +78,7 @@ void Foam::advancingFrontAMI::distributePatches
     points.setSize(Pstream::nProcs(comm_));
     faceIDs.setSize(Pstream::nProcs(comm_));
 
-    PstreamBuffers pBufs
-    (
-        Pstream::commsTypes::nonBlocking,
-        UPstream::msgType(),
-        comm_
-    );
+    PstreamBuffers pBufs(comm_);
 
     for (const int domain : Pstream::allProcs(comm_))
     {
diff --git a/src/meshTools/polyTopoChange/polyTopoChange.C b/src/meshTools/polyTopoChange/polyTopoChange.C
index 88b6e0359ef..149da72b5fe 100644
--- a/src/meshTools/polyTopoChange/polyTopoChange.C
+++ b/src/meshTools/polyTopoChange/polyTopoChange.C
@@ -2026,7 +2026,7 @@ void Foam::polyTopoChange::reorderCoupledFaces
     // Rotation on new faces.
     labelList rotation(faces_.size(), Zero);
 
-    PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     // Send ordering
     forAll(patchMap, patchi)
diff --git a/src/meshTools/processorLOD/box/box.C b/src/meshTools/processorLOD/box/box.C
index dd6deffc320..26faa28e680 100644
--- a/src/meshTools/processorLOD/box/box.C
+++ b/src/meshTools/processorLOD/box/box.C
@@ -102,7 +102,7 @@ void Foam::processorLODs::box::setRefineFlags
     labelList& nElems
 ) const
 {
-    PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     // Identify src boxes that can be refined and send to all remote procs
     for (const int proci : Pstream::allProcs())
@@ -315,7 +315,7 @@ bool Foam::processorLODs::box::doRefineBoxes
     List<DynamicList<treeBoundBox>>& fixedBoxes
 )
 {
-    PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     // Send refine info back for list of evolving src boxes
     forAll(refineFlags, proci)
diff --git a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C
index b0e999c0f88..f606f5bdd44 100644
--- a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C
+++ b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C
@@ -1970,7 +1970,7 @@ bool Foam::cellCellStencils::inverseDistance::update()
 
     const globalIndex globalCells(mesh_.nCells());
 
-    PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     // Mark holes (in allCellTypes)
     for (label srcI = 0; srcI < meshParts.size()-1; srcI++)
diff --git a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C
index 5aa94150350..73d421c58f5 100644
--- a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C
+++ b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C
@@ -765,7 +765,7 @@ bool Foam::cellCellStencils::trackingInverseDistance::update()
 
     const globalIndex globalCells(mesh_.nCells());
 
-    PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     DebugInfo<< FUNCTION_NAME << " : Allocated donor-cell structures" << endl;
 
diff --git a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C
index 647b5ce1126..8c32aface9d 100644
--- a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C
+++ b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C
@@ -4784,7 +4784,7 @@ void Foam::distributedTriSurfaceMesh::distribute
     // Send all
     // ~~~~~~~~
 
-    PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     forAll(faceSendMap, proci)
     {
diff --git a/src/parallel/reconstruct/faReconstruct/faMeshReconstructor.C b/src/parallel/reconstruct/faReconstruct/faMeshReconstructor.C
index 722a63e2ba5..71b7584fb4e 100644
--- a/src/parallel/reconstruct/faReconstruct/faMeshReconstructor.C
+++ b/src/parallel/reconstruct/faReconstruct/faMeshReconstructor.C
@@ -110,7 +110,7 @@ void Foam::faMeshReconstructor::calcAddressing
             }
         }
 
-        PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs;
 
         if (Pstream::master())
         {
diff --git a/src/sampling/meshToMesh/meshToMeshParallelOps.C b/src/sampling/meshToMesh/meshToMeshParallelOps.C
index f1a9d756b0c..308409db988 100644
--- a/src/sampling/meshToMesh/meshToMeshParallelOps.C
+++ b/src/sampling/meshToMesh/meshToMeshParallelOps.C
@@ -274,7 +274,7 @@ void Foam::meshToMesh::distributeCells
     procLocalFaceIDs.setSize(Pstream::nProcs());;
 
 
-    PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
+    PstreamBuffers pBufs;
 
     for (const int domain : Pstream::allProcs())
     {
diff --git a/src/transportModels/geometricVoF/advectionSchemes/isoAdvection/isoAdvection.C b/src/transportModels/geometricVoF/advectionSchemes/isoAdvection/isoAdvection.C
index 1b54ff2ca1a..a2296c3c6bf 100644
--- a/src/transportModels/geometricVoF/advectionSchemes/isoAdvection/isoAdvection.C
+++ b/src/transportModels/geometricVoF/advectionSchemes/isoAdvection/isoAdvection.C
@@ -497,7 +497,7 @@ Foam::DynamicList<Foam::label>  Foam::isoAdvection::syncProcPatches
     if (Pstream::parRun())
     {
         DynamicList<label> neighProcs;
-        PstreamBuffers pBufs(UPstream::commsTypes::nonBlocking);
+        PstreamBuffers pBufs;
 
         // Send
         for (const label patchi : procPatchLabels_)
-- 
GitLab