From 4c98ca6f32884ee886b0e149ee737b90c9473738 Mon Sep 17 00:00:00 2001 From: Franjo Juretic Date: Mon, 14 Aug 2017 10:42:02 +0200 Subject: [PATCH] Reverted UPstream to Pstream --- .../extrudeLayer/extrudeLayer.C | 4 +- .../refineBoundaryLayersFaces.C | 4 +- .../decomposeCellsDecomposition.C | 4 +- .../helperFunctions/helperFunctionsPar.C | 84 +++++++++++++------ .../helperFunctions/helperFunctionsPar.H | 4 +- .../meshes/partTetMesh/partTetMesh.C | 4 +- .../partTetMesh/partTetMeshAddressing.C | 4 +- .../meshes/polyMeshGen/polyMeshGen.H | 2 +- .../polyMeshGenAddressingParallelAddressing.C | 20 ++--- .../polyMeshGenChecksGeometry.C | 28 +++---- .../polyMeshGenModifierAddBufferCells.C | 64 +++++++------- .../polyMeshGenModifierRemoveFaces.C | 12 ++- .../meshOctreeAddressingParallelAddressing.C | 16 ++-- .../meshOctreeModifierLoadDistribution.C | 8 +- .../meshOctreeModifierParallelRefinement.C | 2 +- .../meshOctreeParallelCommunication.C | 32 +++---- .../geometry/meshOptimizer/meshOptimizerI.H | 12 +-- .../meshOptimizerOptimizePoint.C | 4 +- .../checkCellConnectionsOverFaces.C | 4 +- ...heckIrregularSurfaceConnectionsFunctions.C | 4 +- .../checkNonMappableCellConnections.C | 4 +- .../topologicalCleanerInvalidVertices.C | 4 +- .../topologyCleanerNonMappableCells.C | 4 +- ...faceEngineCalculateBoundaryNodesAndFaces.C | 8 +- .../meshSurfaceEngineParallelAddressing.C | 16 ++-- .../surfaceMorpherCellsMorphInternalFaces.C | 4 +- 26 files changed, 198 insertions(+), 158 deletions(-) diff --git a/meshLibrary/utilities/boundaryLayers/extrudeLayer/extrudeLayer.C b/meshLibrary/utilities/boundaryLayers/extrudeLayer/extrudeLayer.C index 9708b64..b47696b 100644 --- a/meshLibrary/utilities/boundaryLayers/extrudeLayer/extrudeLayer.C +++ b/meshLibrary/utilities/boundaryLayers/extrudeLayer/extrudeLayer.C @@ -374,7 +374,7 @@ void extrudeLayer::createNewVertices() OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), globalLabels.byteSize() ); @@ -390,7 +390,7 @@ void extrudeLayer::createNewVertices() labelList receivedData; IPstream fromOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo() ); diff --git a/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayersFaces.C b/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayersFaces.C index b855808..4805c54 100644 --- a/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayersFaces.C +++ b/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayersFaces.C @@ -1049,7 +1049,7 @@ void refineBoundaryLayers::generateNewFaces() OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), sendData.byteSize() ); @@ -1065,7 +1065,7 @@ void refineBoundaryLayers::generateNewFaces() IPstream fromOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo() ); diff --git a/meshLibrary/utilities/decomposeCells/decomposeCellsDecomposition.C b/meshLibrary/utilities/decomposeCells/decomposeCellsDecomposition.C index 8ba5fc0..cb7fda6 100644 --- a/meshLibrary/utilities/decomposeCells/decomposeCellsDecomposition.C +++ b/meshLibrary/utilities/decomposeCells/decomposeCellsDecomposition.C @@ -117,7 +117,7 @@ void decomposeCells::checkFaceConnections(const boolList& decomposeCell) OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), decFace.byteSize() ); @@ -132,7 +132,7 @@ void decomposeCells::checkFaceConnections(const boolList& decomposeCell) IPstream fromOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo() ); diff --git a/meshLibrary/utilities/helperFunctions/helperFunctionsPar.C b/meshLibrary/utilities/helperFunctions/helperFunctionsPar.C index 6e05465..94630cf 100644 --- a/meshLibrary/utilities/helperFunctions/helperFunctionsPar.C +++ b/meshLibrary/utilities/helperFunctions/helperFunctionsPar.C @@ -79,7 +79,7 @@ void whisperReduce(const ListType& neis, const scatterOp& sop, gatherOp& gop) { //- receive the data List receivedData; - IPstream fromOtherProc(UPstream::commsTypes::blocking, above[aboveI]); + IPstream fromOtherProc(Pstream::commsTypes::blocking, above[aboveI]); fromOtherProc >> receivedData; gop(receivedData); @@ -94,7 +94,13 @@ void whisperReduce(const ListType& neis, const scatterOp& sop, gatherOp& gop) sop(dts); //- send the data - OPstream toOtherProc(UPstream::commsTypes::blocking, neiProc, dts.byteSize()); + OPstream toOtherProc + ( + Pstream::commsTypes::blocking, + neiProc, + dts.byteSize() + ); + toOtherProc << dts; } @@ -104,7 +110,7 @@ void whisperReduce(const ListType& neis, const scatterOp& sop, gatherOp& gop) { //- receive the data List receivedData; - IPstream fromOtherProc(UPstream::commsTypes::blocking, below[belowI]); + IPstream fromOtherProc(Pstream::commsTypes::blocking, below[belowI]); fromOtherProc >> receivedData; gop(receivedData); @@ -119,7 +125,13 @@ void whisperReduce(const ListType& neis, const scatterOp& sop, gatherOp& gop) sop(dts); //- send the data - OPstream toOtherProc(UPstream::commsTypes::blocking, neiProc, dts.byteSize()); + OPstream toOtherProc + ( + Pstream::commsTypes::blocking, + neiProc, + dts.byteSize() + ); + toOtherProc << dts; } } @@ -143,14 +155,24 @@ void exchangeMap labelHashSet receiveData; for(iter=m.begin();iter!=m.end();++iter) { - OPstream toOtherProc(UPstream::commsTypes::blocking, iter->first, sizeof(label)); + OPstream toOtherProc + ( + Pstream::commsTypes::blocking, + iter->first, + sizeof(label) + ); toOtherProc << iter->second.size(); } for(iter=m.begin();iter!=m.end();++iter) { - IPstream fromOtherProc(UPstream::commsTypes::blocking, iter->first, sizeof(label)); + IPstream fromOtherProc + ( + Pstream::commsTypes::blocking, + iter->first, + sizeof(label) + ); label s; fromOtherProc >> s; @@ -159,7 +181,7 @@ void exchangeMap receiveData.insert(iter->first); } - if( commsType == UPstream::commsTypes::blocking ) + if( commsType == Pstream::commsTypes::blocking ) { //- start with blocking type of send and received operation @@ -173,7 +195,7 @@ void exchangeMap OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, iter->first, dts.byteSize() ); @@ -186,11 +208,16 @@ void exchangeMap if( !receiveData.found(iter->first) ) continue; - IPstream fromOtherProc(UPstream::commsTypes::blocking, iter->first); + IPstream fromOtherProc + ( + Pstream::commsTypes::blocking, + iter->first + ); + data.appendFromStream(fromOtherProc); } } - else if( commsType == UPstream::commsTypes::scheduled ) + else if( commsType == Pstream::commsTypes::scheduled ) { //- start with scheduled data transfer //- this type of transfer is intended for long messages because @@ -204,13 +231,13 @@ void exchangeMap if( !receiveData.found(iter->first) ) continue; - //List receive; - IPstream fromOtherProc(UPstream::commsTypes::scheduled, iter->first); - //fromOtherProc >> receive; - data.appendFromStream(fromOtherProc); + IPstream fromOtherProc + ( + Pstream::commsTypes::scheduled, + iter->first + ); - //forAll(receive, i) - // data.append(receive[i]); + data.appendFromStream(fromOtherProc); } //- send data to processors with greater ids @@ -226,7 +253,7 @@ void exchangeMap OPstream toOtherProc ( - UPstream::commsTypes::scheduled, + Pstream::commsTypes::scheduled, iter->first, dts.byteSize() ); @@ -243,13 +270,13 @@ void exchangeMap if( !receiveData.found(riter->first) ) continue; - IPstream fromOtherProc(UPstream::commsTypes::scheduled, riter->first); - //List receive; - //fromOtherProc >> receive; - data.appendFromStream(fromOtherProc); + IPstream fromOtherProc + ( + Pstream::commsTypes::scheduled, + riter->first + ); - //forAll(receive, i) - // data.append(receive[i]); + data.appendFromStream(fromOtherProc); } //- send data to processors with lower ids @@ -265,7 +292,7 @@ void exchangeMap OPstream toOtherProc ( - UPstream::commsTypes::scheduled, + Pstream::commsTypes::scheduled, riter->first, dts.byteSize() ); @@ -317,7 +344,7 @@ void exchangeMap OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, iter->first, dataToSend.byteSize() ); @@ -330,7 +357,12 @@ void exchangeMap mOut.insert(std::make_pair(iter->first, List())); List& dataToReceive = mOut[iter->first]; - IPstream fromOtherProc(UPstream::commsTypes::blocking, iter->first); + IPstream fromOtherProc + ( + Pstream::commsTypes::blocking, + iter->first + ); + fromOtherProc >> dataToReceive; } } diff --git a/meshLibrary/utilities/helperFunctions/helperFunctionsPar.H b/meshLibrary/utilities/helperFunctions/helperFunctionsPar.H index 4748c73..e7fc6ff 100644 --- a/meshLibrary/utilities/helperFunctions/helperFunctionsPar.H +++ b/meshLibrary/utilities/helperFunctions/helperFunctionsPar.H @@ -43,7 +43,7 @@ SourceFiles namespace Foam { - + namespace help { @@ -65,7 +65,7 @@ void exchangeMap ( const std::map&, LongList&, - const UPstream::commsTypes commsType = UPstream::commsTypes::blocking + const Pstream::commsTypes commsType = Pstream::commsTypes::blocking ); //- sends the data stored in a map to other processors and receives the data diff --git a/meshLibrary/utilities/meshes/partTetMesh/partTetMesh.C b/meshLibrary/utilities/meshes/partTetMesh/partTetMesh.C index b36560e..a209a72 100644 --- a/meshLibrary/utilities/meshes/partTetMesh/partTetMesh.C +++ b/meshLibrary/utilities/meshes/partTetMesh/partTetMesh.C @@ -591,7 +591,7 @@ void partTetMesh::updateOrigMesh(boolList* changedFacePtr) OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, pBnd[patchI].neiProcNo(), sendData.byteSize() ); @@ -605,7 +605,7 @@ void partTetMesh::updateOrigMesh(boolList* changedFacePtr) IPstream fromOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, pBnd[patchI].neiProcNo() ); diff --git a/meshLibrary/utilities/meshes/partTetMesh/partTetMeshAddressing.C b/meshLibrary/utilities/meshes/partTetMesh/partTetMeshAddressing.C index 3c58b07..bbedc04 100644 --- a/meshLibrary/utilities/meshes/partTetMesh/partTetMeshAddressing.C +++ b/meshLibrary/utilities/meshes/partTetMesh/partTetMeshAddressing.C @@ -88,7 +88,7 @@ void partTetMesh::createPointsAndTets OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), dataToSend.byteSize() ); @@ -103,7 +103,7 @@ void partTetMesh::createPointsAndTets IPstream fromOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo() ); diff --git a/meshLibrary/utilities/meshes/polyMeshGen/polyMeshGen.H b/meshLibrary/utilities/meshes/polyMeshGen/polyMeshGen.H index 7263a6d..7a420ae 100644 --- a/meshLibrary/utilities/meshes/polyMeshGen/polyMeshGen.H +++ b/meshLibrary/utilities/meshes/polyMeshGen/polyMeshGen.H @@ -37,7 +37,7 @@ SourceFiles // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "polyMeshGenCells.H" -#include "dictionary.H" +#include "IOdictionary.H" namespace Foam { diff --git a/meshLibrary/utilities/meshes/polyMeshGenAddressing/polyMeshGenAddressingParallelAddressing.C b/meshLibrary/utilities/meshes/polyMeshGenAddressing/polyMeshGenAddressingParallelAddressing.C index eec105d..863796b 100644 --- a/meshLibrary/utilities/meshes/polyMeshGenAddressing/polyMeshGenAddressingParallelAddressing.C +++ b/meshLibrary/utilities/meshes/polyMeshGenAddressing/polyMeshGenAddressingParallelAddressing.C @@ -131,7 +131,7 @@ void polyMeshGenAddressing::calcGlobalPointLabels() const OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), dataToSend.byteSize() ); @@ -142,7 +142,7 @@ void polyMeshGenAddressing::calcGlobalPointLabels() const { IPstream fromOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo() ); labelList receivedData; @@ -236,7 +236,7 @@ void polyMeshGenAddressing::calcGlobalPointLabels() const OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), dataToSend.byteSize() ); @@ -247,7 +247,7 @@ void polyMeshGenAddressing::calcGlobalPointLabels() const { IPstream fromOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo() ); labelList receivedData; @@ -344,7 +344,7 @@ void polyMeshGenAddressing::calcGlobalFaceLabels() const OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), dataToSend.byteSize() ); @@ -358,7 +358,7 @@ void polyMeshGenAddressing::calcGlobalFaceLabels() const { IPstream fromOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo() ); @@ -529,7 +529,7 @@ void polyMeshGenAddressing::calcGlobalEdgeLabels() const OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), dataToSend.byteSize() ); @@ -540,7 +540,7 @@ void polyMeshGenAddressing::calcGlobalEdgeLabels() const { IPstream fromOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo() ); labelList receivedData; @@ -642,7 +642,7 @@ void polyMeshGenAddressing::calcGlobalEdgeLabels() const OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), dataToSend.byteSize() ); @@ -653,7 +653,7 @@ void polyMeshGenAddressing::calcGlobalEdgeLabels() const { IPstream fromOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo() ); labelList receivedData; diff --git a/meshLibrary/utilities/meshes/polyMeshGenChecks/polyMeshGenChecksGeometry.C b/meshLibrary/utilities/meshes/polyMeshGenChecks/polyMeshGenChecksGeometry.C index 8a43cfa..3d6c106 100644 --- a/meshLibrary/utilities/meshes/polyMeshGenChecks/polyMeshGenChecksGeometry.C +++ b/meshLibrary/utilities/meshes/polyMeshGenChecks/polyMeshGenChecksGeometry.C @@ -1566,7 +1566,7 @@ bool checkCellPartTetrahedra OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBnd[patchI].neiProcNo(), sendData.byteSize() ); @@ -1580,7 +1580,7 @@ bool checkCellPartTetrahedra IPstream fromOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBnd[patchI].neiProcNo() ); @@ -1667,7 +1667,7 @@ void checkFaceDotProduct OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), cCentres.byteSize() ); @@ -1680,7 +1680,7 @@ void checkFaceDotProduct vectorField otherCentres; IPstream fromOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo() ); @@ -2076,7 +2076,7 @@ bool checkFacePyramids OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), markedFaces.byteSize() ); @@ -2089,7 +2089,7 @@ bool checkFacePyramids labelList receivedData; IPstream fromOtheProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo() ); fromOtheProc >> receivedData; @@ -2179,7 +2179,7 @@ void checkFaceSkewness OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), cCentres.byteSize() ); @@ -2194,7 +2194,7 @@ void checkFaceSkewness vectorField otherCentres; IPstream fromOtheProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo() ); @@ -2421,7 +2421,7 @@ void checkFaceUniformity OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), dst.byteSize() ); @@ -2436,7 +2436,7 @@ void checkFaceUniformity scalarField otherDst; IPstream fromOtheProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo() ); @@ -2885,7 +2885,7 @@ bool checkFaceFlatness { OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), sizeof(label) ); @@ -2898,7 +2898,7 @@ bool checkFaceFlatness { IPstream fromOtheProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), sizeof(label) ); @@ -2914,7 +2914,7 @@ bool checkFaceFlatness OPstream toOtherProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), markedFaces[patchI].byteSize() ); @@ -2930,7 +2930,7 @@ bool checkFaceFlatness labelList receivedData; IPstream fromOtheProc ( - UPstream::commsTypes::blocking, + Pstream::commsTypes::blocking, procBoundaries[patchI].neiProcNo(), nMarkedOnOtherProcs[patchI]*sizeof(label) ); diff --git a/meshLibrary/utilities/meshes/polyMeshGenModifier/polyMeshGenModifierAddBufferCells.C b/meshLibrary/utilities/meshes/polyMeshGenModifier/polyMeshGenModifierAddBufferCells.C index 2965909..5b02515 100644 --- a/meshLibrary/utilities/meshes/polyMeshGenModifier/polyMeshGenModifierAddBufferCells.C +++ b/meshLibrary/utilities/meshes/polyMeshGenModifier/polyMeshGenModifierAddBufferCells.C @@ -44,9 +44,9 @@ void polyMeshGenModifier::addBufferCells() { if( !Pstream::parRun() ) return; - + Info << "Adding buffer layers" << endl; - + const labelList& owner = mesh_.owner(); pointFieldPMG& points = mesh_.points(); faceListPMG& faces = facesAccess(); @@ -55,12 +55,12 @@ void polyMeshGenModifier::addBufferCells() const polyMeshGenAddressing& addressing = mesh_.addressingData(); const labelLongList& globalPointLabel = addressing.globalPointLabel(); const Map