From 96ad725a0b05830f3bd5c35e12816c79ceb1f72b Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 10 Mar 2017 19:54:55 +0000 Subject: [PATCH] Updated UPstream::commsTypes to use the C++11 enum class --- .../mixedFixedValueSlipFvPatchField.H | 5 +- applications/test/FixedList/Test-FixedList.C | 10 +- .../Test-parallel-communicators.C | 10 +- .../Test-parallel-nonBlocking.C | 8 +- applications/test/parallel/Test-parallel.C | 18 ++- applications/test/router/Gather/Gather.C | 18 ++- .../conformalVoronoiMeshIO.C | 4 +- .../mesh/manipulation/checkMesh/checkTools.C | 6 +- .../manipulation/createPatch/createPatch.C | 10 +- .../splitMeshRegions/splitMeshRegions.C | 10 +- .../redistributePar/loadOrCreateMesh.C | 10 +- .../redistributePar/redistributePar.C | 10 +- .../foamToEnsight/ensightField.C | 10 +- .../foamToEnsight/ensightMesh.C | 66 ++++++--- .../preProcessing/mapFieldsPar/MapVolFields.H | 14 +- .../Lists/SortableList/ParSortableList.C | 6 +- .../IOobjects/IOdictionary/IOdictionaryIO.C | 6 +- .../db/IOstreams/Pstreams/PstreamBuffers.C | 6 +- .../db/IOstreams/Pstreams/PstreamBuffers.H | 4 +- .../db/IOstreams/Pstreams/UOPstream.C | 4 +- src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H | 4 +- .../IOstreams/Pstreams/combineGatherScatter.C | 91 +++++++++--- src/OpenFOAM/db/IOstreams/Pstreams/exchange.C | 6 +- .../db/IOstreams/Pstreams/gatherScatter.C | 18 +-- .../db/IOstreams/Pstreams/gatherScatterList.C | 32 +++-- src/OpenFOAM/db/regIOobject/regIOobjectRead.C | 6 +- .../GeometricField/GeometricBoundaryField.C | 14 +- .../basicSymmetryPointPatchField.H | 5 +- .../basic/coupled/coupledPointPatchField.H | 5 +- .../basic/value/valuePointPatchField.H | 5 +- .../constraint/cyclic/cyclicPointPatchField.H | 5 +- .../cyclicSlip/cyclicSlipPointPatchField.H | 15 +- ...nonuniformTransformCyclicPointPatchField.H | 15 +- .../processor/processorPointPatchField.H | 7 +- .../processorCyclicPointPatchField.C | 6 +- .../processorCyclicPointPatchField.H | 5 +- .../symmetryPlanePointPatchField.H | 14 +- .../constraint/wedge/wedgePointPatchField.H | 26 ++-- .../codedFixedValuePointPatchField.H | 4 +- .../fixedNormalSlipPointPatchField.H | 15 +- .../pointPatchField/pointPatchField.H | 8 +- src/OpenFOAM/global/argList/argList.C | 20 ++- .../matrices/LUscalarMatrix/LUscalarMatrix.C | 6 +- .../LUscalarMatrix/LUscalarMatrixTemplates.C | 10 +- .../LduMatrixUpdateMatrixInterfaces.C | 24 ++-- .../processorLduInterfaceTemplates.C | 42 ++++-- .../lduMatrixUpdateMatrixInterfaces.C | 22 +-- .../GAMGAgglomerateLduAddressing.C | 12 +- .../GAMGAgglomerationTemplates.C | 10 +- .../GAMGProcAgglomeration.C | 6 +- .../GAMG/GAMGSolverAgglomerateMatrix.C | 6 +- .../processorGAMGInterfaceField.C | 18 ++- .../ProcessorTopology/ProcessorTopology.C | 8 +- .../meshes/lduMesh/lduPrimitiveMesh.C | 6 +- .../pointBoundaryMesh/pointBoundaryMesh.C | 20 +-- .../polyMesh/globalMeshData/globalIndex.H | 20 ++- .../globalMeshData/globalIndexTemplates.C | 26 +++- .../polyMesh/globalMeshData/globalMeshData.C | 39 ++++-- .../polyMesh/globalMeshData/globalPoints.C | 10 +- .../mapDistribute/mapDistributeBase.C | 24 ++-- .../mapDistribute/mapDistributeBase.H | 7 +- .../mapDistributeBaseTemplates.C | 132 ++++++++++++------ .../polyBoundaryMesh/polyBoundaryMesh.C | 20 +-- .../polyMesh/syncTools/syncToolsTemplates.C | 40 ++++-- .../PatchTools/PatchToolsGatherAndMerge.C | 6 +- src/Pstream/mpi/UIPread.C | 18 ++- src/Pstream/mpi/UOPwrite.C | 8 +- ...oupledTemperatureMixedFvPatchScalarField.H | 19 ++- .../kqRWallFunctionFvPatchField.H | 21 ++- .../fvMeshDistribute/fvMeshDistribute.C | 6 +- src/dynamicMesh/fvMeshSubset/fvMeshSubset.C | 4 +- .../motionSmoother/motionSmootherAlgo.C | 14 +- .../motionSmootherAlgoTemplates.C | 6 +- .../hexRef8/refinementHistory.C | 4 +- .../polyTopoChange/polyTopoChange.C | 4 +- .../basicSymmetry/basicSymmetryFvPatchField.H | 22 ++- .../directionMixedFvPatchField.H | 5 +- .../extrapolatedCalculatedFvPatchField.H | 14 +- .../fixedGradient/fixedGradientFvPatchField.H | 5 +- .../basic/mixed/mixedFvPatchField.H | 5 +- .../basic/sliced/slicedFvPatchField.H | 8 +- .../zeroGradient/zeroGradientFvPatchField.H | 5 +- .../constraint/cyclic/cyclicFvPatchField.C | 4 +- .../cyclicACMI/cyclicACMIFvPatchField.C | 4 +- .../cyclicAMI/cyclicAMIFvPatchField.C | 4 +- .../jumpCyclic/jumpCyclicFvPatchField.C | 4 +- .../jumpCyclicAMI/jumpCyclicAMIFvPatchField.C | 4 +- .../processor/processorFvPatchField.C | 50 +++++-- .../processor/processorFvPatchScalarField.C | 18 ++- .../processorCyclicFvPatchField.C | 4 +- .../symmetryPlane/symmetryPlaneFvPatchField.H | 22 ++- .../constraint/wedge/wedgeFvPatchField.H | 22 ++- .../codedFixedValueFvPatchField.H | 4 +- .../codedMixed/codedMixedFvPatchField.H | 4 +- .../externalCoupledMixedFvPatchField.H | 54 ++++--- .../derived/fan/fanFvPatchFields.C | 4 +- .../derived/fixedJump/fixedJumpFvPatchField.C | 4 +- .../fixedJumpAMI/fixedJumpAMIFvPatchField.C | 4 +- .../fixedNormalSlipFvPatchField.H | 5 +- .../flowRateInletVelocityFvPatchVectorField.C | 4 +- .../fluxCorrectedVelocityFvPatchVectorField.H | 15 +- .../partialSlip/partialSlipFvPatchField.H | 5 +- .../timeVaryingMappedFixedValueFvPatchField.C | 4 +- .../uniformJump/uniformJumpFvPatchField.C | 4 +- .../uniformJumpAMIFvPatchField.C | 4 +- .../fvPatchFields/fvPatchField/fvPatchField.H | 8 +- .../volPointInterpolate.C | 6 +- .../field/streamLine/streamLine.C | 6 +- .../wallBoundedStreamLine.C | 6 +- .../MGridGenGAMGAgglomeration.C | 6 +- ...aceSlipDisplacementPointPatchVectorField.H | 4 +- ...meVaryingMappedFixedValuePointPatchField.C | 4 +- src/lagrangian/basic/Cloud/Cloud.C | 4 +- .../basic/InteractionLists/InteractionLists.H | 4 +- .../PairCollision/PairCollision.C | 4 +- .../molecule/moleculeCloud/moleculeCloud.C | 6 +- .../meshRefinement/meshRefinement.C | 4 +- .../meshRefinement/meshRefinementTemplates.C | 6 +- .../AMIInterpolation/AMIInterpolation.C | 6 +- .../AMIInterpolationParallelOps.C | 4 +- .../cyclicACMIPointPatchField.H | 5 +- .../cyclicAMIPointPatchField.H | 5 +- .../algorithms/MeshWave/FaceCellWave.C | 4 +- .../algorithms/PointEdgeWave/PointEdgeWave.C | 4 +- .../simpleGeomDecomp/simpleGeomDecomp.C | 34 +++-- .../decompose/ptscotchDecomp/ptscotchDecomp.C | 14 +- .../decompose/scotchDecomp/scotchDecomp.C | 18 ++- .../distributedTriSurfaceMesh.C | 6 +- src/sampling/meshToMesh/meshToMesh.C | 6 +- .../meshToMesh/meshToMeshParallelOps.C | 4 +- .../sampledSurface/isoSurface/isoSurface.C | 14 +- .../energyJump/energyJumpFvPatchScalarField.C | 4 +- .../energyJumpAMIFvPatchScalarField.C | 4 +- .../alphaContactAngleFvPatchScalarField.H | 4 +- 134 files changed, 1012 insertions(+), 686 deletions(-) diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.H b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.H index 5ab7d3835f..be5014394d 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.H +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -184,7 +184,8 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType= + Pstream::commsTypes::blocking ); //- Return face-gradient transform diagonal diff --git a/applications/test/FixedList/Test-FixedList.C b/applications/test/FixedList/Test-FixedList.C index 0a2c56a229..ec496e1e03 100644 --- a/applications/test/FixedList/Test-FixedList.C +++ b/applications/test/FixedList/Test-FixedList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -92,7 +92,11 @@ int main(int argc, char *argv[]) Serr<< "slave sending to master " << Pstream::masterNo() << endl; - OPstream toMaster(Pstream::blocking, Pstream::masterNo()); + OPstream toMaster + ( + Pstream::commsTypes::blocking, + Pstream::masterNo() + ); FixedList list3; list3[0] = 0; @@ -109,7 +113,7 @@ int main(int argc, char *argv[]) ) { Serr << "master receiving from slave " << slave << endl; - IPstream fromSlave(Pstream::blocking, slave); + IPstream fromSlave(Pstream::commsTypes::blocking, slave); FixedList list3(fromSlave); Serr<< list3 << endl; diff --git a/applications/test/parallel-communicators/Test-parallel-communicators.C b/applications/test/parallel-communicators/Test-parallel-communicators.C index 5593e07eff..d3805c24fd 100644 --- a/applications/test/parallel-communicators/Test-parallel-communicators.C +++ b/applications/test/parallel-communicators/Test-parallel-communicators.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -65,7 +65,7 @@ scalar sumReduce scalar slaveValue; UIPstream::read ( - Pstream::blocking, + Pstream::commsTypes::blocking, slave, reinterpret_cast(&slaveValue), sizeof(scalar), @@ -87,7 +87,7 @@ scalar sumReduce { UOPstream::write ( - UPstream::blocking, + UPstream::commsTypes::blocking, slave, reinterpret_cast(&sum), sizeof(scalar), @@ -101,7 +101,7 @@ scalar sumReduce { UOPstream::write ( - UPstream::blocking, + UPstream::commsTypes::blocking, UPstream::masterNo(), reinterpret_cast(&localValue), sizeof(scalar), @@ -113,7 +113,7 @@ scalar sumReduce { UIPstream::read ( - UPstream::blocking, + UPstream::commsTypes::blocking, UPstream::masterNo(), reinterpret_cast(&sum), sizeof(scalar), diff --git a/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C b/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C index eb37bd07f5..0e55717483 100644 --- a/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C +++ b/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -65,7 +65,7 @@ int main(int argc, char *argv[]) Pstream::myProcNo() ); - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); if (Pstream::myProcNo() != Pstream::masterNo()) { @@ -100,7 +100,7 @@ int main(int argc, char *argv[]) // Send allData back - PstreamBuffers pBufs2(Pstream::nonBlocking); + PstreamBuffers pBufs2(Pstream::commsTypes::nonBlocking); if (Pstream::myProcNo() == Pstream::masterNo()) { for @@ -149,7 +149,7 @@ int main(int argc, char *argv[]) // Do a non-blocking send inbetween { - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); for (label proci = 0; proci < Pstream::nProcs(); proci++) { diff --git a/applications/test/parallel/Test-parallel.C b/applications/test/parallel/Test-parallel.C index a9fe2b6673..0766ffb5ab 100644 --- a/applications/test/parallel/Test-parallel.C +++ b/applications/test/parallel/Test-parallel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -147,13 +147,21 @@ int main(int argc, char *argv[]) { Perr<< "slave sending to master " << Pstream::masterNo() << endl; - OPstream toMaster(Pstream::blocking, Pstream::masterNo()); + OPstream toMaster + ( + Pstream::commsTypes::blocking, + Pstream::masterNo() + ); toMaster << data; } Perr<< "slave receiving from master " << Pstream::masterNo() << endl; - IPstream fromMaster(Pstream::blocking, Pstream::masterNo()); + IPstream fromMaster + ( + Pstream::commsTypes::blocking, + Pstream::masterNo() + ); fromMaster >> data; Perr<< data << endl; @@ -168,7 +176,7 @@ int main(int argc, char *argv[]) ) { Perr << "master receiving from slave " << slave << endl; - IPstream fromSlave(Pstream::blocking, slave); + IPstream fromSlave(Pstream::commsTypes::blocking, slave); fromSlave >> data; Perr<< data << endl; @@ -182,7 +190,7 @@ int main(int argc, char *argv[]) ) { Perr << "master sending to slave " << slave << endl; - OPstream toSlave(Pstream::blocking, slave); + OPstream toSlave(Pstream::commsTypes::blocking, slave); toSlave << data; } } diff --git a/applications/test/router/Gather/Gather.C b/applications/test/router/Gather/Gather.C index dd2035b626..24391f4e35 100644 --- a/applications/test/router/Gather/Gather.C +++ b/applications/test/router/Gather/Gather.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -63,7 +63,7 @@ Gather::Gather(const T0& localData, const bool redistribute) slave++, procIndex++ ) { - IPstream fromSlave(Pstream::scheduled, slave); + IPstream fromSlave(Pstream::commsTypes::scheduled, slave); fromSlave >> this->operator[](procIndex); } @@ -75,7 +75,7 @@ Gather::Gather(const T0& localData, const bool redistribute) slave++, procIndex++ ) { - OPstream toSlave(Pstream::scheduled, slave); + OPstream toSlave(Pstream::commsTypes::scheduled, slave); if (redistribute) { @@ -92,13 +92,21 @@ Gather::Gather(const T0& localData, const bool redistribute) { // Slave: send my local data to master { - OPstream toMaster(Pstream::scheduled, Pstream::masterNo()); + OPstream toMaster + ( + Pstream::commsTypes::scheduled, + Pstream::masterNo() + ); toMaster << localData; } // Receive data from master { - IPstream fromMaster(Pstream::scheduled, Pstream::masterNo()); + IPstream fromMaster + ( + Pstream::commsTypes::scheduled, + Pstream::masterNo() + ); if (redistribute) { fromMaster >> *this; diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index c61a0b1d59..3e6e60617e 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -641,7 +641,7 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches labelList rotation(faces.size(), label(0)); labelList faceMap(faces.size(), label(-1)); - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); // Send ordering forAll(sortMesh.boundaryMesh(), patchi) diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTools.C b/applications/utilities/mesh/manipulation/checkMesh/checkTools.C index aeabdf754b..3f65097b4c 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTools.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTools.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -417,7 +417,7 @@ void Foam::mergeAndWrite // Receive slave ones for (int slave=1; slave> nbrPatchInfo; diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index eddfe51898..ae9c834292 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -394,7 +394,7 @@ void getInterfaceSizes slave++ ) { - IPstream fromSlave(Pstream::blocking, slave); + IPstream fromSlave(Pstream::commsTypes::blocking, slave); EdgeMap> slaveSizes(fromSlave); @@ -439,7 +439,11 @@ void getInterfaceSizes { // Send to master { - OPstream toMaster(Pstream::blocking, Pstream::masterNo()); + OPstream toMaster + ( + Pstream::commsTypes::blocking, + Pstream::masterNo() + ); toMaster << regionsToSize; } } diff --git a/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.C b/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.C index 8b16b183f3..1bad1c7993 100644 --- a/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.C +++ b/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -97,14 +97,18 @@ Foam::autoPtr Foam::loadOrCreateMesh slave++ ) { - OPstream toSlave(Pstream::scheduled, slave); + OPstream toSlave(Pstream::commsTypes::scheduled, slave); toSlave << patchEntries; } } else { // Receive patches - IPstream fromMaster(Pstream::scheduled, Pstream::masterNo()); + IPstream fromMaster + ( + Pstream::commsTypes::scheduled, + Pstream::masterNo() + ); fromMaster >> patchEntries; } diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C index 89580aa9af..65ab3bbb97 100644 --- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C +++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -304,7 +304,7 @@ void readFields { if (!haveMesh[proci]) { - OPstream toProc(Pstream::blocking, proci); + OPstream toProc(Pstream::commsTypes::blocking, proci); toProc<< tsubfld(); } } @@ -320,7 +320,11 @@ void readFields const word& name = masterNames[i]; // Receive field - IPstream fromMaster(Pstream::blocking, Pstream::masterNo()); + IPstream fromMaster + ( + Pstream::commsTypes::blocking, + Pstream::masterNo() + ); dictionary fieldDict(fromMaster); fields.set diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C index 2070b0a621..751569bb06 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -110,7 +110,7 @@ void writeField for (int slave=1; slave::nComponents; cmpt++) { - OPstream toMaster(Pstream::scheduled, Pstream::masterNo()); + OPstream toMaster + ( + Pstream::commsTypes::scheduled, + Pstream::masterNo() + ); toMaster<< vf.component(cmpt); } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C index 4d08207dd0..ef0abd3e78 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -694,7 +694,7 @@ void Foam::ensightMesh::writeAllPolys // Slaves for (int slave=1; slave(patchFaces, prims); } } @@ -932,7 +952,7 @@ void Foam::ensightMesh::writeAllNSided for (int slave=1; slave(patchFaces, prims); } @@ -959,7 +983,7 @@ void Foam::ensightMesh::writeAllNSided for (int slave=1; slave(patchFaces, prims); } } @@ -997,7 +1025,7 @@ void Foam::ensightMesh::writeAllPoints ensightGeometryFile.write(uniquePoints.component(d)); for (int slave=1; slave& fld) if ( - Pstream::defaultCommsType == Pstream::blocking - || Pstream::defaultCommsType == Pstream::nonBlocking + Pstream::defaultCommsType == Pstream::commsTypes::blocking + || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking ) { label nReq = Pstream::nRequests(); @@ -67,7 +67,7 @@ void evaluateConstraintTypes(GeometricField& fld) if ( Pstream::parRun() - && Pstream::defaultCommsType == Pstream::nonBlocking + && Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking ) { Pstream::waitRequests(nReq); @@ -87,7 +87,7 @@ void evaluateConstraintTypes(GeometricField& fld) } } } - else if (Pstream::defaultCommsType == Pstream::scheduled) + else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { const lduSchedule& patchSchedule = fld.mesh().globalData().patchSchedule(); @@ -105,11 +105,11 @@ void evaluateConstraintTypes(GeometricField& fld) { if (patchSchedule[patchEvali].init) { - tgtField.initEvaluate(Pstream::scheduled); + tgtField.initEvaluate(Pstream::commsTypes::scheduled); } else { - tgtField.evaluate(Pstream::scheduled); + tgtField.evaluate(Pstream::commsTypes::scheduled); } } } diff --git a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C index f06cd97705..7fc604b63d 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C +++ b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -112,7 +112,7 @@ void Foam::ParSortableList::checkAndSend } { - OPstream toSlave(Pstream::blocking, destProci); + OPstream toSlave(Pstream::commsTypes::blocking, destProci); toSlave << values << indices; } } @@ -306,7 +306,7 @@ void Foam::ParSortableList::sort() Pout<< "Receiving from " << proci << endl; } - IPstream fromSlave(Pstream::blocking, proci); + IPstream fromSlave(Pstream::commsTypes::blocking, proci); fromSlave >> recValues >> recIndices; diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C index 5be036fcec..594e5b1ac6 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -99,7 +99,7 @@ void Foam::IOdictionary::readFile(const bool masterOnly) // not. Could reset all the ITstreams to ascii? IPstream fromAbove ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, myComm.above(), 0, Pstream::msgType(), @@ -121,7 +121,7 @@ void Foam::IOdictionary::readFile(const bool masterOnly) } OPstream toBelow ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, myComm.below()[belowI], 0, Pstream::msgType(), diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.C b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.C index 9be1dc5eb3..b5e76852b5 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -83,7 +83,7 @@ void Foam::PstreamBuffers::finishedSends(const bool block) { finishedSendsCalled_ = true; - if (commsType_ == UPstream::nonBlocking) + if (commsType_ == UPstream::commsTypes::nonBlocking) { Pstream::exchange, char> ( @@ -101,7 +101,7 @@ void Foam::PstreamBuffers::finishedSends(labelList& recvSizes, const bool block) { finishedSendsCalled_ = true; - if (commsType_ == UPstream::nonBlocking) + if (commsType_ == UPstream::commsTypes::nonBlocking) { Pstream::exchangeSizes(sendBuf_, recvSizes, comm_); diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H index c6a0e33fb6..5fa34ad86f 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H +++ b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description Example usage: - PstreamBuffers pBuffers(Pstream::nonBlocking); + PstreamBuffers pBuffers(Pstream::commsTypes::nonBlocking); for (label proci = 0; proci < Pstream::nProcs(); proci++) { diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.C b/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.C index b06c2a8cab..6ac1743680 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -113,7 +113,7 @@ Foam::UOPstream::UOPstream(const int toProcNo, PstreamBuffers& buffers) sendBuf_(buffers.sendBuf_[toProcNo]), tag_(buffers.tag_), comm_(buffers.comm_), - sendAtDestruct_(buffers.commsType_ != UPstream::nonBlocking) + sendAtDestruct_(buffers.commsType_ != UPstream::commsTypes::nonBlocking) { setOpened(); setGood(); diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H index e63f32ae91..fab2dd7ffd 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,7 +62,7 @@ class UPstream public: //- Types of communications - enum commsTypes + enum class commsTypes { blocking, scheduled, diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/combineGatherScatter.C b/src/OpenFOAM/db/IOstreams/Pstreams/combineGatherScatter.C index 6403905ad6..e69cae6613 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/combineGatherScatter.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/combineGatherScatter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -65,7 +65,7 @@ void Foam::Pstream::combineGather T value; UIPstream::read ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, belowID, reinterpret_cast(&value), sizeof(T), @@ -83,7 +83,14 @@ void Foam::Pstream::combineGather } else { - IPstream fromBelow(UPstream::scheduled, belowID, 0, tag, comm); + IPstream fromBelow + ( + UPstream::commsTypes::scheduled, + belowID, + 0, + tag, + comm + ); T value(fromBelow); if (debug & 2) @@ -109,7 +116,7 @@ void Foam::Pstream::combineGather { UOPstream::write ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), reinterpret_cast(&Value), sizeof(T), @@ -121,7 +128,7 @@ void Foam::Pstream::combineGather { OPstream toAbove ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), 0, tag, @@ -189,7 +196,7 @@ void Foam::Pstream::combineScatter { UIPstream::read ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), reinterpret_cast(&Value), sizeof(T), @@ -201,7 +208,7 @@ void Foam::Pstream::combineScatter { IPstream fromAbove ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), 0, tag, @@ -231,7 +238,7 @@ void Foam::Pstream::combineScatter { UOPstream::write ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, belowID, reinterpret_cast(&Value), sizeof(T), @@ -241,7 +248,14 @@ void Foam::Pstream::combineScatter } else { - OPstream toBelow(UPstream::scheduled, belowID, 0, tag, comm); + OPstream toBelow + ( + UPstream::commsTypes::scheduled, + belowID, + 0, + tag, + comm + ); toBelow << Value; } } @@ -294,7 +308,7 @@ void Foam::Pstream::listCombineGather UIPstream::read ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, belowID, reinterpret_cast(receivedValues.begin()), receivedValues.byteSize(), @@ -315,7 +329,14 @@ void Foam::Pstream::listCombineGather } else { - IPstream fromBelow(UPstream::scheduled, belowID, 0, tag, comm); + IPstream fromBelow + ( + UPstream::commsTypes::scheduled, + belowID, + 0, + tag, + comm + ); List receivedValues(fromBelow); if (debug & 2) @@ -344,7 +365,7 @@ void Foam::Pstream::listCombineGather { UOPstream::write ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), reinterpret_cast(Values.begin()), Values.byteSize(), @@ -356,7 +377,7 @@ void Foam::Pstream::listCombineGather { OPstream toAbove ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), 0, tag, @@ -424,7 +445,7 @@ void Foam::Pstream::listCombineScatter { UIPstream::read ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), reinterpret_cast(Values.begin()), Values.byteSize(), @@ -436,7 +457,7 @@ void Foam::Pstream::listCombineScatter { IPstream fromAbove ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), 0, tag, @@ -466,7 +487,7 @@ void Foam::Pstream::listCombineScatter { UOPstream::write ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, belowID, reinterpret_cast(Values.begin()), Values.byteSize(), @@ -476,7 +497,14 @@ void Foam::Pstream::listCombineScatter } else { - OPstream toBelow(UPstream::scheduled, belowID, 0, tag, comm); + OPstream toBelow + ( + UPstream::commsTypes::scheduled, + belowID, + 0, + tag, + comm + ); toBelow << Values; } } @@ -535,7 +563,14 @@ void Foam::Pstream::mapCombineGather { label belowID = myComm.below()[belowI]; - IPstream fromBelow(UPstream::scheduled, belowID, 0, tag, comm); + IPstream fromBelow + ( + UPstream::commsTypes::scheduled, + belowID, + 0, + tag, + comm + ); Container receivedValues(fromBelow); if (debug & 2) @@ -575,7 +610,14 @@ void Foam::Pstream::mapCombineGather << " data:" << Values << endl; } - OPstream toAbove(UPstream::scheduled, myComm.above(), 0, tag, comm); + OPstream toAbove + ( + UPstream::commsTypes::scheduled, + myComm.above(), + 0, + tag, + comm + ); toAbove << Values; } } @@ -635,7 +677,7 @@ void Foam::Pstream::mapCombineScatter { IPstream fromAbove ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), 0, tag, @@ -660,7 +702,14 @@ void Foam::Pstream::mapCombineScatter Pout<< " sending to " << belowID << " data:" << Values << endl; } - OPstream toBelow(UPstream::scheduled, belowID, 0, tag, comm); + OPstream toBelow + ( + UPstream::commsTypes::scheduled, + belowID, + 0, + tag, + comm + ); toBelow << Values; } } diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C b/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C index dc514f572a..0055e5a1cf 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,7 +79,7 @@ void Foam::Pstream::exchange recvBufs[proci].setSize(nRecv); UIPstream::read ( - UPstream::nonBlocking, + UPstream::commsTypes::nonBlocking, proci, reinterpret_cast(recvBufs[proci].begin()), nRecv*sizeof(T), @@ -101,7 +101,7 @@ void Foam::Pstream::exchange ( !UOPstream::write ( - UPstream::nonBlocking, + UPstream::commsTypes::nonBlocking, proci, reinterpret_cast(sendBufs[proci].begin()), sendBufs[proci].size()*sizeof(T), diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatter.C b/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatter.C index 270c08fee5..f3ab16463a 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatter.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -66,7 +66,7 @@ void Pstream::gather { UIPstream::read ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.below()[belowI], reinterpret_cast(&value), sizeof(T), @@ -78,7 +78,7 @@ void Pstream::gather { IPstream fromBelow ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.below()[belowI], 0, tag, @@ -97,7 +97,7 @@ void Pstream::gather { UOPstream::write ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), reinterpret_cast(&Value), sizeof(T), @@ -109,7 +109,7 @@ void Pstream::gather { OPstream toAbove ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), 0, tag, @@ -163,7 +163,7 @@ void Pstream::scatter { UIPstream::read ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), reinterpret_cast(&Value), sizeof(T), @@ -175,7 +175,7 @@ void Pstream::scatter { IPstream fromAbove ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), 0, tag, @@ -194,7 +194,7 @@ void Pstream::scatter { UOPstream::write ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.below()[belowI], reinterpret_cast(&Value), sizeof(T), @@ -206,7 +206,7 @@ void Pstream::scatter { OPstream toBelow ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.below()[belowI], 0, tag, diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatterList.C b/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatterList.C index 393d9d1b00..6323cded44 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatterList.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatterList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,7 +79,7 @@ void Pstream::gatherList UIPstream::read ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, belowID, reinterpret_cast(receivedValues.begin()), receivedValues.byteSize(), @@ -96,7 +96,14 @@ void Pstream::gatherList } else { - IPstream fromBelow(UPstream::scheduled, belowID, 0, tag, comm); + IPstream fromBelow + ( + UPstream::commsTypes::scheduled, + belowID, + 0, + tag, + comm + ); fromBelow >> Values[belowID]; if (debug & 2) @@ -148,7 +155,7 @@ void Pstream::gatherList OPstream::write ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), reinterpret_cast(sendingValues.begin()), sendingValues.byteSize(), @@ -160,7 +167,7 @@ void Pstream::gatherList { OPstream toAbove ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), 0, tag, @@ -234,7 +241,7 @@ void Pstream::scatterList UIPstream::read ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), reinterpret_cast(receivedValues.begin()), receivedValues.byteSize(), @@ -251,7 +258,7 @@ void Pstream::scatterList { IPstream fromAbove ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, myComm.above(), 0, tag, @@ -290,7 +297,7 @@ void Pstream::scatterList OPstream::write ( - UPstream::scheduled, + UPstream::commsTypes::scheduled, belowID, reinterpret_cast(sendingValues.begin()), sendingValues.byteSize(), @@ -300,7 +307,14 @@ void Pstream::scatterList } else { - OPstream toBelow(UPstream::scheduled, belowID, 0, tag, comm); + OPstream toBelow + ( + UPstream::commsTypes::scheduled, + belowID, + 0, + tag, + comm + ); // Send data destined for all other processors below belowID forAll(notBelowLeaves, leafI) diff --git a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C index c699bb301f..0a9ae88310 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C +++ b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -238,7 +238,7 @@ bool Foam::regIOobject::read() // not currently supported IPstream fromAbove ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, myComm.above(), 0, Pstream::msgType(), @@ -254,7 +254,7 @@ bool Foam::regIOobject::read() { OPstream toBelow ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, myComm.below()[belowI], 0, Pstream::msgType(), diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C index 6265185cc5..25244a76ce 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -422,8 +422,8 @@ evaluate() if ( - Pstream::defaultCommsType == Pstream::blocking - || Pstream::defaultCommsType == Pstream::nonBlocking + Pstream::defaultCommsType == Pstream::commsTypes::blocking + || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking ) { label nReq = Pstream::nRequests(); @@ -437,7 +437,7 @@ evaluate() if ( Pstream::parRun() - && Pstream::defaultCommsType == Pstream::nonBlocking + && Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking ) { Pstream::waitRequests(nReq); @@ -448,7 +448,7 @@ evaluate() this->operator[](patchi).evaluate(Pstream::defaultCommsType); } } - else if (Pstream::defaultCommsType == Pstream::scheduled) + else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { const lduSchedule& patchSchedule = bmesh_.mesh().globalData().patchSchedule(); @@ -458,12 +458,12 @@ evaluate() if (patchSchedule[patchEvali].init) { this->operator[](patchSchedule[patchEvali].patch) - .initEvaluate(Pstream::scheduled); + .initEvaluate(Pstream::commsTypes::scheduled); } else { this->operator[](patchSchedule[patchEvali].patch) - .evaluate(Pstream::scheduled); + .evaluate(Pstream::commsTypes::scheduled); } } } diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H index 3529c77b7d..115081596e 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -124,7 +124,8 @@ public: //- Update the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ); }; diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H index d9cac6941f..19e9be93c8 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -116,7 +116,8 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ) = 0; //- Initialise swap of patch point values diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H index 298eabeecb..3058b8e5b0 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -162,7 +162,8 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ); diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H index 50b4afbe68..af0e4c24c6 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -161,7 +161,8 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ) {} diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H index 22b39163eb..aa55cd242f 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -122,14 +122,11 @@ public: // Member functions - // Evaluation functions - - //- Evaluate the patch field - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::blocking - ); - + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + ); }; diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H index b6ef3e2a8c..84710c325b 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -122,14 +122,11 @@ public: // Member functions - // Evaluation functions - - //- Evaluate the patch field - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::blocking - ); - + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + ); }; diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H index c8028b4710..3db9be39c2 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -157,7 +157,7 @@ public: } - //- Constraint handling + // Constraint handling //- Return the constraint type this pointPatchField implements virtual const word& constraintType() const @@ -171,7 +171,8 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ) {} diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C index 74707a9a93..aac70da39f 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -113,7 +113,7 @@ void Foam::processorCyclicPointPatchField::initSwapAddSeparated ) ); - if (commsType == Pstream::nonBlocking) + if (commsType == Pstream::commsTypes::nonBlocking) { receiveBuf_.setSize(pf.size()); IPstream::read @@ -149,7 +149,7 @@ void Foam::processorCyclicPointPatchField::swapAddSeparated if (Pstream::parRun()) { // If nonblocking data has already been received into receiveBuf_ - if (commsType != Pstream::nonBlocking) + if (commsType != Pstream::commsTypes::nonBlocking) { receiveBuf_.setSize(this->size()); IPstream::read diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H index 2859591bed..656f699147 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -166,7 +166,8 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ) {} diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H index acbba86d21..ded2b84a1f 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,13 +134,11 @@ public: return symmetryPlanePointPatch::typeName; } - // Evaluation functions - - //- Update the patch field - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::blocking - ); + //- Update the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + ); }; diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H index e14fb992e6..c0863d4394 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -122,21 +122,17 @@ public: // Member functions - //- Constraint handling + //- Return the constraint type this pointPatchField implements + virtual const word& constraintType() const + { + return type(); + } - //- Return the constraint type this pointPatchField implements - virtual const word& constraintType() const - { - return type(); - } - - // Evaluation functions - - //- Update the patch field - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::blocking - ); + //- Update the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + ); }; diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H index 49e206709b..f75db6282b 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -231,7 +231,7 @@ public: //- Evaluate the patch field, sets Updated to false virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking ); //- Write diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H index cff5af3d6e..d57b68a58b 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -139,14 +139,11 @@ public: // Member functions - // Evaluation functions - - //- Update the patch field - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::blocking - ); - + //- Update the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + ); //- Write virtual void write(Ostream&) const; diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H index 34b0e6336e..b4ac7f2dc8 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -418,14 +418,16 @@ public: //- Initialise evaluation of the patch field (do nothing) virtual void initEvaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ) {} //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ); diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index 9e223df6ba..cdd31a303e 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -703,7 +703,7 @@ void Foam::argList::parse { options_.set("case", roots[slave-1]/globalCase_); - OPstream toSlave(Pstream::scheduled, slave); + OPstream toSlave(Pstream::commsTypes::scheduled, slave); toSlave << args_ << options_; } options_.erase("case"); @@ -750,7 +750,7 @@ void Foam::argList::parse slave++ ) { - OPstream toSlave(Pstream::scheduled, slave); + OPstream toSlave(Pstream::commsTypes::scheduled, slave); toSlave << args_ << options_; } } @@ -758,7 +758,11 @@ void Foam::argList::parse else { // Collect the master's argument list - IPstream fromMaster(Pstream::scheduled, Pstream::masterNo()); + IPstream fromMaster + ( + Pstream::commsTypes::scheduled, + Pstream::masterNo() + ); fromMaster >> args_ >> options_; // Establish rootPath_/globalCase_/case_ for slave @@ -792,7 +796,7 @@ void Foam::argList::parse slave++ ) { - IPstream fromSlave(Pstream::scheduled, slave); + IPstream fromSlave(Pstream::commsTypes::scheduled, slave); string slaveBuild; string slaveMachine; @@ -815,7 +819,11 @@ void Foam::argList::parse } else { - OPstream toMaster(Pstream::scheduled, Pstream::masterNo()); + OPstream toMaster + ( + Pstream::commsTypes::scheduled, + Pstream::masterNo() + ); toMaster << string(Foam::FOAMbuild) << hostName() << pid(); } } diff --git a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C index 6c9f0eff73..77fa34f699 100644 --- a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C +++ b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -97,7 +97,7 @@ Foam::LUscalarMatrix::LUscalarMatrix ( IPstream ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, slave, 0, // bufSize Pstream::msgType(), @@ -111,7 +111,7 @@ Foam::LUscalarMatrix::LUscalarMatrix { OPstream toMaster ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, Pstream::masterNo(), 0, // bufSize Pstream::msgType(), diff --git a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrixTemplates.C b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrixTemplates.C index 432c39917c..91c4cf37ff 100644 --- a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrixTemplates.C +++ b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrixTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,7 +62,7 @@ void Foam::LUscalarMatrix::solve { IPstream::read ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, slave, reinterpret_cast ( @@ -78,7 +78,7 @@ void Foam::LUscalarMatrix::solve { OPstream::write ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, Pstream::masterNo(), reinterpret_cast(x.begin()), x.byteSize(), @@ -106,7 +106,7 @@ void Foam::LUscalarMatrix::solve { OPstream::write ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, slave, reinterpret_cast ( @@ -122,7 +122,7 @@ void Foam::LUscalarMatrix::solve { IPstream::read ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, Pstream::masterNo(), reinterpret_cast(x.begin()), x.byteSize(), diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C index 8bf7a15194..465c097bf0 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,8 +38,8 @@ void Foam::LduMatrix::initMatrixInterfaces { if ( - Pstream::defaultCommsType == Pstream::blocking - || Pstream::defaultCommsType == Pstream::nonBlocking + Pstream::defaultCommsType == Pstream::commsTypes::blocking + || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking ) { forAll(interfaces_, interfacei) @@ -57,7 +57,7 @@ void Foam::LduMatrix::initMatrixInterfaces } } } - else if (Pstream::defaultCommsType == Pstream::scheduled) + else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { const lduSchedule& patchSchedule = this->patchSchedule(); @@ -78,7 +78,7 @@ void Foam::LduMatrix::initMatrixInterfaces psiif, interfaceCoeffs[interfacei], //Amultiplier(interfaceCoeffs[interfacei]), - Pstream::blocking + Pstream::commsTypes::blocking ); } } @@ -103,12 +103,12 @@ void Foam::LduMatrix::updateMatrixInterfaces { if ( - Pstream::defaultCommsType == Pstream::blocking - || Pstream::defaultCommsType == Pstream::nonBlocking + Pstream::defaultCommsType == Pstream::commsTypes::blocking + || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking ) { // Block until all sends/receives have been finished - if (Pstream::defaultCommsType == Pstream::nonBlocking) + if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking) { IPstream::waitRequests(); OPstream::waitRequests(); @@ -129,7 +129,7 @@ void Foam::LduMatrix::updateMatrixInterfaces } } } - else if (Pstream::defaultCommsType == Pstream::scheduled) + else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { const lduSchedule& patchSchedule = this->patchSchedule(); @@ -148,7 +148,7 @@ void Foam::LduMatrix::updateMatrixInterfaces psiif, interfaceCoeffs[interfacei], //Amultiplier(interfaceCoeffs[interfacei]), - Pstream::scheduled + Pstream::commsTypes::scheduled ); } else @@ -159,7 +159,7 @@ void Foam::LduMatrix::updateMatrixInterfaces psiif, interfaceCoeffs[interfacei], //Amultiplier(interfaceCoeffs[interfacei]), - Pstream::scheduled + Pstream::commsTypes::scheduled ); } } @@ -182,7 +182,7 @@ void Foam::LduMatrix::updateMatrixInterfaces psiif, interfaceCoeffs[interfacei], //Amultiplier(interfaceCoeffs[interfacei]), - Pstream::blocking + Pstream::commsTypes::blocking ); } } diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C index 8ba519430a..853a046bc8 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,7 +38,11 @@ void Foam::processorLduInterface::send { label nBytes = f.byteSize(); - if (commsType == Pstream::blocking || commsType == Pstream::scheduled) + if + ( + commsType == Pstream::commsTypes::blocking + || commsType == Pstream::commsTypes::scheduled + ) { OPstream::write ( @@ -50,7 +54,7 @@ void Foam::processorLduInterface::send comm() ); } - else if (commsType == Pstream::nonBlocking) + else if (commsType == Pstream::commsTypes::nonBlocking) { resizeBuf(receiveBuf_, nBytes); @@ -80,7 +84,7 @@ void Foam::processorLduInterface::send else { FatalErrorInFunction - << "Unsupported communications type " << commsType + << "Unsupported communications type " << int(commsType) << exit(FatalError); } } @@ -93,7 +97,11 @@ void Foam::processorLduInterface::receive UList& f ) const { - if (commsType == Pstream::blocking || commsType == Pstream::scheduled) + if + ( + commsType == Pstream::commsTypes::blocking + || commsType == Pstream::commsTypes::scheduled + ) { IPstream::read ( @@ -105,14 +113,14 @@ void Foam::processorLduInterface::receive comm() ); } - else if (commsType == Pstream::nonBlocking) + else if (commsType == Pstream::commsTypes::nonBlocking) { memcpy(f.begin(), receiveBuf_.begin(), f.byteSize()); } else { FatalErrorInFunction - << "Unsupported communications type " << commsType + << "Unsupported communications type " << int(commsType) << exit(FatalError); } } @@ -158,7 +166,11 @@ void Foam::processorLduInterface::compressedSend reinterpret_cast(fArray[nm1]) = f.last(); - if (commsType == Pstream::blocking || commsType == Pstream::scheduled) + if + ( + commsType == Pstream::commsTypes::blocking + || commsType == Pstream::commsTypes::scheduled + ) { OPstream::write ( @@ -170,7 +182,7 @@ void Foam::processorLduInterface::compressedSend comm() ); } - else if (commsType == Pstream::nonBlocking) + else if (commsType == Pstream::commsTypes::nonBlocking) { resizeBuf(receiveBuf_, nBytes); @@ -197,7 +209,7 @@ void Foam::processorLduInterface::compressedSend else { FatalErrorInFunction - << "Unsupported communications type " << commsType + << "Unsupported communications type " << int(commsType) << exit(FatalError); } } @@ -222,7 +234,11 @@ void Foam::processorLduInterface::compressedReceive label nFloats = nm1 + nlast; label nBytes = nFloats*sizeof(float); - if (commsType == Pstream::blocking || commsType == Pstream::scheduled) + if + ( + commsType == Pstream::commsTypes::blocking + || commsType == Pstream::commsTypes::scheduled + ) { resizeBuf(receiveBuf_, nBytes); @@ -236,10 +252,10 @@ void Foam::processorLduInterface::compressedReceive comm() ); } - else if (commsType != Pstream::nonBlocking) + else if (commsType != Pstream::commsTypes::nonBlocking) { FatalErrorInFunction - << "Unsupported communications type " << commsType + << "Unsupported communications type " << int(commsType) << exit(FatalError); } diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C index 3709218436..af65e1bc68 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,8 +38,8 @@ void Foam::lduMatrix::initMatrixInterfaces { if ( - Pstream::defaultCommsType == Pstream::blocking - || Pstream::defaultCommsType == Pstream::nonBlocking + Pstream::defaultCommsType == Pstream::commsTypes::blocking + || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking ) { forAll(interfaces, interfacei) @@ -57,7 +57,7 @@ void Foam::lduMatrix::initMatrixInterfaces } } } - else if (Pstream::defaultCommsType == Pstream::scheduled) + else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { const lduSchedule& patchSchedule = this->patchSchedule(); @@ -78,7 +78,7 @@ void Foam::lduMatrix::initMatrixInterfaces psiif, coupleCoeffs[interfacei], cmpt, - Pstream::blocking + Pstream::commsTypes::blocking ); } } @@ -102,7 +102,7 @@ void Foam::lduMatrix::updateMatrixInterfaces const direction cmpt ) const { - if (Pstream::defaultCommsType == Pstream::blocking) + if (Pstream::defaultCommsType == Pstream::commsTypes::blocking) { forAll(interfaces, interfacei) { @@ -119,7 +119,7 @@ void Foam::lduMatrix::updateMatrixInterfaces } } } - else if (Pstream::defaultCommsType == Pstream::nonBlocking) + else if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking) { // Try and consume interfaces as they become available bool allUpdated = false; @@ -198,7 +198,7 @@ void Foam::lduMatrix::updateMatrixInterfaces } } } - else if (Pstream::defaultCommsType == Pstream::scheduled) + else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { const lduSchedule& patchSchedule = this->patchSchedule(); @@ -217,7 +217,7 @@ void Foam::lduMatrix::updateMatrixInterfaces psiif, coupleCoeffs[interfacei], cmpt, - Pstream::scheduled + Pstream::commsTypes::scheduled ); } else @@ -228,7 +228,7 @@ void Foam::lduMatrix::updateMatrixInterfaces psiif, coupleCoeffs[interfacei], cmpt, - Pstream::scheduled + Pstream::commsTypes::scheduled ); } } @@ -251,7 +251,7 @@ void Foam::lduMatrix::updateMatrixInterfaces psiif, coupleCoeffs[interfacei], cmpt, - Pstream::blocking + Pstream::commsTypes::blocking ); } } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C index 334346962a..4036107e96 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -279,7 +279,7 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing { fineInterfaces[inti].initInternalFieldTransfer ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, restrictMap ); } @@ -322,7 +322,7 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing fineInterfaces[inti].interfaceInternalField(restrictMap), fineInterfaces[inti].internalFieldTransfer ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, restrictMap ), fineLevelIndex, @@ -488,7 +488,7 @@ void Foam::GAMGAgglomeration::procAgglomerateRestrictAddressing procRestrictAddressing, UPstream::msgType(), - Pstream::nonBlocking //Pstream::scheduled + Pstream::commsTypes::nonBlocking //Pstream::commsTypes::scheduled ); @@ -645,7 +645,7 @@ void Foam::GAMGAgglomeration::combineLevels(const label curLevel) // label& slaveVal = vals[i]; // IPstream::read // ( -// Pstream::scheduled, +// Pstream::commsTypes::scheduled, // procIDs[i], // reinterpret_cast(&slaveVal), // sizeof(slaveVal), @@ -658,7 +658,7 @@ void Foam::GAMGAgglomeration::combineLevels(const label curLevel) // { // OPstream::write // ( -// Pstream::scheduled, +// Pstream::commsTypes::scheduled, // procIDs[0], // reinterpret_cast(&myVal), // sizeof(myVal), diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C index 372accc31b..56c16ab0ce 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,7 +48,7 @@ void Foam::GAMGAgglomeration::gatherList { IPstream fromSlave ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, procIDs[i], 0, tag, @@ -62,7 +62,7 @@ void Foam::GAMGAgglomeration::gatherList { OPstream toMaster ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, procIDs[0], 0, tag, @@ -128,7 +128,7 @@ void Foam::GAMGAgglomeration::restrictField procIDs, cf, UPstream::msgType(), - Pstream::nonBlocking //Pstream::scheduled + Pstream::commsTypes::nonBlocking //Pstream::commsTypes::scheduled ); } } @@ -201,7 +201,7 @@ void Foam::GAMGAgglomeration::prolongField cf, allCf, UPstream::msgType(), - Pstream::nonBlocking //Pstream::scheduled + Pstream::commsTypes::nonBlocking //Pstream::commsTypes::scheduled ); forAll(fineToCoarse, i) 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 926dd14724..ec1ac3c348 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -150,7 +150,7 @@ Foam::labelListList Foam::GAMGProcAgglomeration::globalCellCells { interfaces[inti].initInternalFieldTransfer ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, globalIndices ); } @@ -172,7 +172,7 @@ Foam::labelListList Foam::GAMGProcAgglomeration::globalCellCells ( interfaces[inti].internalFieldTransfer ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, globalIndices ) ) diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C index 33b7d00929..58a8da4dd3 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -318,7 +318,7 @@ void Foam::GAMGSolver::gatherMatrices IPstream fromSlave ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, procIDs[proci], 0, // bufSize Pstream::msgType(), @@ -387,7 +387,7 @@ void Foam::GAMGSolver::gatherMatrices OPstream toMaster ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, procIDs[0], 0, Pstream::msgType(), diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.C index 2730b8666b..852caef35f 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -104,14 +104,18 @@ void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate procInterface_.interfaceInternalField(psiInternal, scalarSendBuf_); - if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer) + if + ( + commsType == Pstream::commsTypes::nonBlocking + && !Pstream::floatTransfer + ) { // Fast path. scalarReceiveBuf_.setSize(scalarSendBuf_.size()); outstandingRecvRequest_ = UPstream::nRequests(); IPstream::read ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, procInterface_.neighbProcNo(), reinterpret_cast(scalarReceiveBuf_.begin()), scalarReceiveBuf_.byteSize(), @@ -122,7 +126,7 @@ void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate outstandingSendRequest_ = UPstream::nRequests(); OPstream::write ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, procInterface_.neighbProcNo(), reinterpret_cast(scalarSendBuf_.begin()), scalarSendBuf_.byteSize(), @@ -160,7 +164,11 @@ void Foam::processorGAMGInterfaceField::updateInterfaceMatrix const labelUList& faceCells = procInterface_.faceCells(); - if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer) + if + ( + commsType == Pstream::commsTypes::nonBlocking + && !Pstream::floatTransfer + ) { // Fast path. if diff --git a/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.C b/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.C index a7e9fbacd6..c027cb58b0 100644 --- a/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.C +++ b/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -124,7 +124,11 @@ Foam::ProcessorTopology::ProcessorTopology Pstream::scatterList(*this, Pstream::msgType(), comm); } - if (Pstream::parRun() && Pstream::defaultCommsType == Pstream::scheduled) + if + ( + Pstream::parRun() + && Pstream::defaultCommsType == Pstream::commsTypes::scheduled + ) { label patchEvali = 0; diff --git a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C index 6a30d7f9b3..b4c0f7a936 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C +++ b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -993,7 +993,7 @@ void Foam::lduPrimitiveMesh::gather IPstream fromSlave ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, procIDs[i], 0, // bufSize Pstream::msgType(), @@ -1066,7 +1066,7 @@ void Foam::lduPrimitiveMesh::gather OPstream toMaster ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, procIDs[0], 0, Pstream::msgType(), diff --git a/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.C b/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.C index 7ba9428d37..b466bbc30f 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.C +++ b/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -80,8 +80,8 @@ void Foam::pointBoundaryMesh::calcGeometry() if ( - Pstream::defaultCommsType == Pstream::blocking - || Pstream::defaultCommsType == Pstream::nonBlocking + Pstream::defaultCommsType == Pstream::commsTypes::blocking + || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking ) { forAll(*this, patchi) @@ -96,7 +96,7 @@ void Foam::pointBoundaryMesh::calcGeometry() operator[](patchi).calcGeometry(pBufs); } } - else if (Pstream::defaultCommsType == Pstream::scheduled) + else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { const lduSchedule& patchSchedule = mesh().globalData().patchSchedule(); @@ -126,8 +126,8 @@ void Foam::pointBoundaryMesh::movePoints(const pointField& p) if ( - Pstream::defaultCommsType == Pstream::blocking - || Pstream::defaultCommsType == Pstream::nonBlocking + Pstream::defaultCommsType == Pstream::commsTypes::blocking + || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking ) { forAll(*this, patchi) @@ -142,7 +142,7 @@ void Foam::pointBoundaryMesh::movePoints(const pointField& p) operator[](patchi).movePoints(pBufs, p); } } - else if (Pstream::defaultCommsType == Pstream::scheduled) + else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { const lduSchedule& patchSchedule = mesh().globalData().patchSchedule(); @@ -172,8 +172,8 @@ void Foam::pointBoundaryMesh::updateMesh() if ( - Pstream::defaultCommsType == Pstream::blocking - || Pstream::defaultCommsType == Pstream::nonBlocking + Pstream::defaultCommsType == Pstream::commsTypes::blocking + || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking ) { forAll(*this, patchi) @@ -188,7 +188,7 @@ void Foam::pointBoundaryMesh::updateMesh() operator[](patchi).updateMesh(pBufs); } } - else if (Pstream::defaultCommsType == Pstream::scheduled) + else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { const lduSchedule& patchSchedule = mesh().globalData().patchSchedule(); diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H index 5e2ff81d1e..50492f3166 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -161,7 +161,8 @@ public: const UList& fld, List& allFld, const int tag = UPstream::msgType(), - const Pstream::commsTypes commsType=Pstream::nonBlocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::nonBlocking ); //- Collect data in processor order on master (== procIDs[0]). @@ -174,7 +175,8 @@ public: const UList& fld, List& allFld, const int tag = UPstream::msgType(), - const Pstream::commsTypes commsType=Pstream::nonBlocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::nonBlocking ) const { gather(offsets_, comm, procIDs, fld, allFld, tag, commsType); @@ -190,7 +192,8 @@ public: const labelList& procIDs, List& fld, const int tag = UPstream::msgType(), - const Pstream::commsTypes commsType=Pstream::nonBlocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::nonBlocking ); //- Inplace collect data in processor order on master @@ -202,7 +205,8 @@ public: const labelList& procIDs, List& fld, const int tag = UPstream::msgType(), - const Pstream::commsTypes commsType=Pstream::nonBlocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::nonBlocking ) const { gather(offsets_, comm, procIDs, fld, tag, commsType); @@ -218,7 +222,8 @@ public: const UList& allFld, UList& fld, const int tag = UPstream::msgType(), - const Pstream::commsTypes commsType=Pstream::nonBlocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::nonBlocking ); //- Distribute data in processor order. Requires fld to be sized! @@ -230,7 +235,8 @@ public: const UList& allFld, UList& fld, const int tag = UPstream::msgType(), - const Pstream::commsTypes commsType=Pstream::nonBlocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::nonBlocking ) const { scatter(offsets_, comm, procIDs, allFld, fld, tag, commsType); diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexTemplates.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexTemplates.C index 3be3a3a90b..de3a7bb9f1 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,7 +46,11 @@ void Foam::globalIndex::gather // Assign my local data SubList(allFld, fld.size(), 0) = fld; - if (commsType == Pstream::scheduled || commsType == Pstream::blocking) + if + ( + commsType == Pstream::commsTypes::scheduled + || commsType == Pstream::commsTypes::blocking + ) { for (label i = 1; i < procIDs.size(); i++) { @@ -113,7 +117,11 @@ void Foam::globalIndex::gather } else { - if (commsType == Pstream::scheduled || commsType == Pstream::blocking) + if + ( + commsType == Pstream::commsTypes::scheduled + || commsType == Pstream::commsTypes::blocking + ) { if (contiguous()) { @@ -209,7 +217,11 @@ void Foam::globalIndex::scatter { fld.deepCopy(SubList(allFld, off[1]-off[0])); - if (commsType == Pstream::scheduled || commsType == Pstream::blocking) + if + ( + commsType == Pstream::commsTypes::scheduled + || commsType == Pstream::commsTypes::blocking + ) { for (label i = 1; i < procIDs.size(); i++) { @@ -286,7 +298,11 @@ void Foam::globalIndex::scatter } else { - if (commsType == Pstream::scheduled || commsType == Pstream::blocking) + if + ( + commsType == Pstream::commsTypes::scheduled + || commsType == Pstream::commsTypes::blocking + ) { if (contiguous()) { diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C index c994bafcf1..98e09cd18d 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -84,7 +84,7 @@ void Foam::globalMeshData::initProcAddr() if (Pstream::parRun()) { - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); // Send indices of my processor patches to my neighbours forAll(processorPatches_, i) @@ -401,7 +401,7 @@ void Foam::globalMeshData::calcSharedEdges() const ) { // Receive the edges using shared points from the slave. - IPstream fromSlave(Pstream::blocking, slave); + IPstream fromSlave(Pstream::commsTypes::blocking, slave); EdgeMap procSharedEdges(fromSlave); if (debug) @@ -450,7 +450,7 @@ void Foam::globalMeshData::calcSharedEdges() const ) { // Receive the edges using shared points from the slave. - OPstream toSlave(Pstream::blocking, slave); + OPstream toSlave(Pstream::commsTypes::blocking, slave); toSlave << globalShared; } } @@ -459,14 +459,20 @@ void Foam::globalMeshData::calcSharedEdges() const { // Send local edges to master { - OPstream toMaster(Pstream::blocking, Pstream::masterNo()); - + OPstream toMaster + ( + Pstream::commsTypes::blocking, + Pstream::masterNo() + ); toMaster << localShared; } // Receive merged edges from master. { - IPstream fromMaster(Pstream::blocking, Pstream::masterNo()); - + IPstream fromMaster + ( + Pstream::commsTypes::blocking, + Pstream::masterNo() + ); fromMaster >> globalShared; } } @@ -1920,7 +1926,7 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const slave++ ) { - IPstream fromSlave(Pstream::blocking, slave); + IPstream fromSlave(Pstream::commsTypes::blocking, slave); labelList nbrSharedPointAddr; pointField nbrSharedPoints; @@ -1944,7 +1950,7 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const { OPstream toSlave ( - Pstream::blocking, + Pstream::commsTypes::blocking, slave, sharedPoints.size()*sizeof(Zero) ); @@ -1956,8 +1962,11 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const // Slave: // send points { - OPstream toMaster(Pstream::blocking, Pstream::masterNo()); - + OPstream toMaster + ( + Pstream::commsTypes::blocking, + Pstream::masterNo() + ); toMaster << pointAddr << UIndirectList(mesh_.points(), pointLabels)(); @@ -1965,7 +1974,11 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const // Receive sharedPoints { - IPstream fromMaster(Pstream::blocking, Pstream::masterNo()); + IPstream fromMaster + ( + Pstream::commsTypes::blocking, + Pstream::masterNo() + ); fromMaster >> sharedPoints; } } diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C index 88b3113a58..2cace80f4b 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -901,8 +901,8 @@ void Foam::globalPoints::calculateSharedPoints PstreamBuffers pBufs ( ( - Pstream::defaultCommsType == Pstream::scheduled - ? Pstream::nonBlocking + Pstream::defaultCommsType == Pstream::commsTypes::scheduled + ? Pstream::commsTypes::nonBlocking : Pstream::defaultCommsType ) ); @@ -939,8 +939,8 @@ void Foam::globalPoints::calculateSharedPoints PstreamBuffers pBufs ( ( - Pstream::defaultCommsType == Pstream::scheduled - ? Pstream::nonBlocking + Pstream::defaultCommsType == Pstream::commsTypes::scheduled + ? Pstream::commsTypes::nonBlocking : Pstream::defaultCommsType ) ); diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C index 69d8455a1f..5bf929910c 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -84,7 +84,7 @@ Foam::List Foam::mapDistributeBase::schedule slave++ ) { - IPstream fromSlave(Pstream::scheduled, slave, 0, tag); + IPstream fromSlave(Pstream::commsTypes::scheduled, slave, 0, tag); List nbrData(fromSlave); forAll(nbrData, i) @@ -105,20 +105,26 @@ Foam::List Foam::mapDistributeBase::schedule slave++ ) { - OPstream toSlave(Pstream::scheduled, slave, 0, tag); + OPstream toSlave(Pstream::commsTypes::scheduled, slave, 0, tag); toSlave << allComms; } } else { { - OPstream toMaster(Pstream::scheduled, Pstream::masterNo(), 0, tag); + OPstream toMaster + ( + Pstream::commsTypes::scheduled, + Pstream::masterNo(), + 0, + tag + ); toMaster << allComms; } { IPstream fromMaster ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, Pstream::masterNo(), 0, tag @@ -861,7 +867,7 @@ void Foam::mapDistributeBase::compact(const boolList& elemIsUsed, const int tag) recvFields[domain].setSize(map.size()); IPstream::read ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, domain, reinterpret_cast(recvFields[domain].begin()), recvFields[domain].size()*sizeof(bool), @@ -894,7 +900,7 @@ void Foam::mapDistributeBase::compact(const boolList& elemIsUsed, const int tag) OPstream::write ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, domain, reinterpret_cast(subField.begin()), subField.size()*sizeof(bool), @@ -1028,7 +1034,7 @@ void Foam::mapDistributeBase::compact recvFields[domain].setSize(map.size()); IPstream::read ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, domain, reinterpret_cast(recvFields[domain].begin()), recvFields[domain].size()*sizeof(bool), @@ -1060,7 +1066,7 @@ void Foam::mapDistributeBase::compact OPstream::write ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, domain, reinterpret_cast(subField.begin()), subField.size()*sizeof(bool), diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.H index 7079942815..c37a7fcad3 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -364,8 +364,9 @@ public: const int tag = UPstream::msgType() ); - //- Distribute data. Note:schedule only used for Pstream::scheduled - // for now, all others just use send-to-all, receive-from-all. + //- Distribute data. Note:schedule only used for + // Pstream::commsTypes::scheduled for now, all others just use + // send-to-all, receive-from-all. template static void distribute ( diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C index 0380f5d8ad..a40f9a3733 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -159,7 +159,7 @@ void Foam::mapDistributeBase::distribute return; } - if (commsType == Pstream::blocking) + if (commsType == Pstream::commsTypes::blocking) { // Since buffered sending can reuse the field to collect the // received data. @@ -171,7 +171,7 @@ void Foam::mapDistributeBase::distribute if (domain != Pstream::myProcNo() && map.size()) { - OPstream toNbr(Pstream::blocking, domain, 0, tag); + OPstream toNbr(Pstream::commsTypes::blocking, domain, 0, tag); List subField(map.size()); forAll(subField, i) @@ -219,7 +219,7 @@ void Foam::mapDistributeBase::distribute if (domain != Pstream::myProcNo() && map.size()) { - IPstream fromNbr(Pstream::blocking, domain, 0, tag); + IPstream fromNbr(Pstream::commsTypes::blocking, domain, 0, tag); List subField(fromNbr); checkReceivedSize(domain, map.size(), subField.size()); @@ -236,7 +236,7 @@ void Foam::mapDistributeBase::distribute } } } - else if (commsType == Pstream::scheduled) + else if (commsType == Pstream::commsTypes::scheduled) { // Need to make sure I don't overwrite field with received data // since the data might need to be sent to another processor. So @@ -285,7 +285,13 @@ void Foam::mapDistributeBase::distribute { // I am send first, receive next { - OPstream toNbr(Pstream::scheduled, recvProc, 0, tag); + OPstream toNbr + ( + Pstream::commsTypes::scheduled, + recvProc, + 0, + tag + ); const labelList& map = subMap[recvProc]; List subField(map.size()); @@ -302,7 +308,13 @@ void Foam::mapDistributeBase::distribute toNbr << subField; } { - IPstream fromNbr(Pstream::scheduled, recvProc, 0, tag); + IPstream fromNbr + ( + Pstream::commsTypes::scheduled, + recvProc, + 0, + tag + ); List subField(fromNbr); const labelList& map = constructMap[recvProc]; @@ -324,7 +336,13 @@ void Foam::mapDistributeBase::distribute { // I am receive first, send next { - IPstream fromNbr(Pstream::scheduled, sendProc, 0, tag); + IPstream fromNbr + ( + Pstream::commsTypes::scheduled, + sendProc, + 0, + tag + ); List subField(fromNbr); const labelList& map = constructMap[sendProc]; @@ -342,7 +360,13 @@ void Foam::mapDistributeBase::distribute ); } { - OPstream toNbr(Pstream::scheduled, sendProc, 0, tag); + OPstream toNbr + ( + Pstream::commsTypes::scheduled, + sendProc, + 0, + tag + ); const labelList& map = subMap[sendProc]; List subField(map.size()); @@ -362,13 +386,13 @@ void Foam::mapDistributeBase::distribute } field.transfer(newField); } - else if (commsType == Pstream::nonBlocking) + else if (commsType == Pstream::commsTypes::nonBlocking) { label nOutstanding = Pstream::nRequests(); if (!contiguous()) { - PstreamBuffers pBufs(Pstream::nonBlocking, tag); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking, tag); // Stream data into buffer for (label domain = 0; domain < Pstream::nProcs(); domain++) @@ -484,7 +508,7 @@ void Foam::mapDistributeBase::distribute OPstream::write ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, domain, reinterpret_cast(subField.begin()), subField.byteSize(), @@ -506,7 +530,7 @@ void Foam::mapDistributeBase::distribute recvFields[domain].setSize(map.size()); IPstream::read ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, domain, reinterpret_cast(recvFields[domain].begin()), recvFields[domain].byteSize(), @@ -591,7 +615,7 @@ void Foam::mapDistributeBase::distribute else { FatalErrorInFunction - << "Unknown communication schedule " << commsType + << "Unknown communication schedule " << int(commsType) << abort(FatalError); } } @@ -638,7 +662,7 @@ void Foam::mapDistributeBase::distribute return; } - if (commsType == Pstream::blocking) + if (commsType == Pstream::commsTypes::blocking) { // Since buffered sending can reuse the field to collect the // received data. @@ -650,7 +674,7 @@ void Foam::mapDistributeBase::distribute if (domain != Pstream::myProcNo() && map.size()) { - OPstream toNbr(Pstream::blocking, domain, 0, tag); + OPstream toNbr(Pstream::commsTypes::blocking, domain, 0, tag); List subField(map.size()); forAll(subField, i) { @@ -690,7 +714,7 @@ void Foam::mapDistributeBase::distribute if (domain != Pstream::myProcNo() && map.size()) { - IPstream fromNbr(Pstream::blocking, domain, 0, tag); + IPstream fromNbr(Pstream::commsTypes::blocking, domain, 0, tag); List subField(fromNbr); checkReceivedSize(domain, map.size(), subField.size()); @@ -707,7 +731,7 @@ void Foam::mapDistributeBase::distribute } } } - else if (commsType == Pstream::scheduled) + else if (commsType == Pstream::commsTypes::scheduled) { // Need to make sure I don't overwrite field with received data // since the data might need to be sent to another processor. So @@ -759,7 +783,13 @@ void Foam::mapDistributeBase::distribute { // I am send first, receive next { - OPstream toNbr(Pstream::scheduled, recvProc, 0, tag); + OPstream toNbr + ( + Pstream::commsTypes::scheduled, + recvProc, + 0, + tag + ); const labelList& map = subMap[recvProc]; @@ -777,7 +807,13 @@ void Foam::mapDistributeBase::distribute toNbr << subField; } { - IPstream fromNbr(Pstream::scheduled, recvProc, 0, tag); + IPstream fromNbr + ( + Pstream::commsTypes::scheduled, + recvProc, + 0, + tag + ); List subField(fromNbr); const labelList& map = constructMap[recvProc]; @@ -798,7 +834,13 @@ void Foam::mapDistributeBase::distribute { // I am receive first, send next { - IPstream fromNbr(Pstream::scheduled, sendProc, 0, tag); + IPstream fromNbr + ( + Pstream::commsTypes::scheduled, + sendProc, + 0, + tag + ); List subField(fromNbr); const labelList& map = constructMap[sendProc]; @@ -815,7 +857,13 @@ void Foam::mapDistributeBase::distribute ); } { - OPstream toNbr(Pstream::scheduled, sendProc, 0, tag); + OPstream toNbr + ( + Pstream::commsTypes::scheduled, + sendProc, + 0, + tag + ); const labelList& map = subMap[sendProc]; @@ -836,13 +884,13 @@ void Foam::mapDistributeBase::distribute } field.transfer(newField); } - else if (commsType == Pstream::nonBlocking) + else if (commsType == Pstream::commsTypes::nonBlocking) { label nOutstanding = Pstream::nRequests(); if (!contiguous()) { - PstreamBuffers pBufs(Pstream::nonBlocking, tag); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking, tag); // Stream data into buffer for (label domain = 0; domain < Pstream::nProcs(); domain++) @@ -961,7 +1009,7 @@ void Foam::mapDistributeBase::distribute OPstream::write ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, domain, reinterpret_cast(subField.begin()), subField.size()*sizeof(T), @@ -983,7 +1031,7 @@ void Foam::mapDistributeBase::distribute recvFields[domain].setSize(map.size()); UIPstream::read ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, domain, reinterpret_cast(recvFields[domain].begin()), recvFields[domain].size()*sizeof(T), @@ -1067,7 +1115,7 @@ void Foam::mapDistributeBase::distribute else { FatalErrorInFunction - << "Unknown communication schedule " << commsType + << "Unknown communication schedule " << int(commsType) << abort(FatalError); } } @@ -1155,11 +1203,11 @@ void Foam::mapDistributeBase::distribute const int tag ) const { - if (Pstream::defaultCommsType == Pstream::nonBlocking) + if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking) { distribute ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, List(), constructSize_, subMap_, @@ -1171,11 +1219,11 @@ void Foam::mapDistributeBase::distribute tag ); } - else if (Pstream::defaultCommsType == Pstream::scheduled) + else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { distribute ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, schedule(), constructSize_, subMap_, @@ -1191,7 +1239,7 @@ void Foam::mapDistributeBase::distribute { distribute ( - Pstream::blocking, + Pstream::commsTypes::blocking, List(), constructSize_, subMap_, @@ -1245,11 +1293,11 @@ void Foam::mapDistributeBase::reverseDistribute const int tag ) const { - if (Pstream::defaultCommsType == Pstream::nonBlocking) + if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking) { distribute ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, List(), constructSize, constructMap_, @@ -1261,11 +1309,11 @@ void Foam::mapDistributeBase::reverseDistribute tag ); } - else if (Pstream::defaultCommsType == Pstream::scheduled) + else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { distribute ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, schedule(), constructSize, constructMap_, @@ -1281,7 +1329,7 @@ void Foam::mapDistributeBase::reverseDistribute { distribute ( - Pstream::blocking, + Pstream::commsTypes::blocking, List(), constructSize, constructMap_, @@ -1308,11 +1356,11 @@ void Foam::mapDistributeBase::reverseDistribute const int tag ) const { - if (Pstream::defaultCommsType == Pstream::nonBlocking) + if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking) { distribute ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, List(), constructSize, constructMap_, @@ -1326,11 +1374,11 @@ void Foam::mapDistributeBase::reverseDistribute tag ); } - else if (Pstream::defaultCommsType == Pstream::scheduled) + else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { distribute ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, schedule(), constructSize, constructMap_, @@ -1348,7 +1396,7 @@ void Foam::mapDistributeBase::reverseDistribute { distribute ( - Pstream::blocking, + Pstream::commsTypes::blocking, List(), constructSize, constructMap_, diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index 94b8e5e0b3..4c59e4f9c0 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -223,8 +223,8 @@ void Foam::polyBoundaryMesh::calcGeometry() if ( - Pstream::defaultCommsType == Pstream::blocking - || Pstream::defaultCommsType == Pstream::nonBlocking + Pstream::defaultCommsType == Pstream::commsTypes::blocking + || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking ) { forAll(*this, patchi) @@ -239,7 +239,7 @@ void Foam::polyBoundaryMesh::calcGeometry() operator[](patchi).calcGeometry(pBufs); } } - else if (Pstream::defaultCommsType == Pstream::scheduled) + else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { const lduSchedule& patchSchedule = mesh().globalData().patchSchedule(); @@ -1010,8 +1010,8 @@ void Foam::polyBoundaryMesh::movePoints(const pointField& p) if ( - Pstream::defaultCommsType == Pstream::blocking - || Pstream::defaultCommsType == Pstream::nonBlocking + Pstream::defaultCommsType == Pstream::commsTypes::blocking + || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking ) { forAll(*this, patchi) @@ -1026,7 +1026,7 @@ void Foam::polyBoundaryMesh::movePoints(const pointField& p) operator[](patchi).movePoints(pBufs, p); } } - else if (Pstream::defaultCommsType == Pstream::scheduled) + else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { const lduSchedule& patchSchedule = mesh().globalData().patchSchedule(); @@ -1060,8 +1060,8 @@ void Foam::polyBoundaryMesh::updateMesh() if ( - Pstream::defaultCommsType == Pstream::blocking - || Pstream::defaultCommsType == Pstream::nonBlocking + Pstream::defaultCommsType == Pstream::commsTypes::blocking + || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking ) { forAll(*this, patchi) @@ -1076,7 +1076,7 @@ void Foam::polyBoundaryMesh::updateMesh() operator[](patchi).updateMesh(pBufs); } } - else if (Pstream::defaultCommsType == Pstream::scheduled) + else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { const lduSchedule& patchSchedule = mesh().globalData().patchSchedule(); diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C index 627bbc2fd6..f0193a7de1 100644 --- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -129,7 +129,7 @@ void Foam::syncTools::syncPointMap if (Pstream::parRun()) { - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); // Send @@ -311,7 +311,7 @@ void Foam::syncTools::syncPointMap slave++ ) { - IPstream fromSlave(Pstream::scheduled, slave); + IPstream fromSlave(Pstream::commsTypes::scheduled, slave); Map nbrValues(fromSlave); // Merge neighbouring values with my values @@ -335,7 +335,7 @@ void Foam::syncTools::syncPointMap slave++ ) { - OPstream toSlave(Pstream::scheduled, slave); + OPstream toSlave(Pstream::commsTypes::scheduled, slave); toSlave << sharedPointValues; } } @@ -343,14 +343,18 @@ void Foam::syncTools::syncPointMap { // Slave: send to master { - OPstream toMaster(Pstream::scheduled, Pstream::masterNo()); + OPstream toMaster + ( + Pstream::commsTypes::scheduled, + Pstream::masterNo() + ); toMaster << sharedPointValues; } // Receive merged values { IPstream fromMaster ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, Pstream::masterNo() ); fromMaster >> sharedPointValues; @@ -405,7 +409,7 @@ void Foam::syncTools::syncEdgeMap if (Pstream::parRun()) { - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); // Send @@ -687,7 +691,7 @@ void Foam::syncTools::syncEdgeMap slave++ ) { - IPstream fromSlave(Pstream::scheduled, slave); + IPstream fromSlave(Pstream::commsTypes::scheduled, slave); EdgeMap nbrValues(fromSlave); // Merge neighbouring values with my values @@ -712,7 +716,7 @@ void Foam::syncTools::syncEdgeMap ) { - OPstream toSlave(Pstream::scheduled, slave); + OPstream toSlave(Pstream::commsTypes::scheduled, slave); toSlave << sharedEdgeValues; } } @@ -720,12 +724,20 @@ void Foam::syncTools::syncEdgeMap { // Send to master { - OPstream toMaster(Pstream::scheduled, Pstream::masterNo()); + OPstream toMaster + ( + Pstream::commsTypes::scheduled, + Pstream::masterNo() + ); toMaster << sharedEdgeValues; } // Receive merged values { - IPstream fromMaster(Pstream::scheduled, Pstream::masterNo()); + IPstream fromMaster + ( + Pstream::commsTypes::scheduled, + Pstream::masterNo() + ); fromMaster >> sharedEdgeValues; } } @@ -799,7 +811,7 @@ void Foam::syncTools::syncEdgeMap // // if (Pstream::parRun()) // { -// PstreamBuffers pBufs(Pstream::nonBlocking); +// PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); // // // Send // @@ -1302,7 +1314,7 @@ void Foam::syncTools::syncBoundaryFaceList if (parRun) { - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); // Send @@ -1422,7 +1434,7 @@ void Foam::syncTools::syncFaceList if (parRun) { - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); // Send diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C index 85dbb2cdc8..d100ad3fe8 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -182,7 +182,7 @@ void Foam::PatchTools::gatherAndMerge // Receive slave ones for (int slave=1; slave slaveFaces(fromSlave); @@ -210,7 +210,7 @@ void Foam::PatchTools::gatherAndMerge // be improved. OPstream toMaster ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, Pstream::masterNo(), myPoints.byteSize() + 4*sizeof(label)*myFaces.size() ); diff --git a/src/Pstream/mpi/UIPread.C b/src/Pstream/mpi/UIPread.C index 524f09dcea..48ee5b3a3e 100644 --- a/src/Pstream/mpi/UIPread.C +++ b/src/Pstream/mpi/UIPread.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,7 +60,7 @@ Foam::UIPstream::UIPstream setOpened(); setGood(); - if (commsType == UPstream::nonBlocking) + if (commsType == commsTypes::nonBlocking) { // Message is already received into externalBuf } @@ -135,7 +135,11 @@ Foam::UIPstream::UIPstream(const int fromProcNo, PstreamBuffers& buffers) clearAtEnd_(true), messageSize_(0) { - if (commsType() != UPstream::scheduled && !buffers.finishedSendsCalled_) + if + ( + commsType() != UPstream::commsTypes::scheduled + && !buffers.finishedSendsCalled_ + ) { FatalErrorInFunction << "PstreamBuffers::finishedSends() never called." << endl @@ -147,7 +151,7 @@ Foam::UIPstream::UIPstream(const int fromProcNo, PstreamBuffers& buffers) setOpened(); setGood(); - if (commsType() == UPstream::nonBlocking) + if (commsType() == commsTypes::nonBlocking) { // Message is already received into externalBuf messageSize_ = buffers.recvBuf_[fromProcNo].size(); @@ -251,7 +255,7 @@ Foam::label Foam::UIPstream::read error::printStack(Pout); } - if (commsType == blocking || commsType == scheduled) + if (commsType == commsTypes::blocking || commsType == commsTypes::scheduled) { MPI_Status status; @@ -301,7 +305,7 @@ Foam::label Foam::UIPstream::read return messageSize; } - else if (commsType == nonBlocking) + else if (commsType == commsTypes::nonBlocking) { MPI_Request request; @@ -344,7 +348,7 @@ Foam::label Foam::UIPstream::read { FatalErrorInFunction << "Unsupported communications type " - << commsType + << int(commsType) << Foam::abort(FatalError); return 0; diff --git a/src/Pstream/mpi/UOPwrite.C b/src/Pstream/mpi/UOPwrite.C index b3188f0009..563163966c 100644 --- a/src/Pstream/mpi/UOPwrite.C +++ b/src/Pstream/mpi/UOPwrite.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -68,7 +68,7 @@ bool Foam::UOPstream::write bool transferFailed = true; - if (commsType == blocking) + if (commsType == commsTypes::blocking) { transferFailed = MPI_Bsend ( @@ -88,7 +88,7 @@ bool Foam::UOPstream::write << Foam::endl; } } - else if (commsType == scheduled) + else if (commsType == commsTypes::scheduled) { transferFailed = MPI_Send ( @@ -108,7 +108,7 @@ bool Foam::UOPstream::write << Foam::endl; } } - else if (commsType == nonBlocking) + else if (commsType == commsTypes::nonBlocking) { MPI_Request request; diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H index 0fd335ea88..42e3efa01f 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -221,17 +221,14 @@ public: // Member functions - // Evaluation functions - - //- Evaluate the patch field - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::blocking - ); - - //- Transfer data for external source - virtual void transferData(OFstream& os) const; + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + ); + //- Transfer data for external source + virtual void transferData(OFstream& os) const; //- Write virtual void write(Ostream&) const; diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H index 006f06b170..c4061a22da 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -148,19 +148,14 @@ public: // Member functions - // Evaluation functions + //- Evaluate the patchField + virtual void evaluate + ( + const Pstream::commsTypes commsType = Pstream::commsTypes::blocking + ); - //- Evaluate the patchField - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::Pstream::blocking - ); - - - // I-O - - //- Write - virtual void write(Ostream&) const; + //- Write + virtual void write(Ostream&) const; }; diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C index 2fdf0b3c16..c4886d721b 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1763,7 +1763,7 @@ Foam::autoPtr Foam::fvMeshDistribute::distribute // Allocate buffers - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); // What to send to neighbouring domains @@ -1792,7 +1792,7 @@ Foam::autoPtr Foam::fvMeshDistribute::distribute } // Pstream for sending mesh and fields - //OPstream str(Pstream::blocking, recvProc); + //OPstream str(Pstream::commsTypes::blocking, recvProc); UOPstream str(recvProc, pBufs); // Mesh subsetting engine diff --git a/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C b/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C index 8b8c616293..6f35a3fff6 100644 --- a/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C +++ b/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -105,7 +105,7 @@ void Foam::fvMeshSubset::doCoupledPatches if (syncPar && Pstream::parRun()) { - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); // Send face usage across processor patches forAll(oldPatches, oldPatchi) diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C index 819894dbb9..926f4fa985 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -459,12 +459,12 @@ void Foam::motionSmootherAlgo::setDisplacementPatchFields if (patchSchedule[patchEvalI].init) { displacementBf[patchi] - .initEvaluate(Pstream::scheduled); + .initEvaluate(Pstream::commsTypes::scheduled); } else { displacementBf[patchi] - .evaluate(Pstream::scheduled); + .evaluate(Pstream::commsTypes::scheduled); } } } @@ -597,12 +597,12 @@ void Foam::motionSmootherAlgo::correctBoundaryConditions if (patchSchedule[patchEvalI].init) { displacementBf[patchi] - .initEvaluate(Pstream::blocking); + .initEvaluate(Pstream::commsTypes::blocking); } else { displacementBf[patchi] - .evaluate(Pstream::blocking); + .evaluate(Pstream::commsTypes::blocking); } } } @@ -618,12 +618,12 @@ void Foam::motionSmootherAlgo::correctBoundaryConditions if (patchSchedule[patchEvalI].init) { displacementBf[patchi] - .initEvaluate(Pstream::blocking); + .initEvaluate(Pstream::commsTypes::blocking); } else { displacementBf[patchi] - .evaluate(Pstream::blocking); + .evaluate(Pstream::commsTypes::blocking); } } } diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C index 92f9d60fef..a8eb33fd5c 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -64,12 +64,12 @@ void Foam::motionSmootherAlgo::checkConstraints forAllReverse(bFld, patchi) { - bFld[patchi].initEvaluate(Pstream::blocking); // buffered + bFld[patchi].initEvaluate(Pstream::commsTypes::blocking); // buffered } forAllReverse(bFld, patchi) { - bFld[patchi].evaluate(Pstream::blocking); + bFld[patchi].evaluate(Pstream::commsTypes::blocking); } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C index 28511092c6..9b9459f8b1 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C @@ -1429,7 +1429,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map) // Send to neighbours - OPstream toNbr(Pstream::blocking, proci); + OPstream toNbr(Pstream::commsTypes::blocking, proci); toNbr << newSplitCells << newVisibleCells; } @@ -1447,7 +1447,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map) for (label proci = 0; proci < Pstream::nProcs(); proci++) { - IPstream fromNbr(Pstream::blocking, proci); + IPstream fromNbr(Pstream::commsTypes::blocking, proci); List newSplitCells(fromNbr); labelList newVisibleCells(fromNbr); diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C index e6e9ab2a72..3d92f78715 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1931,7 +1931,7 @@ void Foam::polyTopoChange::reorderCoupledFaces // Rotation on new faces. labelList rotation(faces_.size(), 0); - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); // Send ordering forAll(boundary, patchi) diff --git a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H index 01af21c5fe..236f4666f6 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -122,19 +122,17 @@ public: // Member functions - // Evaluation functions + //- Return gradient at boundary + virtual tmp> snGrad() const; - //- Return gradient at boundary - virtual tmp> snGrad() const; + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + ); - //- Evaluate the patch field - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::blocking - ); - - //- Return face-gradient transform diagonal - virtual tmp> snGradTransformDiag() const; + //- Return face-gradient transform diagonal + virtual tmp> snGradTransformDiag() const; }; diff --git a/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H index d40a605f74..cdda48792b 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -204,7 +204,8 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ); //- Return face-gradient transform diagonal diff --git a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H index f9eb61e285..42c57a2a7f 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -136,13 +136,11 @@ public: // Member functions - // Evaluation functions - - //- Evaluate the patch field - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::blocking - ); + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + ); }; diff --git a/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H index 622a52fcde..698a14312f 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -198,7 +198,8 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ); //- Return the matrix diagonal coefficients corresponding to the diff --git a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H index 1da39dc198..b237174ab8 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -242,7 +242,8 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ); //- Return the matrix diagonal coefficients corresponding to the diff --git a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H index 75fe587197..847a0b4ebc 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -176,14 +176,16 @@ public: //- Initialise the evaluation of the patch field virtual void initEvaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ) {} //- Evaluate the patch field, sets Updated to false virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ) {} diff --git a/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H index c8c1ec4b50..fa612fc088 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -149,7 +149,8 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ); //- Return the matrix diagonal coefficients corresponding to the diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C index b4241bb271..db36178e73 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -64,7 +64,7 @@ Foam::cyclicFvPatchField::cyclicFvPatchField << exit(FatalIOError); } - this->evaluate(Pstream::blocking); + this->evaluate(Pstream::commsTypes::blocking); } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C index 0b9335fb8f..124c42fb87 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -68,7 +68,7 @@ Foam::cyclicACMIFvPatchField::cyclicACMIFvPatchField if (!dict.found("value") && this->coupled()) { - this->evaluate(Pstream::blocking); + this->evaluate(Pstream::commsTypes::blocking); } } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C index 7d8fec72c1..50f0b55938 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -65,7 +65,7 @@ Foam::cyclicAMIFvPatchField::cyclicAMIFvPatchField if (!dict.found("value") && this->coupled()) { - this->evaluate(Pstream::blocking); + this->evaluate(Pstream::commsTypes::blocking); } } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C index 801d446627..36705e2111 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,7 +62,7 @@ Foam::jumpCyclicFvPatchField::jumpCyclicFvPatchField cyclicFvPatchField(p, iF, dict) { // Call this evaluation in derived classes - //this->evaluate(Pstream::blocking); + //this->evaluate(Pstream::commsTypes::blocking); } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C index 2947bb5656..e22390f84a 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -63,7 +63,7 @@ Foam::jumpCyclicAMIFvPatchField::jumpCyclicAMIFvPatchField cyclicAMIFvPatchField(p, iF, dict) { // Call this evaluation in derived classes - //this->evaluate(Pstream::blocking); + //this->evaluate(Pstream::commsTypes::blocking); } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C index 0a7c8e7bea..39b92ea77c 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -225,14 +225,18 @@ void Foam::processorFvPatchField::initEvaluate { this->patchInternalField(sendBuf_); - if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer) + if + ( + commsType == Pstream::commsTypes::nonBlocking + && !Pstream::floatTransfer + ) { // Fast path. Receive into *this this->setSize(sendBuf_.size()); outstandingRecvRequest_ = UPstream::nRequests(); UIPstream::read ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), reinterpret_cast(this->begin()), this->byteSize(), @@ -243,7 +247,7 @@ void Foam::processorFvPatchField::initEvaluate outstandingSendRequest_ = UPstream::nRequests(); UOPstream::write ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), reinterpret_cast(sendBuf_.begin()), this->byteSize(), @@ -267,7 +271,11 @@ void Foam::processorFvPatchField::evaluate { if (Pstream::parRun()) { - if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer) + if + ( + commsType == Pstream::commsTypes::nonBlocking + && !Pstream::floatTransfer + ) { // Fast path. Received into *this @@ -318,7 +326,11 @@ void Foam::processorFvPatchField::initInterfaceMatrixUpdate { this->patch().patchInternalField(psiInternal, scalarSendBuf_); - if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer) + if + ( + commsType == Pstream::commsTypes::nonBlocking + && !Pstream::floatTransfer + ) { // Fast path. if (debug && !this->ready()) @@ -334,7 +346,7 @@ void Foam::processorFvPatchField::initInterfaceMatrixUpdate outstandingRecvRequest_ = UPstream::nRequests(); UIPstream::read ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), reinterpret_cast(scalarReceiveBuf_.begin()), scalarReceiveBuf_.byteSize(), @@ -345,7 +357,7 @@ void Foam::processorFvPatchField::initInterfaceMatrixUpdate outstandingSendRequest_ = UPstream::nRequests(); UOPstream::write ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), reinterpret_cast(scalarSendBuf_.begin()), scalarSendBuf_.byteSize(), @@ -379,7 +391,11 @@ void Foam::processorFvPatchField::updateInterfaceMatrix const labelUList& faceCells = this->patch().faceCells(); - if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer) + if + ( + commsType == Pstream::commsTypes::nonBlocking + && !Pstream::floatTransfer + ) { // Fast path. if @@ -437,7 +453,11 @@ void Foam::processorFvPatchField::initInterfaceMatrixUpdate { this->patch().patchInternalField(psiInternal, sendBuf_); - if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer) + if + ( + commsType == Pstream::commsTypes::nonBlocking + && !Pstream::floatTransfer + ) { // Fast path. if (debug && !this->ready()) @@ -453,7 +473,7 @@ void Foam::processorFvPatchField::initInterfaceMatrixUpdate outstandingRecvRequest_ = UPstream::nRequests(); IPstream::read ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), reinterpret_cast(receiveBuf_.begin()), receiveBuf_.byteSize(), @@ -464,7 +484,7 @@ void Foam::processorFvPatchField::initInterfaceMatrixUpdate outstandingSendRequest_ = UPstream::nRequests(); OPstream::write ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), reinterpret_cast(sendBuf_.begin()), sendBuf_.byteSize(), @@ -497,7 +517,11 @@ void Foam::processorFvPatchField::updateInterfaceMatrix const labelUList& faceCells = this->patch().faceCells(); - if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer) + if + ( + commsType == Pstream::commsTypes::nonBlocking + && !Pstream::floatTransfer + ) { // Fast path. if diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchScalarField.C index 40ba0865fc..53ebbb18e2 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,11 @@ void processorFvPatchField::initInterfaceMatrixUpdate { this->patch().patchInternalField(psiInternal, scalarSendBuf_); - if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer) + if + ( + commsType == Pstream::commsTypes::nonBlocking + && !Pstream::floatTransfer + ) { // Fast path. if (debug && !this->ready()) @@ -60,7 +64,7 @@ void processorFvPatchField::initInterfaceMatrixUpdate outstandingRecvRequest_ = UPstream::nRequests(); UIPstream::read ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), reinterpret_cast(scalarReceiveBuf_.begin()), scalarReceiveBuf_.byteSize(), @@ -71,7 +75,7 @@ void processorFvPatchField::initInterfaceMatrixUpdate outstandingSendRequest_ = UPstream::nRequests(); UOPstream::write ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, procPatch_.neighbProcNo(), reinterpret_cast(scalarSendBuf_.begin()), scalarSendBuf_.byteSize(), @@ -105,7 +109,11 @@ void processorFvPatchField::updateInterfaceMatrix const labelUList& faceCells = this->patch().faceCells(); - if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer) + if + ( + commsType == Pstream::commsTypes::nonBlocking + && !Pstream::floatTransfer + ) { // Fast path. if diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C index a2e322b35f..4cc2a4d53c 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -66,7 +66,7 @@ Foam::processorCyclicFvPatchField::processorCyclicFvPatchField << exit(FatalIOError); } - if (Pstream::defaultCommsType == Pstream::scheduled) + if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { WarningInFunction << "Scheduled communication with split cyclics not supported." diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H index ab6057d9de..8ecb4c3627 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -143,19 +143,17 @@ public: // Member functions - // Evaluation functions + //- Return gradient at boundary + virtual tmp> snGrad() const; - //- Return gradient at boundary - virtual tmp> snGrad() const; + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + ); - //- Evaluate the patch field - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::blocking - ); - - //- Return face-gradient transform diagonal - virtual tmp> snGradTransformDiag() const; + //- Return face-gradient transform diagonal + virtual tmp> snGradTransformDiag() const; }; diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H index eab75d121a..fec234b919 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -138,19 +138,17 @@ public: // Member functions - // Evaluation functions + //- Return gradient at boundary + virtual tmp> snGrad() const; - //- Return gradient at boundary - virtual tmp> snGrad() const; + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + ); - //- Evaluate the patch field - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::blocking - ); - - //- Return face-gradient transform diagonal - virtual tmp> snGradTransformDiag() const; + //- Return face-gradient transform diagonal + virtual tmp> snGradTransformDiag() const; }; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H index e8f7453d4d..df891131d4 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -227,7 +227,7 @@ public: //- Evaluate the patch field, sets Updated to false virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking ); //- Write diff --git a/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H index 37b20c9c45..94caaee331 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -239,7 +239,7 @@ public: // to false. virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking ); //- Write diff --git a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H index 190ff28e5c..690e74df42 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H @@ -1,8 +1,8 @@ -/*---------------------------------------------------------------------------*\ +/*---------------------------------------------------------------------------* \ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -308,38 +308,32 @@ public: // Member functions - // Access + //- Return the log flag + bool log() const + { + return log_; + } - //- Return the log flag - bool log() const - { - return log_; - } + //- Return the master flag + bool master() const + { + return master_; + } - //- Return the master flag - bool master() const - { - return master_; - } + //- Return the master flag + bool& master() + { + return master_; + } - //- Return the master flag - bool& master() - { - return master_; - } - - - // Evaluation functions - - //- Evaluate the patch field - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::blocking - ); - - //- Transfer data for external source - virtual void transferData(OFstream& os) const; + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + ); + //- Transfer data for external source + virtual void transferData(OFstream& os) const; //- Write the geometry to the comms dir void writeGeometry() const; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C index 29b446df30..dc9a1aa855 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -117,7 +117,7 @@ Foam::fanFvPatchField::fanFvPatchField } else { - this->evaluate(Pstream::blocking); + this->evaluate(Pstream::commsTypes::blocking); } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C index 13eba7efa0..52764fc6a3 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -78,7 +78,7 @@ Foam::fixedJumpFvPatchField::fixedJumpFvPatchField } else { - this->evaluate(Pstream::blocking); + this->evaluate(Pstream::commsTypes::blocking); } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C index 354a84bb2d..2229069a14 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -78,7 +78,7 @@ Foam::fixedJumpAMIFvPatchField::fixedJumpAMIFvPatchField } else { - this->evaluate(Pstream::blocking); + this->evaluate(Pstream::commsTypes::blocking); } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H index 93c1180622..5b47718443 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -194,7 +194,8 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ); //- Return face-gradient transform diagonal diff --git a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C index 1e507a5dfd..be8e625a96 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -92,7 +92,7 @@ flowRateInletVelocityFvPatchVectorField } else { - evaluate(Pstream::blocking); + evaluate(Pstream::commsTypes::blocking); } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.H index b4369b12bc..0800656d5f 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -169,14 +169,11 @@ public: // Member functions - // Evaluation functions - - //- Evaluate the patch field - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::blocking - ); - + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking + ); //- Write virtual void write(Ostream&) const; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H index 52170caa29..fb8d75056f 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -195,7 +195,8 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ); //- Return face-gradient transform diagonal diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C index cb0dbd1792..8a2602f70c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -115,7 +115,7 @@ timeVaryingMappedFixedValueFvPatchField // by re-setting of fvatchfield::updated_ flag. This is // so if first use is in the next time step it retriggers // a new update. - this->evaluate(Pstream::blocking); + this->evaluate(Pstream::commsTypes::blocking); } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C index 00f30731de..265bbf3ec4 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -78,7 +78,7 @@ Foam::uniformJumpFvPatchField::uniformJumpFvPatchField } else { - this->evaluate(Pstream::blocking); + this->evaluate(Pstream::commsTypes::blocking); } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C index 61339e232e..12857efacb 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,7 +75,7 @@ Foam::uniformJumpAMIFvPatchField::uniformJumpAMIFvPatchField } else { - this->evaluate(Pstream::blocking); + this->evaluate(Pstream::commsTypes::blocking); } } diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H index 3fe1d2b0f6..748cb9dd06 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -439,14 +439,16 @@ public: //- Initialise the evaluation of the patch field virtual void initEvaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ) {} //- Evaluate the patch field, sets Updated to false virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ); diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C index 4bd21004f6..535e31ed7c 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -99,7 +99,7 @@ void Foam::volPointInterpolation::addSeparated refCast> (pfbf[patchi]).initSwapAddSeparated ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, pfi ); } @@ -115,7 +115,7 @@ void Foam::volPointInterpolation::addSeparated refCast> (pfbf[patchi]).swapAddSeparated ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, pfi ); } diff --git a/src/functionObjects/field/streamLine/streamLine.C b/src/functionObjects/field/streamLine/streamLine.C index 2947d0d801..a05a0ad94f 100644 --- a/src/functionObjects/field/streamLine/streamLine.C +++ b/src/functionObjects/field/streamLine/streamLine.C @@ -456,7 +456,7 @@ bool Foam::functionObjects::streamLine::write() // to prevent buffering. mapDistributeBase::distribute ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, distMap.schedule(), distMap.constructSize(), distMap.subMap(), @@ -473,7 +473,7 @@ bool Foam::functionObjects::streamLine::write() allScalars_[scalarI].shrink(); mapDistributeBase::distribute ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, distMap.schedule(), distMap.constructSize(), distMap.subMap(), @@ -491,7 +491,7 @@ bool Foam::functionObjects::streamLine::write() allVectors_[vectorI].shrink(); mapDistributeBase::distribute ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, distMap.schedule(), distMap.constructSize(), distMap.subMap(), diff --git a/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C b/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C index 7fd47295f1..23892ba776 100644 --- a/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C +++ b/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C @@ -616,7 +616,7 @@ bool Foam::functionObjects::wallBoundedStreamLine::write() allTracks_.shrink(); mapDistributeBase::distribute ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, distMap.schedule(), distMap.constructSize(), distMap.subMap(), @@ -633,7 +633,7 @@ bool Foam::functionObjects::wallBoundedStreamLine::write() allScalars_[scalarI].shrink(); mapDistributeBase::distribute ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, distMap.schedule(), distMap.constructSize(), distMap.subMap(), @@ -651,7 +651,7 @@ bool Foam::functionObjects::wallBoundedStreamLine::write() allVectors_[vectorI].shrink(); mapDistributeBase::distribute ( - Pstream::scheduled, + Pstream::commsTypes::scheduled, distMap.schedule(), distMap.constructSize(), distMap.subMap(), diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C index 644a585366..637e65a6e8 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -59,7 +59,7 @@ void Foam::MGridGenGAMGAgglomeration::swap { interfaces[inti].initInternalFieldTransfer ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, cellValues ); } @@ -83,7 +83,7 @@ void Foam::MGridGenGAMGAgglomeration::swap ( interfaces[inti].internalFieldTransfer ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, cellValues ) ) diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.H index 7adb6d3d83..1e1cc4838e 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.H +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -197,7 +197,7 @@ public: //- Update the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType=Pstream::commsTypes::blocking ); //- Write diff --git a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C index 4978b2aa47..5c91a843a1 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -118,7 +118,7 @@ timeVaryingMappedFixedValuePointPatchField // of the pointPatchField::updated_ flag. This is // so if first use is in the next time step it retriggers // a new update. - pointPatchField::evaluate(Pstream::blocking); + pointPatchField::evaluate(Pstream::commsTypes::blocking); } } diff --git a/src/lagrangian/basic/Cloud/Cloud.C b/src/lagrangian/basic/Cloud/Cloud.C index 4dd3558af7..9b66f53706 100644 --- a/src/lagrangian/basic/Cloud/Cloud.C +++ b/src/lagrangian/basic/Cloud/Cloud.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -232,7 +232,7 @@ void Foam::Cloud::move(TrackData& td, const scalar trackTime) ); // Allocate transfer buffers - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); // While there are particles to transfer diff --git a/src/lagrangian/basic/InteractionLists/InteractionLists.H b/src/lagrangian/basic/InteractionLists/InteractionLists.H index 613c5fd31f..f44a17ead5 100644 --- a/src/lagrangian/basic/InteractionLists/InteractionLists.H +++ b/src/lagrangian/basic/InteractionLists/InteractionLists.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ Description Simultaneous communication and computation is possible using: \verbatim - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); label startOfRequests = Pstream::nRequests(); il_.sendReferredData(cellOccupancy_, pBufs); // Do other things diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C index 5c0087e52f..24090749f2 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,7 +57,7 @@ void Foam::PairCollision::preInteraction() template void Foam::PairCollision::parcelInteraction() { - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); label startOfRequests = Pstream::nRequests(); diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C index 761dfc8d94..ffcb260118 100644 --- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C +++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -127,7 +127,7 @@ void Foam::moleculeCloud::buildCellOccupancy() void Foam::moleculeCloud::calculatePairForce() { - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); // Start sending referred data label startOfRequests = Pstream::nRequests(); @@ -359,7 +359,7 @@ void Foam::moleculeCloud::removeHighEnergyOverlaps() buildCellOccupancy(); - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); // Start sending referred data label startOfRequests = Pstream::nRequests(); diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C index 41c28a9bda..aeb4cf5561 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C @@ -1099,7 +1099,7 @@ Foam::autoPtr Foam::meshRefinement::splitFaces // { // if (proci != Pstream::myProcNo()) // { -// OPstream str(Pstream::blocking, proci); +// OPstream str(Pstream::commsTypes::blocking, proci); // str << regionConnectivity[proci]; // } // } @@ -1108,7 +1108,7 @@ Foam::autoPtr Foam::meshRefinement::splitFaces // { // if (proci != Pstream::myProcNo()) // { -// IPstream str(Pstream::blocking, proci); +// IPstream str(Pstream::commsTypes::blocking, proci); // str >> regionConnectivity[proci]; // } // } diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C index a55ea51dea..df9e9fbcf0 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -171,7 +171,7 @@ void Foam::meshRefinement::collectAndPrint points, allPoints, UPstream::msgType(), - Pstream::blocking + Pstream::commsTypes::blocking ); List allData; @@ -182,7 +182,7 @@ void Foam::meshRefinement::collectAndPrint data, allData, UPstream::msgType(), - Pstream::blocking + Pstream::commsTypes::blocking ); diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C index 7225237a16..292eb6aebe 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -964,7 +964,7 @@ void Foam::AMIInterpolation::update mapDistributeBase::distribute ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, List(), tgtPatch.size(), map.constructMap(), @@ -979,7 +979,7 @@ void Foam::AMIInterpolation::update mapDistributeBase::distribute ( - Pstream::nonBlocking, + Pstream::commsTypes::nonBlocking, List(), tgtPatch.size(), map.constructMap(), diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C index 0708b334bb..cbb050a385 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -124,7 +124,7 @@ void Foam::AMIInterpolation::distributePatches List& faceIDs ) const { - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); for (label domain = 0; domain < Pstream::nProcs(); domain++) { diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H index 78b70675da..2c108b2451 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H +++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -211,7 +211,8 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ) {} diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H index 5a02c94479..64765e52f7 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -211,7 +211,8 @@ public: //- Evaluate the patch field virtual void evaluate ( - const Pstream::commsTypes commsType=Pstream::blocking + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking ) {} diff --git a/src/meshTools/algorithms/MeshWave/FaceCellWave.C b/src/meshTools/algorithms/MeshWave/FaceCellWave.C index f76d716574..a4394ae6e7 100644 --- a/src/meshTools/algorithms/MeshWave/FaceCellWave.C +++ b/src/meshTools/algorithms/MeshWave/FaceCellWave.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -514,7 +514,7 @@ void Foam::FaceCellWave::handleProcPatches() // Send all - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); forAll(procPatches, i) { diff --git a/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.C b/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.C index b0d01a81b3..668f1f9b67 100644 --- a/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.C +++ b/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -311,7 +311,7 @@ void Foam::PointEdgeWave::handleProcPatches() { // 1. Send all point info on processor patches. - PstreamBuffers pBufs(Pstream::nonBlocking); + PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); DynamicList patchInfo; DynamicList